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

Re: conversion operator and pass-by-reference


> 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


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