Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: D  |  size: 0.19 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. struct A
  2. {
  3.     int x;
  4. }
  5.  
  6. struct MyStruct
  7. {
  8.     int x;
  9.     char[] y;
  10.     A[2] z;
  11. }
  12.  
  13. void main()
  14. {
  15.     const MyStruct a = {1, "2", [{4}, {5}]};
  16.     static assert(a.z.x == 4);
  17. }