mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
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:
parent
994fdf8f1e
commit
3bfffa3cf9
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user