This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12962] g++ fails to match template function
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2003 16:36:27 -0000
- Subject: [Bug c++/12962] g++ fails to match template function
- References: <20031108122926.12962.smelkov@mph1.phys.spbu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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