This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37898] aggregates vs. defaulted deleted functions
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2008 03:46:18 -0000
- Subject: [Bug c++/37898] aggregates vs. defaulted deleted functions
- References: <bug-37898-365@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bkoz at gcc dot gnu dot org 2008-12-04 03:46 -------
FYI removing the deleted copy constructor does indeed make this an aggregate.
So:
struct test_type
{
int i;
test_type() = default;
~test_type() = default;
test_type& operator=(const test_type&) = delete;
};
void test()
{
test_type t1 { 1 };
test_type t2[4] = { {1}, {2}, {3}, {4} };
test_type t3[4] = { {1}, {2}, {3} };
}
compiles properly in C++0x mode.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37898