This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ template function overload resolution failure(?)


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]