static enum member of incomplete type, valid or not?
Timon Gehr
timon.gehr at gmx.ch
Sat Mar 30 01:06:40 PDT 2013
On 03/27/2013 01:01 PM, TommiT wrote:
> I'd like to get a definite answer to whether the following code is valid
> or not:
>
> struct S
> {
> int v = 42;
> this(int val) { v = val + 1; }
> enum s = S(4);
> }
>
> void main()
> {
> static assert(S.s.v == 5);
> }
>
Valid.
> There's a bug report about it:
> http://d.puremagic.com/issues/show_bug.cgi?id=9397
>
> ...but according to some of the comments there, the code isn't valid
> anyway, so it's not a bug.
> ...
There are no comments that would indicate this.
More information about the Digitalmars-d-learn
mailing list