[Bug c++/33350] New: copy constructor error

stevenyi at 163 dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 8 06:25:00 GMT 2007


if the copy constructor is decrated with the key word explicit, the following
code won't compile,

struct T
{
    explicit T() {}
    explicit T(const T&) {}
};

void test(T const&)
{
}

int main(int argc, char *argv[])
{
    test(T());
    return 0;
}


-- 
           Summary: copy constructor error
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stevenyi at 163 dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33350



More information about the Gcc-bugs mailing list