This is a maintenance fork
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
796 B

#define NAME __cxx_types_compatible
#define QUALIFIED(Q1, Q2) \
template <class _T, class _U> \
struct NAME<_T Q1, _U Q2> : NAME<_T, _U> {}
template <class, class>
struct NAME {
enum { _value = 0 };
};
template <class _T>
struct NAME<_T, _T> {
enum { _value = 1 };
};
template <class _T, size_t N>
struct NAME<_T[], _T[N]> {
enum { _value = 1 };
};
template <class _T, size_t N>
struct NAME<_T[N], _T[]> {
enum { _value = 1 };
};
QUALIFIED(const volatile, );
QUALIFIED(const volatile, const);
QUALIFIED(const, const volatile);
QUALIFIED(volatile, const volatile);
QUALIFIED(const volatile, volatile);
QUALIFIED(const, volatile);
QUALIFIED(volatile, const);
QUALIFIED(, const);
QUALIFIED(const, );
QUALIFIED(, volatile);
QUALIFIED(volatile, );
#undef QUALIFIED
#undef NAME