This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++0x]: non-public defaulted copy c-tor
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Piotr Wyderski <piotr dot wyderski at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 26 Nov 2009 00:36:25 +0000
- Subject: Re: [C++0x]: non-public defaulted copy c-tor
- References: <9f8a01cd0911250239i5ae187cdl6ae7a4c5c6587eab@mail.gmail.com>
2009/11/25 Piotr Wyderski:
> After upgrade to trunk-20091124:
>
> ? ?class C {
>
> ? ?protected:
>
> ? ? ? ?C(const C&) = default;
> ? ?};
>
> main.cpp:1506:23: error: 'C::C(const C&)' declared with non-public access cannot
> ?be defaulted in the class body
>
> But I can't find anything about it in the N3000 draft.
> Should I file a GCC bug report or adjust my code?
This is DR906
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#906
Note "it shall be public"