Re: copy ctor not called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeroen,

>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.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux