This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17000] parse error calling member template function of non-lvalue from within template class member
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2004 14:20:16 -0000
- Subject: [Bug c++/17000] parse error calling member template function of non-lvalue from within template class member
- References: <20040812110815.17000.stefaandr@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-08-12 14:20 -------
Your specialization is of course invalid the way you
write it: it needs at least to have the same return type.
The question I have is different: of course the call to
get_a() is dependent, but its return type 'a' is not, and
we know that it can never be since the call to get_a can
be looked up at template definition time, so the return
type 'a' is fixed at that time. So if we know the return
type, why would we need the '.template' disambiguation?
BTW: icc8 accepts the code with or without disambiguation,
even in strict mode. Now, whether that means something is surely
a different matter :)
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17000