This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: conversion operator and pass-by-reference
- To: Peter dot Bienstman at rug dot ac dot be
- Subject: Re: conversion operator and pass-by-reference
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 23 Nov 1999 22:00:15 +0100
- CC: gcc at gcc dot gnu dot org
- References: <006f01bf35b4$9e31ea40$0454c19d@intec.rug.ac.be>
> Is this behaviour as prescribed by the standard, or is it a bug in g++?
This is prescribed by the standard. The conversion produces a
temporary, and you can't bind a temporary to a reference, unless it's
a const reference.
Hope this helps,
Martin