template<class T>
struct IsFunc
{
typedef char one;
typedef struct
{
char dummy_[2];
} two;
static one f(...);
static two f(T (*)[1]);
enum {value = (sizeof(f<T>(0)) == 1)};
};
And if I try to run it in main:
void functionA();
int _tmain(int argc, _TCHAR* argv[])
{
int a = 0;
cout << IsFunc<functionA>::value;//<=--------HERE
return 0;
}
I'm getting an error:
Error 1 error C2923: 'IsFunc' : 'functionA' is not a valid template type
What am I doing wrong?
Thanks