24 #if defined (_MSC_VER) 25 # define ONIXS_EURONEXT_OPTIQMDG_COMPILER_INFO ("MSVS") 28 std::string compilerInfo()
31 ss <<
"gcc " << __VERSION__ <<
", std=" << __cplusplus;
34 # define ONIXS_EURONEXT_OPTIQMDG_COMPILER_INFO (compilerInfo()) 36 # define ONIXS_EURONEXT_OPTIQMDG_COMPILER_INFO ("Unknown") 39 #if !(defined(ONIXS_EURONEXT_OPTIQMDG_DOXYGEN) && ONIXS_EURONEXT_OPTIQMDG_DOXYGEN) 41 #include <OnixS/Euronext/MarketData/OptiqMdg/CompilerDetection.h> 44 #if defined(_MSC_VER) && defined(_MSVC_LANG) 45 # define ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD _MSVC_LANG 47 # define ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD __cplusplus 50 # if defined(ONIXS_EURONEXT_OPTIQMDG_CXX11) 51 # if (ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD < 201103L) 52 # error C++11 was targeted during the OnixS SDK compilation but is not detected now 56 # if defined(ONIXS_EURONEXT_OPTIQMDG_CXX14) 57 # if (ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD < 201402L) 58 # error C++14 was targeted during the OnixS SDK compilation but is not detected now 62 # if defined(ONIXS_EURONEXT_OPTIQMDG_CXX17) 63 # if (ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD < 201703L) 64 # error C++17 was targeted during the OnixS SDK compilation but is not detected now 68 # if defined(ONIXS_EURONEXT_OPTIQMDG_CXX20) 69 # if !(ONIXS_EURONEXT_OPTIQMDG_CURRENT_CXX_STD > 201703L) 70 # error C++20 was targeted during the OnixS SDK compilation but is not detected now 74 # if defined(ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU) | defined(ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_Clang) 75 # define ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU_or_Clang 78 # if defined(ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU_or_Clang) 80 # define ONIXS_EURONEXT_OPTIQMDG_LIKELY(cond) (__builtin_expect((static_cast<bool>((cond))), true)) 81 # define ONIXS_EURONEXT_OPTIQMDG_UNLIKELY(cond) (__builtin_expect((static_cast<bool>((cond))), false)) 82 # define ONIXS_EURONEXT_OPTIQMDG_UNUSED __attribute__((__unused__)) 83 # define ONIXS_EURONEXT_OPTIQMDG_MAY_ALIAS __attribute__((__may_alias__)) 84 # define ONIXS_EURONEXT_OPTIQMDG_HOTPATH __attribute__((hot)) 85 # define ONIXS_EURONEXT_OPTIQMDG_COLDPATH __attribute__((noinline,cold)) 86 # define ONIXS_EURONEXT_OPTIQMDG_NORETURN __attribute__ ((__noreturn__)) 87 # define ONIXS_EURONEXT_OPTIQMDG_NODISCARD __attribute__((warn_unused_result)) 88 # define ONIXS_EURONEXT_OPTIQMDG_PURE 90 #elif defined(ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_MSVC) 92 # define ONIXS_EURONEXT_OPTIQMDG_LIKELY(cond) ((cond)) 93 # define ONIXS_EURONEXT_OPTIQMDG_UNLIKELY(cond) ((cond)) 94 # define ONIXS_EURONEXT_OPTIQMDG_PURE 95 # define ONIXS_EURONEXT_OPTIQMDG_UNUSED 96 # define ONIXS_EURONEXT_OPTIQMDG_MAY_ALIAS 97 # define ONIXS_EURONEXT_OPTIQMDG_HOTPATH 98 # define ONIXS_EURONEXT_OPTIQMDG_COLDPATH 99 # define ONIXS_EURONEXT_OPTIQMDG_NORETURN __declspec(noreturn) 100 # define ONIXS_EURONEXT_OPTIQMDG_NODISCARD _Check_return_ 103 # error Unsupported compiler 106 # if defined(ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU) & !defined(ONIXS_EURONEXT_OPTIQMDG_CXX11) 107 # define ONIXS_EURONEXT_OPTIQMDG_GCC44_SPURIOUS_WARNING_TURNAROUND ONIXS_EURONEXT_OPTIQMDG_MAY_ALIAS 109 # define ONIXS_EURONEXT_OPTIQMDG_GCC44_SPURIOUS_WARNING_TURNAROUND 113 #if defined(ONIXS_EURONEXT_OPTIQMDG_CXX11) 115 # define ONIXS_EURONEXT_OPTIQMDG_NOTHROW noexcept 116 # define ONIXS_EURONEXT_OPTIQMDG_CHECK_NOTHROW(equation) ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT(noexcept((equation))) 117 # define ONIXS_EURONEXT_OPTIQMDG_EXPLICIT explicit 118 # define ONIXS_EURONEXT_OPTIQMDG_CONST_OR_CONSTEXPR constexpr 119 # define ONIXS_EURONEXT_OPTIQMDG_FINAL final 120 # define ONIXS_EURONEXT_OPTIQMDG_OVERRIDE override 121 # define ONIXS_EURONEXT_OPTIQMDG_CONSTEXPR constexpr 122 # define ONIXS_EURONEXT_OPTIQMDG_NULLPTR nullptr 123 # define ONIXS_EURONEXT_OPTIQMDG_DELETED_FUNCTION = delete 124 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT(X) static_assert(X, #X) 125 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_MSG(X, MSG) static_assert(X, MSG) 126 # define ONIXS_EURONEXT_OPTIQMDG_ALIGNAS(X) alignas(X) 127 # define ONIXS_EURONEXT_OPTIQMDG_DEFAULT =default 131 # define ONIXS_EURONEXT_OPTIQMDG_NOTHROW throw() 132 # define ONIXS_EURONEXT_OPTIQMDG_CHECK_NOTHROW(equation) ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT((true)) 133 # define ONIXS_EURONEXT_OPTIQMDG_EXPLICIT 134 # define ONIXS_EURONEXT_OPTIQMDG_CONST_OR_CONSTEXPR const 135 # define ONIXS_EURONEXT_OPTIQMDG_FINAL 136 # define ONIXS_EURONEXT_OPTIQMDG_OVERRIDE 137 # define ONIXS_EURONEXT_OPTIQMDG_CONSTEXPR 138 # define ONIXS_EURONEXT_OPTIQMDG_DELETED_FUNCTION 139 # define ONIXS_EURONEXT_OPTIQMDG_DEFAULT {} 142 # if defined ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU_or_Clang 143 # define ONIXS_EURONEXT_OPTIQMDG_NULLPTR __null 145 # define ONIXS_EURONEXT_OPTIQMDG_NULLPTR 0 149 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_JOIN(X, Y) ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_JOIN_IMPL(X, Y) 150 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_JOIN_IMPL(X, Y) X##Y 151 template<
bool>
struct ONIXS_ILINK3StaticAssert;
152 template<>
struct ONIXS_ILINK3StaticAssert<true>{};
153 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT(X) enum { ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_JOIN(ONIXS_ILINK3StaticAssertEnum, __LINE__) = sizeof(ONIXS_ILINK3StaticAssert<X>) } 154 # define ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_MSG(X, MSG) enum { ONIXS_EURONEXT_OPTIQMDG_STATIC_ASSERT_JOIN(ONIXS_ILINK3StaticAssertEnum, __LINE__) = sizeof(ONIXS_ILINK3StaticAssert<X>) } 157 # if defined ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_GNU_or_Clang 158 # define ONIXS_EURONEXT_OPTIQMDG_ALIGNAS(X) __attribute__ ((__aligned__(X))) 159 # elif defined ONIXS_EURONEXT_OPTIQMDG_COMPILER_IS_MSVC 160 # define ONIXS_EURONEXT_OPTIQMDG_ALIGNAS(X) __declspec(align(X)) 162 # define ONIXS_EURONEXT_OPTIQMDG_ALIGNAS(X) 168 # define ONIXS_EURONEXT_OPTIQMDG_ASSERT(CHECK) static_cast<void>((CHECK)) 170 #if defined (ONIXS_EURONEXT_OPTIQMDG_CXX11) 171 # define ONIXS_EURONEXT_OPTIQMDG_ASSERT(CHECK) ((CHECK) ? void(0) : []() {assert(!#CHECK);}()) 173 # define ONIXS_EURONEXT_OPTIQMDG_ASSERT(CHECK) (assert((CHECK))) 177 #if defined (ONIXS_EURONEXT_OPTIQMDG_CXX11) 178 # define ONIXS_EURONEXT_OPTIQMDG_HAS_TYPE_TRAITS 181 #define ONIXS_EURONEXT_OPTIQMDG_HARDWARE_DESTRUCTIVE_INTERFACE_SIZE (64) 183 #else //#if !(defined(ONIXS_DOXYGEN) && ONIXS_DOXYGEN) 185 #define ONIXS_EURONEXT_OPTIQMDG_EXPORTED 186 #define ONIXS_EURONEXT_OPTIQMDG_NOTHROW noexcept 187 #define ONIXS_EURONEXT_OPTIQMDG_EXPLICIT explicit 188 #define ONIXS_EURONEXT_OPTIQMDG_CONST_OR_CONSTEXPR constexpr 189 #define ONIXS_EURONEXT_OPTIQMDG_CONSTEXPR constexpr 190 #define ONIXS_EURONEXT_OPTIQMDG_OVERRIDE override 191 #define ONIXS_EURONEXT_OPTIQMDG_FINAL final 192 #define ONIXS_EURONEXT_OPTIQMDG_NULLPTR nullptr 194 #define ONIXS_EURONEXT_OPTIQMDG_NORETURN 195 #define ONIXS_EURONEXT_OPTIQMDG_NODISCARD 197 #define ONIXS_EURONEXT_OPTIQMDG_HOTPATH 198 #define ONIXS_EURONEXT_OPTIQMDG_COLDPATH 199 #define ONIXS_EURONEXT_OPTIQMDG_PURE 201 #define ONIXS_EURONEXT_OPTIQMDG_HAS_TYPE_TRAITS 203 #define ONIXS_EURONEXT_OPTIQMDG_HAS_GATEWAY_EMULATOR 205 #define ONIXS_EURONEXT_OPTIQMDG_CXX11 206 #define ONIXS_EURONEXT_OPTIQMDG_CXX14 207 #define ONIXS_EURONEXT_OPTIQMDG_CXX17 208 #define ONIXS_EURONEXT_OPTIQMDG_CXX20 211 #define ONIXS_EURONEXT_OPTIQMDG_UNUSED 212 #define ONIXS_EURONEXT_OPTIQMDG_DEFAULT =default 214 #define ONIXS_EURONEXT_OPTIQMDG_GCC44_SPURIOUS_WARNING_TURNAROUND