18 #ifndef itkMetaProgrammingLibrary_h
19 #define itkMetaProgrammingLibrary_h
43 using ValueType = bool;
44 using Type = TrueType;
46 static constexpr ValueType Value =
true;
47 operator ValueType() {
return Value; }
56 using ValueType = bool;
57 using Type = FalseType;
58 static constexpr ValueType Value =
false;
59 operator ValueType() {
return Value; }
69 template <
bool VP,
typename T1,
typename T2>
72 template <
typename T1,
typename T2>
73 struct If<true, T1, T2>
77 template <
typename T1,
typename T2>
78 struct If<false, T1, T2>
91 template <
bool VF1,
bool VF2,
bool VF3 = false>
96 struct OrC<false, false, false> : FalseType
112 template <
typename TF1,
typename TF2,
typename TF3 = FalseType>
113 struct Or :
OrC<TF1::Value, TF2::Value, TF3::Value>
124 template <
bool VF1,
bool VF2>
129 struct AndC<true, true> : TrueType
144 template <
typename TF1,
typename TF2>
156 template <
bool VF1,
bool VF2>
161 struct XorC<true, false> : TrueType
164 struct XorC<false, true> : TrueType
179 template <
typename TF1,
typename TF2>
195 struct NotC<false> : TrueType
198 struct NotC<true> : FalseType
212 template <
typename TF>
220 template <
typename T>
226 template <
typename T>
230 template <
typename T>
231 struct IsSmartPointer<const SmartPointer<T>> : TrueType
240 template <
typename TFromType,
typename TToType>
242 std::integral_constant<bool,
243 std::is_constructible_v<TToType, TFromType> || std::is_convertible_v<TFromType, TToType>>;
250 using mpl::FalseType;
254 #endif // itkMetaProgrammingLibrary_h