[Bug c++/16915] unnecessary copy construction
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 9 15:29:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-08-09 15:29 -------
lock::lock(const lock&) tries to use the copy constructor
of the base class, but that is inaccessible.
What the standard says is basically that the copy constructor
must be accessible. Whether the compiler actually uses it, or gets
rid of the temporary by direct copy, is up to the compiler implementation,
but it has to check the accessibility anyway. gcc doesn't generate the
temporary in many cases, btw.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16915
More information about the Gcc-bugs
mailing list