This is the mail archive of the
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: <email@example.com>
> 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,