fork download
  1. #define CHECKABLE_TYPEDEF(Name) \
  2.   template <typename T> \
  3.   struct HasTypedef_##Name { \
  4.   typedef char yes[1]; \
  5.   typedef char no[2]; \
  6.   template <typename C> static yes& test(typename C::Name*); \
  7.   template <typename> static no& test(...); \
  8.   static const bool value = sizeof(test<T>(0)) == sizeof(yes);\
  9.   };
  10.  
  11.  
  12. #define HAS_TYPEDEF(Type, Name) HasTypedef_##Name<Type>::value
  13.  
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
stdout
Standard output is empty