This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51747] [DR 1467] [C++11] cannot call defaulted copy constructor using list-initialization
- From: "tom at honermann dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 17:04:20 +0000
- Subject: [Bug c++/51747] [DR 1467] [C++11] cannot call defaulted copy constructor using list-initialization
- Auto-submitted: auto-generated
- References: <bug-51747-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51747
Tom Honermann <tom at honermann dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tom at honermann dot net
--- Comment #9 from Tom Honermann <tom at honermann dot net> ---
Note that call of the implicitly-defaulted copy constructor using
list-initialization is accepted for aggregate data members (verified using gcc
trunk (5.0 (c++-concepts branch), svn revision 219158))
$ cat t.cpp
struct base {
};
struct encapsulate {
encapsulate(const base &state)
: b{state} // accepted.
{}
base b;
};
void f(base b) {
encapsulate e{b};
}