When I try to compile this template I get an error in the line:
"enum { Yes = sizeof(IsClassT<T>::test<T>(0)) == 1};"
saying:
blop.hpp:8: error: expected primary-expression before ‘>’ token
#ifndef BLOP_HPP_
#define BLOP_HPP_
template<typename T>
class IsClassT {
public:
enum { Yes = sizeof(IsClassT<T>::test<T>(0)) == 1};
enum { No = !Yes};
//int getInt(){return a;};
private:
typedef char One;
typedef struct { char a[2];} Two;
template<typename Cstatic One test(int C::*);
template<typename Cstatic Two test();
static const int a = 10;
};
Any ideas why I get this error?