19 #ifndef itkStaticAssert_h 20 #define itkStaticAssert_h 24 #if defined(ITK_HAS_CXX11_STATIC_ASSERT) 35 # define itkStaticAssert(expr, str) static_assert(expr, str) 36 #elif defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__ ) >= 403 && !defined(__clang__) && !defined( __INTEL_COMPILER ) 39 # define itkStaticAssert(expr,str) \ 40 ({extern int __attribute__((error(str))) StaticAssertFailure(); \ 41 ((void)((expr) ? 0: StaticAssertFailure()), 0); \ 46 # define ITK_JOIN(X,Y) ITK_DO_JOIN(X,Y) 47 # define ITK_DO_JOIN(X,Y) ITK_DO_JOIN2(X,Y) 48 # define ITK_DO_JOIN2(X,Y) X##Y 57 template <
bool V>
struct StaticAssertFailure;
58 template <>
struct StaticAssertFailure<true>{};
62 # define itkStaticAssert(expr,str) \ 63 enum { ITK_JOIN(static_assert_typedef, __LINE__) = sizeof(itk::StaticAssertFailure<((expr) == 0 ? false : true)>) }; 66 #endif // itkStaticAssert_h The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...