This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20627] Dependend return value of function template is looked up even if function is never instantiated
- 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: 24 Mar 2005 18:56:49 -0000
- Subject: [Bug c++/20627] Dependend return value of function template is looked up even if function is never instantiated
- References: <20050324184259.20627.schlauerhamster@yahoo.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-24 18:56 -------
I think this is invalid code as "B<const T>::TYPE f(const T &);" is tried first, and there for B<const int> is
instantiated. If there were no indirections, it would have been rejected because the type does not exist
but since there is an indirection well it errors out. Sorry if this does not make sense, I cannot find why
the standard talks about this right now and I don't have time to look it up and also sorry if this is not
what you expected.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20627