copy ctor not called
Tue Jul 5 14:10:00 GMT 2005
>To me this says, that I -fno-elide-constructors should be the default behavior. Which it isn't (at least for gcc 3.3.4).
Due to the design and evolution of C++, your expectation that "-fno-elide-constructors should be the default behavior" is not the case.
I can understand where a person would expect that to be the situation.
However, C++ standard has the elide "optimization" be the default behavior for proper C++, and the -fno-elide-constructors is a non-compliant pessimization.
Moreso, you've touched up the (surprising?) requirement for the copy constructor to be public.
These C++ anachronisms are due in large part to the design and evolution of C++. They are legacy warts.
More information about the Gcc-help