Jonathan Wakely wrote:
> It's under discussion
That's certainly a good news. Anyway, I'll wait
with porting my framework to the newest GCC,
until this issue is settled, as:
a) "= default" works as I expect on gcc 4.5-20090604
and maybe it will still do in the future;
b) gcc 4.5-20091119 reports
2009/11/26 Jonathan Wakely:
>
> This still lets you use defaulted functions, but the base is not
> trivially copyable.
Oops, I meant the base is not a trivial class ... but then it can't be
anyway as you have a virtual function.
2009/11/26 Piotr Wyderski:
>
> Clean, simple and GCC used to happily accept that.
Only with the experimental C++0x mode, which is a moving target and
you shouldn't really complain if it changes.
> But now it is illegal because of 3 draft violations:
>
> Base() shall be public, but is not
> ~Base(
Jonathan Wakely wrote:
> This is DR906
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#906
Thanks.
> Note "it shall be public"
And what's the reason for such restrictions?
I've used the following construction as a very
useful idiom to create an abstract class:
class Base {
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
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 re