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::*) ( ) > \ 62 typedef Enforcer< & Constraints::constraints > EnforcerInstantiation 63 #define itkConceptMacro(name, concept) enum { name = sizeof concept } 65 #elif defined( ITK_CONCEPT_IMPLEMENTATION_VTABLE ) 72 #define itkConceptConstraintsMacro() \ 73 virtual void Enforcer() { &Constraints::constraints; } 74 #define itkConceptMacro(name, concept) enum { name = sizeof concept } 77 #elif defined( ITK_CONCEPT_IMPLEMENTATION_CALL ) 80 #define itkConceptConstraintsMacro() 81 #define itkConceptMacro(name, concept) enum { name = 0 } 86 #define itkConceptConstraintsMacro() 87 #define itkConceptMacro(name, concept) enum { name = 0 } 107 template<
typename T >
111 template<
unsigned int >
121 template<
typename T >
129 template<
typename T >
139 template<
typename T >
154 template<
typename T >
163 const_constraints(a);
183 template<
typename T1,
typename T2 >
188 T2 b =
static_cast< T2
>( a );
199 template<
typename T >
205 const_constraints(a);
222 template<
typename T1,
typename T2 = T1 >
241 template<
typename T1,
typename T2 = T1 >
260 template<
typename T1,
typename T2 = T1 >
266 CLANG_SUPPRESS_Wfloat_equal
282 template<
typename T1,
typename T2 = T1 >
292 CLANG_SUPPRESS_Wfloat_equal
308 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
313 a =
static_cast< T3
>( b + c );
314 a =
static_cast< T3
>( b - c );
315 const_constraints(b, c);
321 a =
static_cast< T3
>( d +
e );
322 a =
static_cast< T3
>( d -
e );
336 template<
typename T1,
typename T2 = T1>
343 const_constraints(c);
361 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
366 a =
static_cast< T3
>( b * c );
367 const_constraints(b, c);
373 a =
static_cast< T3
>( d *
e );
384 template<
typename T1,
typename T2 = T1 >
390 const_constraints(b);
407 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
412 a =
static_cast< T3
>( b / c );
413 const_constraints(b, c);
419 a =
static_cast< T3
>( d /
e );
432 template<
typename T1,
typename T2 = T1 >
438 const_constraints(c);
457 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
462 a =
static_cast< T3
>( b & c );
463 a =
static_cast< T3
>( b | c );
464 a =
static_cast< T3
>( b ^ c );
465 a &=
static_cast< T3
>( c );
466 a |=
static_cast< T3
>( c );
467 a ^=
static_cast< T3
>( c );
468 const_constraints(b, c);
474 a =
static_cast< T3
>( d &
e );
475 a =
static_cast< T3
>( d |
e );
476 a =
static_cast< T3
>( d ^
e );
477 a &=
static_cast< T3
>(
e );
478 a |=
static_cast< T3
>(
e );
479 a ^=
static_cast< T3
>(
e );
491 template<
typename T1,
typename T2 = T1,
typename T3 = T1 >
496 a =
static_cast< T3
>( b[c] );
497 const_constraints(b, c);
503 a =
static_cast< T3
>( d[
e] );
515 template<
typename T >
530 template<
typename T >
548 template<
typename T >
563 template<
typename T >
583 template<
typename T1,
typename T2 >
597 template<
unsigned int D1,
unsigned int D2 >
614 template<
typename T >
649 template<
typename T >
665 template<
typename T >
679 template<
typename T >
695 template<
typename T1,
typename T2 >
709 template<
unsigned int D1,
unsigned int D2 >
716 void f(Type2,
int = 0) {}
728 template<
unsigned int D1,
unsigned int D2 >
736 void f(Type2,
int = 0) {}
737 void f(Type3,
int = 0,
int = 0) {}
749 template<
typename T >
758 IntegralT a = TrueT();
770 template<
typename T >
779 UnsignedT a = TrueT();
791 template<
typename T >
800 NonIntegralT a = FalseT();
811 template<
typename T >
822 IntegralT a = FalseT();
835 template<
typename T >
847 IntegralT a = FalseT();
Detail::UniqueType_bool< itkGetStaticConstMacro(IsExact) > ExactT
void const_constraints(const T1 &d)
Detail::UniqueType_bool< false > FalseT
Detail::UniqueType_unsigned_int< D1-1 > Type2
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
Detail::UniqueType_unsigned_int< D1 > DT1
void const_constraints(const T1 &d, const T2 &e)
void f(Type3, int=0, int=0)
void const_constraints(const T1 &d, const T2 &e)
void const_constraints(const T1 &d)
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_bool< true > TrueT
#define itkConceptConstraintsMacro()
void const_constraints(const T1 &d)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Detail::UniqueType_unsigned_int< D1-2 > Type3
void const_constraints(const T1 &d, const T2 &e)
static bool IsPositive(T val)
Traits for a pixel that define the dimension and component type.
void RequireBooleanExpression(const T &t)
static ITK_CONSTEXPR double e
The base of the natural logarithm or Euler's number
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
static bool IsNonnegative(T val)
void IgnoreUnusedVariable(T)
void const_constraints(const T &a)
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_unsigned_int< D2 > DT2
static bool IsNegative(T val)
void const_constraints(const T1 &d, const T2 &e)
void const_constraints(const T &b)
Detail::UniqueType_bool< itkGetStaticConstMacro(IsExact) > ExactT
void const_constraints(const T1 &d, const T2 &e)
Detail::UniqueType_bool< itkGetStaticConstMacro(Unsigned) > UnsignedT
Detail::UniqueType_bool< false > FalseT
static ITK_CONSTEXPR_FUNC T NonpositiveMin()
Detail::UniqueType_unsigned_int< D1 > Type1
Detail::UniqueType_bool< itkGetStaticConstMacro(NonIntegral) > NonIntegralT
static bool IsNonpositive(T val)
Detail::UniqueType_unsigned_int< D1 > Type1
Detail::UniqueType_bool< true > TrueT
Detail::UniqueType_bool< false > FalseT
Detail::UniqueType_bool< itkGetStaticConstMacro(Integral) > IntegralT
Detail::UniqueType_unsigned_int< D1-1 > Type2
Define additional traits for native types such as int or float.
Detail::UniqueType_bool< itkGetStaticConstMacro(IsSigned) > SignedT