#include<vector>
#include<iostream>
using namespace std;

template<typename T> class Is_class {
/* najpierw definiujemy dwa typy rĂłĹźniÄce sie rozmiarem */
typedef char one;
typedef struct {char c[2];} two;
/* teraz potrzebne bedÄ dwa przeĹadowane szablony */
template<typename U> static one test(int U::* ); 
template<typename U> static two test(...);

/* to ktĂłry szablon zostaĹ wybrany sprawdzamy poprzez 
   sprawdzenie rozmiaru zwracanego typu */
public:
  enum {yes = (sizeof(test<T>(0))==sizeof(one) )};
};


struct X {};

main() {

  cerr<<Is_class<int>::yes<<endl;
  cerr<<Is_class<X>::yes<<endl;
  cerr<<Is_class<vector<double> >::yes<<endl;

}
