[Bug c++/21413] diagnostic for instantiation should also reference the function which it is where the instantiation happens
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Sat Oct 21 21:16:00 GMT 2006
------- Comment #7 from igodard at pacbell dot net 2006-10-21 21:16 -------
Please forgive my naive understanding of the standard, but it was my impression
that the return type of a function never participated in overload resolution.
That is, for any given set of overloads and a call, the return types of the
overloads can be changed arbitrarily and in all cases the compiler should
produce the same identification (if successful) or same diagnostic (if not).
We have here a case where this rule (if rule it is) is violated. If the
overloads are:
template<typename T> void foo(int);
template<typename C> typename a<C>::value_type foo(const C&);
then you get a diagnostic, but if the overloads are:
template<typename T> void foo(int);
template<typename C> void foo(const C&);
then you don't. I leave to wiser heads whether a diagnostic should issue, but
whether it should or should not then it should (or should not) in both cases.
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21413
More information about the Gcc-bugs
mailing list