This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ template function overload resolution failure(?)
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Richard Guenther" <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 28 Jan 2004 18:59:38 +0100
- Subject: Re: g++ template function overload resolution failure(?)
- References: <Pine.LNX.4.53.0401281302280.9162@bellatrix.tat.physik.uni-tuebingen.de>
Richard Guenther wrote:
> template <class T>
> void foo(const Foo<typename Wrapper<T, Tag1>::Type_t>&) {}
In a nested expression such as "typename A<T>::B", T is in a non-deduced
context, which means that the compiler is not allowed to deduce a type/value
for it. See [temp.deduct.type]/4. You can of course explicitally specify it,
using foo<int>(etc.).
Giovanni Bajo