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: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@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: -------

Reply via email to