[Bug c++/30925] c++ frontend error: ?-operator parameter binding

2007-03-08 Thread bangerth at dealii dot org
--- Comment #3 from bangerth at dealii dot org 2007-03-09 04:34 --- (In reply to comment #0) Take a look at this again: struct A { operator short () { return m_value; } operator short () const { return m_value; } }; const A CONSTA(-1); struct M {

[Bug c++/30925] c++ frontend error: ?-operator parameter binding

2007-02-26 Thread istvan at benedek-home dot de
--- Comment #2 from istvan at benedek-home dot de 2007-02-26 14:52 --- ?: is a lvalue in C++ Why? I'm missing the quotation from the Holy Standard! IMHO: we deal with two nonmodifiable lvalues here. from HS 5.12 3: Because E1 can't be converted to type 'reference to T2', the Section

[Bug c++/30925] c++ frontend error: ?-operator parameter binding

2007-02-22 Thread pinskia at gcc dot gnu dot org
--- 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