[Bug c++/37860] New: default and delete used w/ member functions vs. initialization
bkoz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Oct 17 08:18:00 GMT 2008
Valid C++0x code is failing to compile. Support for default and delete appears
to be incomplete, as certain valid initialization fails. An example:
struct b
{
bool t;
b() = default;
~b() = default;
b& operator=(const b&) = delete;
b(const b&) = delete;
};
int main()
{
// copy initialization
b tst1 = { false }; // valid but error
// copy initialization.
b tst2 = false;
// direct initialization, copy list initialization syntax
b tst3 { false }; // valid but error
// default initialization
b tst4;
}
See tst1, tst3.
This is related to the GCC bug report about standard layout types but I'm going
to go and file individual bug reports about known issues.
--
Summary: default and delete used w/ member functions vs.
initialization
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org
GCC host triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37860
More information about the Gcc-bugs
mailing list