28#ifndef itkConceptChecking_h
29#define itkConceptChecking_h
36#ifndef ITK_CONCEPT_NO_CHECKING
37# if defined(_MSC_VER) && !defined(__ICL)
38# define ITK_CONCEPT_IMPLEMENTATION_VTABLE
42# define ITK_CONCEPT_IMPLEMENTATION_STANDARD
47#if defined(ITK_CONCEPT_IMPLEMENTATION_STANDARD)
59# define itkConceptConstraintsMacro() \
60 template <void (Constraints::*)()> \
63 using EnforcerInstantiation = Enforcer<&Constraints::constraints>; \
64 ITK_MACROEND_NOOP_STATEMENT
65# define itkConceptMacro(name, concept) \
68 name = sizeof concept \
70 ITK_MACROEND_NOOP_STATEMENT
72#elif defined(ITK_CONCEPT_IMPLEMENTATION_VTABLE)
79# define itkConceptConstraintsMacro() \
80 virtual void Enforcer() { &Constraints::constraints; }
81# define itkConceptMacro(name, concept) \
84 name = sizeof concept \
88#elif defined(ITK_CONCEPT_IMPLEMENTATION_CALL)
91# define itkConceptConstraintsMacro()
92# define itkConceptMacro(name, concept) \
101# define itkConceptConstraintsMacro()
102# define itkConceptMacro(name, concept) \
132template <
unsigned int>
216template <
typename T1,
typename T2>
224 auto b =
static_cast<T2
>(
a);
262template <
typename T1,
typename T2 = T1>
284template <
typename T1,
typename T2 = T1>
306template <
typename T1,
typename T2 = T1>
315 ITK_GCC_SUPPRESS_Wfloat_equal
331template <
typename T1,
typename T2 = T1>
344 ITK_GCC_SUPPRESS_Wfloat_equal
360template <
typename T1,
typename T2 = T1,
typename T3 = T1>
368 a =
static_cast<T3
>(
b +
c);
369 a =
static_cast<T3
>(
b -
c);
377 a =
static_cast<T3
>(d +
e);
378 a =
static_cast<T3
>(d -
e);
392template <
typename T1,
typename T2 = T1>
421template <
typename T1,
typename T2 = T1,
typename T3 = T1>
429 a =
static_cast<T3
>(
b *
c);
437 a =
static_cast<T3
>(d *
e);
448template <
typename T1,
typename T2 = T1>
475template <
typename T1,
typename T2 = T1,
typename T3 = T1>
483 a =
static_cast<T3
>(
b /
c);
491 a =
static_cast<T3
>(d /
e);
504template <
typename T1,
typename T2 = T1>
533template <
typename T1,
typename T2 = T1,
typename T3 = T1>
541 a =
static_cast<T3
>(
b &
c);
542 a =
static_cast<T3
>(
b |
c);
543 a =
static_cast<T3
>(
b ^
c);
544 a &=
static_cast<T3
>(
c);
545 a |=
static_cast<T3
>(
c);
546 a ^=
static_cast<T3
>(
c);
554 a =
static_cast<T3
>(d &
e);
555 a =
static_cast<T3
>(d |
e);
556 a =
static_cast<T3
>(d ^
e);
557 a &=
static_cast<T3
>(
e);
558 a |=
static_cast<T3
>(
e);
559 a ^=
static_cast<T3
>(
e);
571template <
typename T1,
typename T2 = T1,
typename T3 = T1>
579 a =
static_cast<T3
>(
b[
c]);
587 a =
static_cast<T3
>(d[
e]);
679template <
typename T1,
typename T2>
696template <
unsigned int D1,
unsigned int D2>
808template <
typename T1,
typename T2>
825template <
unsigned int D1,
unsigned int D2>
851template <
unsigned int D1,
unsigned int D2>
885 static constexpr bool Integral = std::is_integral_v<T>;
956 static constexpr bool Integral = std::is_integral_v<T>;
957 static constexpr bool IsExact = std::numeric_limits<typename NumericTraits<T>::ValueType>::is_exact;
983 static constexpr bool Integral = std::is_integral_v<T>;
984 static constexpr bool IsExact = std::numeric_limits<typename NumericTraits<T>::ValueType>::is_exact;
Define additional traits for native types such as int or float.
static bool IsNegative(T val)
static constexpr T NonpositiveMin()
static bool IsPositive(T val)
static bool IsNonpositive(T val)
static bool IsNonnegative(T val)
Traits for a pixel that define the dimension and component type.
void RequireBooleanExpression(const T &t)
void IgnoreUnusedVariable(T)
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
void const_constraints(const T &b)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void const_constraints(const T &a)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_bool< false > FalseT
static constexpr bool IsExact
static constexpr bool Integral
itkConceptConstraintsMacro()
Detail::UniqueType_bool< false > FalseT
static constexpr bool Integral
itkConceptConstraintsMacro()
static constexpr bool IsExact
Detail::UniqueType_bool< true > TrueT
static constexpr bool Integral
itkConceptConstraintsMacro()
Detail::UniqueType_bool< false > FalseT
itkConceptConstraintsMacro()
static constexpr bool NonIntegral
Detail::UniqueType_bool< true > TrueT
static constexpr bool Unsigned
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void const_constraints(const T1 &d)
itkConceptConstraintsMacro()
void const_constraints(const T1 &d, const T2 &e)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
void f(Type3, int=0, int=0)
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_unsigned_int< D2 > DT2
itkConceptConstraintsMacro()
itkConceptConstraintsMacro()
Detail::UniqueType_bool< true > TrueT
static constexpr bool IsSigned
itkConceptConstraintsMacro()