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

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!