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++/30925] c++ frontend error: ?-operator parameter binding



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-02-22 23:37 -------
Hmm, ?: is a lvalue in C++. Since m_a is still an lvalue (a non modifiable one
though) we try to use "operator short&" so we get the same type, const short&,
on both sides of the ":" as short& is a closer match to const short& as for
short you have to bind a rvalue to a lvalue which is a longer way around.  So
is not a bug in GCC.

If you want this to work, change "operator short" to "operator const short&"
and it will just work.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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