www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7596] New: traits compiles can't detect non-copyable errors

http://d.puremagic.com/issues/show_bug.cgi?id=7596

           Summary: traits compiles can't detect non-copyable errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dawg dawgfoto.de



struct S
{
     disable this(this);
}
static assert(!__traits(compiles, (S s) => s));
static assert(!__traits(compiles, function S(S s) { return s; }));

--------

The error is detected too late, i.e. in the glue layer.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 26 2012