This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]