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++/51747] [DR 1467] [C++11] cannot call defaulted copy constructor using list-initialization


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};
}


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