Re: A non-const reference may only be bound to an lvalue?

"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message

That returned instance of B is not an lvalue - it's a temporary

I think lvalue is something we can address and rvalue is something we
can not address. The reurn instance of B is a temporary object, I
think an object is addressable and should be lvalue?

No, it's not "addressable" and it's not an lvalue. Specifically, this
doesn't compile:

B* p = &( source() );

With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925