[Bug c++/13986] [3.4/3.5 regression] Unnecessary access check for copy constructor

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Feb 2 22:17:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-02 22:16 -------
This is a dup of bug 12226 which made these checks be there.  GCC is correct to error out here.
>From section 8.5.3,  paragraph 5: "If the initializer expression is an rvalue, with T2 a class type, and cv1 
T1 is  reference-compatible with cv2 T2, the reference is bound in one of the following ways 
[description  of the two ways omitted] ... The constructor that would be used to make the copy shall be 
callable  whether or not the copy is actually done."

*** This bug has been marked as a duplicate of 12226 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13986



More information about the Gcc-bugs mailing list