August 01, 2011 [Issue 6424] New: std.traits.hasElaborateAssign is limited | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6424 Summary: std.traits.hasElaborateAssign is limited Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: k.hara.pg@gmail.com --- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2011-08-01 07:34:47 PDT --- Follwing code should compile: struct S { void opAssign(T)(auto ref T rhs) if (!__traits(isRef, rhs)) {} } static assert(hasElaborateAssign!S); Because hasElaborateAssign!T checks is(typeof(T.init.opAssign(T.init))), but T.init is always lvalue, so S cannot pass its test. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 06, 2011 [Issue 6424] std.traits.hasElaborateAssign is limited | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kenji Hara | http://d.puremagic.com/issues/show_bug.cgi?id=6424 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-08-05 22:34:47 PDT --- https://github.com/D-Programming-Language/phobos/commit/5fc6ec7b372fc6901795367e723a016ad631b199 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation