meta.h: inherit from TrueType/FalseType where applicable

To reduce repetition and to provide a proper type hierarchy,
let type traits inherit from TrueType and FalseType.
This commit is contained in:
Philipp A. Hartmann 2014-07-04 15:08:10 +02:00
parent 994fdf8f1e
commit 3bfffa3cf9

View File

@ -24,11 +24,11 @@ struct SelectIf : SelectIfCond<Condition::Value,T1,T2> {};
template <bool Constify, typename T>
struct MaybeAddConst : SelectIfCond<Constify, const T, T> {};
template <typename T, typename U> struct IsSame { enum { Value = false }; };
template <typename T> struct IsSame<T,T> { enum { Value = true }; };
template <typename T, typename U> struct IsSame : FalseType {};
template <typename T> struct IsSame<T,T> : TrueType {};
template <typename T> struct IsConst { enum { Value = false }; };
template <typename T> struct IsConst<const T> { enum { Value = true }; };
template <typename T> struct IsConst : FalseType {};
template <typename T> struct IsConst<const T> : TrueType {};
template <typename CT, typename T>
struct IsMoreConst {