traits.h: Rename TRUE
to TRUE_TY
A workaround for `TRUE` being a `#define` in Windows headers. Fixes #62
This commit is contained in:
parent
ebe7143ef1
commit
9a97ffce52
@ -143,15 +143,15 @@ using CompatibleWith = std::integral_constant<
|
|||||||
template <bool CONDITION, typename T = void>
|
template <bool CONDITION, typename T = void>
|
||||||
using EnableIf = typename std::enable_if<CONDITION, T>::type;
|
using EnableIf = typename std::enable_if<CONDITION, T>::type;
|
||||||
|
|
||||||
// If `BASE` is a base of `T` then EnableIfIsType resolves to type `TRUE`,
|
// If `BASE` is a base of `T` then EnableIfIsType resolves to type `TRUE_TY`,
|
||||||
// otherwise an invalid type.
|
// otherwise an invalid type.
|
||||||
template <typename BASE, typename T, typename TRUE = void>
|
template <typename BASE, typename T, typename TRUE_TY = void>
|
||||||
using EnableIfIsType = EnableIf<IsTypeOrDerived<BASE, T>::value, TRUE>;
|
using EnableIfIsType = EnableIf<IsTypeOrDerived<BASE, T>::value, TRUE_TY>;
|
||||||
|
|
||||||
// If the function-like `F` has a matching signature to the function-like `S`
|
// If the function-like `F` has a matching signature to the function-like `S`
|
||||||
// then EnableIfHasSignature resolves to type `TRUE`, otherwise an invalid type.
|
// then EnableIfHasSignature resolves to type `TRUE_TY`, otherwise an invalid type.
|
||||||
template <typename F, typename S, typename TRUE = void>
|
template <typename F, typename S, typename TRUE_TY = void>
|
||||||
using EnableIfHasSignature = EnableIf<HasSignature<F, S>::value, TRUE>;
|
using EnableIfHasSignature = EnableIf<HasSignature<F, S>::value, TRUE_TY>;
|
||||||
|
|
||||||
} // namespace traits
|
} // namespace traits
|
||||||
} // namespace dap
|
} // namespace dap
|
||||||
|
Loading…
x
Reference in New Issue
Block a user