This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33350] New: copy constructor error
- From: "stevenyi at 163 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2007 06:25:10 -0000
- Subject: [Bug c++/33350] New: copy constructor error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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