RAD Studio |  |

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

In the following code, explicit template arguments are necessary:

Copy Code

    template<class T> void foo(T);

Copy Code

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

Copy Code

    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!