Passing temprary by reference requires copy constructor in 3.4?
Andrew Pinski
pinskia@physics.uc.edu
Fri Nov 26 19:48:00 GMT 2004
On Nov 26, 2004, at 2:10 PM, Peter Cech wrote:
> Hi,
> a.cpp: In function `void caller2()':
> a.cpp:16: error: `AnyEvent::AnyEvent(const AnyEvent&)' is private
> a.cpp:29: error: within this context
>
> Why gcc requires copy constructor in such situation?
It does not require the copy constructor, just requires it be
accessible.
I would read the changes page for 3.4 which documents why this changed.
Mainly this is required by the C++ standard.
Thanks,
Andrew Pinski
More information about the Gcc
mailing list