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
111template <
typename TF1,
typename TF2,
typename TF3 = FalseType>
112struct Or : OrC<TF1::Value, TF2::Value, TF3::Value>
114 using Type =
typename OrC<TF1::Value, TF2::Value, TF3::Value>::Type;
123template <
bool VF1,
bool VF2>
124struct AndC : FalseType
128struct AndC<true, true> : TrueType
142template <
typename TF1,
typename TF2>
143struct And : AndC<TF1::Value, TF2::Value>
145 using Type =
typename AndC<TF1::Value, TF2::Value>::Type;
154template <
bool VF1,
bool VF2>
155struct XorC : FalseType
159struct XorC<true, false> : TrueType
162struct XorC<false, true> : TrueType
176template <
typename TF1,
typename TF2>
177struct Xor : XorC<TF1::Value, TF2::Value>
179 using Type =
typename XorC<TF1::Value, TF2::Value>::Type;
188struct NotC : FalseType
192struct NotC<false> : TrueType
195struct NotC<true> : FalseType
208template <
typename TF>
209struct Not : NotC<TF::Value>
211 using Type =
typename NotC<TF::Value>::Type;
217struct IsSmartPointer : FalseType
223struct IsSmartPointer<SmartPointer<T>> : TrueType
227struct IsSmartPointer<const SmartPointer<T>> : TrueType
236template <
typename TFromType,
typename TToType>
237using is_static_castable =
238 std::integral_constant<bool,
239 std::is_constructible_v<TToType, TFromType> || std::is_convertible_v<TFromType, TToType>>;
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....