http://d.puremagic.com/issues/show_bug.cgi?id=6436
--- Comment #2 from Andrej Mitrovic <[email protected]> 2012-04-19 18:45:56 PDT --- Interestingly if you pass by pointer instead of by ref it works fine. Here's a much more simplified example: import std.typecons; import std.stdio; struct Struct1 { this(ref int val) { val = 5; } } struct Struct2 { this(int* val) { *val = 5; } } alias RefCounted!(Struct1) Str1; alias RefCounted!(Struct2) Str2; void main() { Str1 str1; Str2 str2; int val; str1 = Str1(val); writeln(val); // writes 0 str2 = Str2(&val); writeln(val); // writes 5 } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
