http://d.puremagic.com/issues/show_bug.cgi?id=3449
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|spec | --- Comment #10 from Walter Bright <bugzi...@digitalmars.com> 2012-01-23 01:39:58 PST --- (In reply to comment #0) > When struct members are declared const or invariant, they seem to become > manifest constants. Example: > struct Foo { const int bar = 123; } > writeln(Foo.sizeof); // Prints "1", not "4" > Foo foo; > auto p = &foo.bar; // Error: constant 123 is not an lvalue Taking the address should work. Compiler bug, not a spec issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------