5293 – [3.3 regression] confusing message when binding a temporary to a reference (original) (raw)

bbbb.cpp: In function any_class& operator*=(any_class&, const any_class&) [with any_class = C1]': bbbb.cpp:22: instantiated from here bbbb.cpp:16: could not convert C1::operator=((&C1::operator*((+q))))' to `C1&'

Release: g++ 3.0.2

Environment: OS/2 Warp 4.52

How-To-Repeat: g++ bbbb.cpp

Comment 1 Nathan Sidwell 2002-04-26 05:21:45 UTC

State-Changed-From-To: open->analyzed State-Changed-Why: You are attempting to return a reference to a temporary (operator = retusn C1, not C1&). There is no rvalue to lvalue implicit conversion.

Comment 3 Mark Mitchell 2003-07-11 22:19:01 UTC

Postponed until GCC 3.3.2.

Comment 6 Gabriel Dos Reis 2003-08-19 23🔞24 UTC

Fixed.