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

[Bug c++/36430] Cannot convert a temporary to a non-const reference even with conversion operator



------- Comment #1 from gcc-bugzilla at contacts dot eelis dot net  2008-08-21 11:43 -------
This report is invalid. By 12.3.2,

  "A conversion function is never used to convert a
  (possibly cv-qualified) object to the (possibly
  cv-qualified) same object type (or a reference to it)."

Comeau warns explicitly about this, saying:

  line 2: warning: "Foo::operator Foo &()" will not be
    called for implicit or explicit conversions


-- 

gcc-bugzilla at contacts dot eelis dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc-bugzilla at contacts dot
                   |                            |eelis dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36430


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