This is the mail archive of the gcc-help@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]

Re: GCC compile problem ...


Hi Sebastian,

> I think, that this is not true. If you assign a temporary object to a constant
> reference, the object will survive until the reference is destroyed.

Thanks Sebastian, I stand corrected!  A const-reference has lifespan beyond
the full expression.

q.v. Stroustrup's C++PL 3rd ed, section 10.4.10

Sincerely,
--Eljay

Live like you'll die tomorrow.  Learn like you'll live forever.


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