Go to the documentation of this file.
32 #if defined _WIN32 || defined __CYGWIN__
34 #define SITK_ABI_EXPORT __attribute__ ((dllexport))
35 #define SITK_ABI_IMPORT __attribute__ ((dllimport))
36 #define SITK_ABI_HIDDEN
38 #define SITK_ABI_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
39 #define SITK_ABI_IMPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
40 #define SITK_ABI_HIDDEN
44 #define SITK_ABI_EXPORT __attribute__ ((visibility ("default")))
45 #define SITK_ABI_IMPORT __attribute__ ((visibility ("default")))
46 #define SITK_ABI_HIDDEN __attribute__ ((visibility ("hidden")))
48 #define SITK_ABI_EXPORT
49 #define SITK_ABI_IMPORT
50 #define SITK_ABI_HIDDEN
55 #if __cplusplus >= 201103L
59 #define SITK_OVERRIDE override
65 #define SITK_NOEXCEPT noexcept
68 #define SITK_NOEXCEPT throw()
71 #if defined(SITK_HAS_TEMPLATE_DISAMBIGUATOR_DEPENDENT_NAME)
72 #define CLANG_TEMPLATE template
74 #define CLANG_TEMPLATE
79 #if !defined(SITK_RETURN_SELF_TYPE_HEADER)
80 #define SITK_RETURN_SELF_TYPE_HEADER Self &
87 class GenericException;
89 #define sitkExceptionMacro(x) \
91 std::ostringstream message; \
92 message << "sitk::ERROR: " x; \
93 throw ::itk::simple::GenericException(__FILE__, __LINE__, message.str().c_str()); \
96 #if defined(SITK_HAS_CXX11_NULLPTR) && !defined(SITK_HAS_TR1_SUB_INCLUDE)
97 #define SITK_NULLPTR nullptr
99 #define SITK_NULLPTR NULL
103 #define sitkMacroJoin( X, Y ) sitkDoMacroJoin( X, Y )
104 #define sitkDoMacroJoin( X, Y ) sitkDoMacroJoin2(X,Y)
105 #define sitkDoMacroJoin2( X, Y ) X##Y
107 #ifdef SITK_HAS_CXX11_STATIC_ASSERT
109 #define sitkStaticAssert( expr, str) static_assert( expr, str )
115 #define sitkStaticAssert( expr, str ) enum { sitkMacroJoin( static_assert_typedef, __LINE__) = sizeof( itk::simple::StaticAssertFailure<((expr) == 0 ? false : true )> ) };
122 #define sitkPragma(x) _Pragma (#x)
124 #if defined(__clang__) && defined(__has_warning)
125 #define sitkClangDiagnosticPush() sitkPragma( clang diagnostic push )
126 #define sitkClangDiagnosticPop() sitkPragma( clang diagnostic pop )
127 #define sitkClangWarningIgnore_0(x)
128 #define sitkClangWarningIgnore_1(x) sitkPragma( clang diagnostic ignored x)
129 #define sitkClangWarningIgnore(x) sitkMacroJoin( sitkClangWarningIgnore_, __has_warning(x) )(x)
131 #define sitkClangDiagnosticPush()
132 #define sitkClangDiagnosticPop()
133 #define sitkClangWarningIgnore(x)