[Bug c++/14463] [3.4/3.5 Regression] copy constructor access checked when passing reference arg
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Sun Mar 7 15:16:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-03-07 15:16 -------
No: "TestFailure(intp)" is an rvalue ([basic.lval]/6, or [expr.type.conv]/1),
and binding a rvalue to a reference requires the construction of a temporary
([class.temporary]/1). When doing so, a copy constructor might be invoked. The
standard (again at [class.temporary]/1) says that the copy can be elided, but
the semantic restrictions (involving accessibility) must be satisfied. Hence
GCC is correct here.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14463
More information about the Gcc-bugs
mailing list