http://d.puremagic.com/issues/show_bug.cgi?id=10487
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |Phobos Severity|normal |enhancement --- Comment #3 from Kenji Hara <[email protected]> 2013-06-28 00:16:21 PDT --- (In reply to comment #1) > But if we copy-paste the Tuple implementation inline into the current module: > [snip] > > Then we get the simple error: > > Error: cannot modify const expression f > > It looks like an implementation bug. No. It's not a compiler bug. Following code missing in copy-paste code: import std.traits; template isTuple(T) { static if (is(Unqual!T Unused : Tuple!Specs, Specs...)) { enum isTuple = true; } else { enum isTuple = false; } } ------------- std.typecons.Tuple defines opAssign method, so compiler always try to call it for assignment operation. So current error message is completely intended (even if it looks a little verbose). I change this to Phobos enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
