This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC compile problem ...
- From: John Love-Jensen <eljay at adobe dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 30 Sep 2002 06:46:18 -0500
- Subject: 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.