[Bug c++/12962] g++ fails to match template function
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 8 16:36:00 GMT 2003
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-08 16:36 -------
ICC warns on this:
pr12962.cc
pr12962.cc(19): warning #504: initial value of reference to non-const must be an lvalue
return __this->xxx(X<T>(*__this));
^
detected during instantiation of "int A<T>::a_call() [with T=B]"
Maybe the error message is not great with GCC but it is right, you cannot pass an casted
value to a reference argument.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12962
More information about the Gcc-bugs
mailing list