1 #ifndef MSP_CORE_META_H_
2 #define MSP_CORE_META_H_
13 struct RemoveConst<const T>
18 struct RemoveReference
22 struct RemoveReference<T &>
27 struct RemoveConstReference
28 { typedef typename RemoveConst<typename RemoveReference<T>::Type>::Type Type; };
31 template<bool c, typename R>
35 struct EnableIf<true, R>
39 struct EnableIf<false, R>
44 Common fragments used in SFINAE-based decider constructs.
48 struct Yes { char c[2]; };
49 struct No { char c; };
54 template<typename C, typename T>
57 enum { value = (sizeof(C::template f<T>(0))==sizeof(Yes)) };
62 struct CheckEqualityComparable: Sfinae
66 static Yes f(int (*)[sizeof(reinterpret_cast<const T &>(v)==reinterpret_cast<const T &>(v))]);
71 struct IsEqualityComparable: Sfinae::Evaluate<CheckEqualityComparable, T> { };