http://d.puremagic.com/issues/show_bug.cgi?id=5984
kenn...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kenn...@gmail.com --- Comment #1 from kenn...@gmail.com 2011-05-11 13:19:54 PDT --- How is this better than the 'const(Object) ref' syntax*? class A { ... } immutable(A) func(immutable A a1, immutable A a2) { immutable(A) ref a_ptr = null; ... } and const(ClassName)ref[] myArray; Actually there is already std.typecons.Rebindable which mostly works (uglily): class A { ... } immutable(A) func(immutable A a1, immutable A a2) { Rebindable!(immutable(A)) a_ptr = null; ... } and Rebindable!(const(ClassName))[] myArray; myArray.length = 1; myArray[0] = constant_object; myArray ~= rebindable(constant_object); *: https://github.com/D-Programming-Language/dmd/pull/3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------