www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15045] New: [Reg 2.069-devel] hasElaborateCopyConstructor is

https://issues.dlang.org/show_bug.cgi?id=15045

          Issue ID: 15045
           Summary: [Reg 2.069-devel] hasElaborateCopyConstructor is true
                    for struct with opDispatch
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
import std.traits;

struct S
{
    void opDispatch(string func, Args...)(Args args)
    {
    }
}
static assert(!hasElaborateCopyConstructor!S);
CODE

----

Introduced by https://github.com/D-Programming-Language/phobos/pull/3497.
I'd suggest to fix __traits(hasMember) to not instantiate opDispatch in which
case issue 14605 needs to be refixed.

--
Sep 11 2015