RAD Studio
ContentsIndex
PreviousUpNext
E2506: Explicit specialization of 'specifier' is ambiguous: must specify template arguments

In the following code, explicit template arguments are necessary:

template<class T> void foo(T);

 

template<class T> void foo(T *);

 

template<> void foo(int *); // error, must say 'foo<int>' or 'foo<int *>'
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!