18 #ifndef itkMetaProgrammingLibrary_h
19 #define itkMetaProgrammingLibrary_h
42 using ValueType = bool;
43 using Type = TrueType;
45 static constexpr ValueType Value =
true;
46 operator ValueType() {
return Value; }
55 using ValueType = bool;
56 using Type = FalseType;
57 static constexpr ValueType Value =
false;
58 operator ValueType() {
return Value; }
68 template <
bool VP,
typename T1,
typename T2>
71 template <
typename T1,
typename T2>
72 struct If<true, T1, T2>
76 template <
typename T1,
typename T2>
77 struct If<false, T1, T2>
90 template <
bool VF1,
bool VF2,
bool VF3 = false>
95 struct OrC<false, false, false> : FalseType
111 template <
typename TF1,
typename TF2,
typename TF3 = FalseType>
112 struct Or :
OrC<TF1::Value, TF2::Value, TF3::Value>
123 template <
bool VF1,
bool VF2>
128 struct AndC<true, true> : TrueType
143 template <
typename TF1,
typename TF2>
155 template <
bool VF1,
bool VF2>
160 struct XorC<true, false> : TrueType
163 struct XorC<false, true> : TrueType
178 template <
typename TF1,
typename TF2>
194 struct NotC<false> : TrueType
197 struct NotC<true> : FalseType
211 template <
typename TF>
222 template <
typename TFromType,
typename TToType>
224 std::is_constructible<TToType, TFromType>::value ||
225 std::is_convertible<TFromType, TToType>::value>;
232 using mpl::FalseType;
236 #endif // itkMetaProgrammingLibrary_h