[Bug c++/12226] g++ fails to enforce accessibility requirement for copy constructor
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Tue Sep 9 18:55:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12226
------- Additional Comments From bangerth at dealii dot org 2003-09-09 18:55 -------
Referring to the section you quote: it says that the compiler is free to choose either of
the two possibilities. The second one is to convert to a temporay of type "cv1 T2",
which in your case is "const B", just as explained in the example there. But the
copy constructor of B _is_ accessible, so gcc would be allowed to accept the code.
What do I miss?
W.
More information about the Gcc-bugs
mailing list