Re: C++ vs D aggregates

2011-12-07 Thread Dejan Lekic
What does not? Yes, that kind of struct will work. :) Try to add a constructor...

Re: C++ vs D aggregates

2011-12-04 Thread Kagamin
Dejan Lekic Wrote: Do D2 aggregates behave the same, or are there notable differences? D restricts usage to static initializers only, C++ doesn't have this limitation.

Re: C++ vs D aggregates

2011-12-04 Thread Timon Gehr
On 12/04/2011 12:00 PM, Kagamin wrote: Dejan Lekic Wrote: Do D2 aggregates behave the same, or are there notable differences? D restricts usage to static initializers only, C++ doesn't have this limitation. This works: struct S{int x;} void main(){ int a; S x = {a}; } What does

Re: C++ vs D aggregates

2011-12-04 Thread Alex Rønne Petersen
On 03-12-2011 20:14, Dejan Lekic wrote: I recently stumbled on this thread: http://stackoverflow.com/ questions/5666321/what-is-assignment-via-curly-braces-called-and-can-it- be-controlled The important part is this: 8 - begin - The Standard says in section §8.5.1/1,

C++ vs D aggregates

2011-12-03 Thread Dejan Lekic
I recently stumbled on this thread: http://stackoverflow.com/ questions/5666321/what-is-assignment-via-curly-braces-called-and-can-it- be-controlled The important part is this: 8 - begin - The Standard says in section §8.5.1/1, An aggregate is an array or a class

Re: C++ vs D aggregates

2011-12-03 Thread Don
On 03.12.2011 20:14, Dejan Lekic wrote: I recently stumbled on this thread: http://stackoverflow.com/ questions/5666321/what-is-assignment-via-curly-braces-called-and-can-it- be-controlled The important part is this: 8 - begin - The Standard says in section §8.5.1/1,