[Issue 10012] [2.063 beta] pure constructors taking POD structs should be allowed for shared/immutable construction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 30 02:24:07 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10012
--- Comment #2 from Sönke Ludwig <sludwig at outerproduct.org> 2013-04-30 02:24:01 PDT ---
Sorry, I was blind while preparing the test case. This is the correct one:
---
struct S { string str; }
class Test { S _s; this(S s) pure { _s = s; } }
void main()
{
auto test2 = new shared Test(S());
auto test3 = new immutable Test(S());
}
---
So POD indeed works right, but immutable (and shared) references are seemingly
disallowed.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list