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; }
69template <
bool VP,
typename T1,
typename T2>
72template <
typename T1,
typename T2>
73struct If<true, T1, T2>
77template <
typename T1,
typename T2>
78struct If<false, T1, T2>
91template <
bool VF1,
bool VF2,
bool VF3 = false>
96struct OrC<false, false, false> : FalseType
112template <
typename TF1,
typename TF2,
typename TF3 = FalseType>
113struct Or : OrC<TF1::Value, TF2::Value, TF3::Value>
115 using Type =
typename OrC<TF1::Value, TF2::Value, TF3::Value>::Type;
124template <
bool VF1,
bool VF2>
125struct AndC : FalseType
129struct AndC<true, true> : TrueType
144template <
typename TF1,
typename TF2>
145struct And : AndC<TF1::Value, TF2::Value>
147 using Type =
typename AndC<TF1::Value, TF2::Value>::Type;
156template <
bool VF1,
bool VF2>
157struct XorC : FalseType
161struct XorC<true, false> : TrueType
164struct XorC<false, true> : TrueType
179template <
typename TF1,
typename TF2>
180struct Xor : XorC<TF1::Value, TF2::Value>
182 using Type =
typename XorC<TF1::Value, TF2::Value>::Type;
191struct NotC : FalseType
195struct NotC<false> : TrueType
198struct NotC<true> : FalseType
212template <
typename TF>
213struct Not : NotC<TF::Value>
215 using Type =
typename NotC<TF::Value>::Type;
221struct IsSmartPointer : FalseType
227struct IsSmartPointer<SmartPointer<T>> : TrueType
231struct IsSmartPointer<const SmartPointer<T>> : TrueType
240template <
typename TFromType,
typename TToType>
241using is_static_castable =
242 std::integral_constant<bool,
243 std::is_constructible_v<TToType, TFromType> || std::is_convertible_v<TFromType, TToType>>;
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....