This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12226] g++ fails to enforce accessibility requirement for copy constructor


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]