![Logo](eagle.png) |
STX
1.0.0
|
Go to the documentation of this file. 33 #define CFG(param, value) STX_##param##_##value 37 #if defined(__GNUC__) // any compiler that implements the GNU compiler 39 #define STX_COMPILER_GNUC 1 41 #define STX_COMPILER_GNUC 0 44 #if defined(__clang__) 45 #define STX_COMPILER_CLANG 1 47 #define STX_COMPILER_CLANG 0 51 #define STX_COMPILER_MSVC 1 53 #define STX_COMPILER_MSVC 0 56 #if defined(__EMSCRIPTEN__) 57 #define STX_COMPILER_EMSCRIPTEN 1 59 #define STX_COMPILER_EMSCRIPTEN 0 63 #define STX_COMPILER_NVCC 1 65 #define STX_COMPILER_NVCC 0 69 #define STX_COMPILER_ARM 1 71 #define STX_COMPILER_ARM 0 74 #if defined(__INTEL_COMPILER) || defined(__ICL) 75 #define STX_COMPILER_INTEL 1 77 #define STX_COMPILER_INTEL 0 80 #if defined(__MINGW32__) || defined(__MINGW64__) 81 #define STX_COMPILER_MINGW 1 83 #define STX_COMPILER_MINGW 0 88 #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || \ 89 defined(WIN32) // Any Windows 90 #define STX_OS_WINDOWS 1 92 #define STX_OS_WINDOWS 0 95 #if defined(__unix__) || defined(unix) // UNIX 101 #if __has_include(<unistd.h>) // Posix-compliant operating system 102 #define STX_OS_POSIX 1 104 #define STX_OS_POSIX 0 107 #if defined(__linux__) || defined(__linux) || \ 108 defined(linux) // Linux and variants like Android 109 #define STX_OS_LINUX 1 111 #define STX_OS_LINUX 0 114 #if defined(__gnu_linux__) // Linux OS with GNU facilities 115 #define STX_OS_GNU_LINUX 1 117 #define STX_OS_GNU_LINUX 0 120 #if defined(__ANDROID__) // Android, Also infers STX_OS_LINUX 121 #define STX_OS_ANDROID 1 123 #define STX_OS_ANDROID 0 126 #if defined(__APPLE__) // All Apple OSs 127 #define STX_OS_APPLE 1 129 #include <Availability.h> 130 #include <TargetConditionals.h> 133 #define STX_OS_APPLE 0 136 #if defined(__APPLE__) && defined(__MACH__) // Mac OS X 137 #define STX_OS_MACOS 1 139 #define STX_OS_MACOS 0 144 #if defined(__wasi__) // WebAssembly System Interface 145 #define STX_OS_WASI 1 147 #define STX_OS_WASI 0 150 #if defined(__CYGWIN__) // Cygwin environment 151 #define STX_OS_CYGWIN 1 153 #define STX_OS_CYGWIN 0 156 #if defined(__Fuchsia__) // Fuchsia 157 #define STX_OS_FUCHSIA 1 159 #define STX_OS_FUCHSIA 0 164 #if defined(__i386__) || defined(__i386) || defined(_X86_) || \ 165 defined(_M_IX86) || defined(_M_I86) // X86 166 #define STX_ARCH_X86 1 168 #define STX_ARCH_X86 0 171 #if defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || \ 172 defined(_M_AMD64) || defined(__amd64) || defined(__amd64__) // X86_64 173 #define STX_ARCH_X86_64 1 175 #define STX_ARCH_X86_64 0 178 #if defined(__arm__) || defined(_M_ARM) // ARM 179 #define STX_ARCH_ARM32 1 181 #define STX_ARCH_ARM32 0 184 #if defined(__aarch64__) // ARM64 185 #define STX_ARCH_ARM64 1 187 #define STX_ARCH_ARM64 0 190 #if defined(__XTENSA__) // Xtensa 191 #define STX_ARCH_XTENSA 1 193 #define STX_ARCH_XTENSA 0 196 #if defined(__mips__) || defined(__mips) || defined(mips) || \ 197 defined(__MIPS__) // MIPS 198 #define STX_ARCH_MIPS 1 200 #define STX_ARCH_MIPS 0 203 #if defined(__riscv) || defined(__riscv__) // RISC-V 204 #define STX_ARCH_RISCV 1 206 #define STX_ARCH_RISCV 0 211 #if defined __has_builtin 212 #define STX_HAS_BUILTIN(feature) __has_builtin(__builtin_##feature) 214 #define STX_HAS_BUILTIN(feature) 0 218 #if __cpp_constexpr >= 201807L 219 #define STX_CXX20_DESTRUCTOR_CONSTEXPR constexpr 222 #define STX_RESULT_CONSTEXPR 1 225 #define STX_OPTION_CONSTEXPR 1 229 #define STX_CXX20_DESTRUCTOR_CONSTEXPR 232 #define STX_RESULT_CONSTEXPR 0 235 #define STX_OPTION_CONSTEXPR 0 245 #if __has_cpp_attribute(gnu::always_inline) 246 #define STX_FORCE_INLINE [[gnu::always_inline]] inline 248 #if CFG(COMPILER, MSVC) 249 #define STX_FORCE_INLINE __forceinline 251 #if CFG(COMPILER, NVCC) 252 #define STX_FORCE_INLINE __forcinline__ 254 #define STX_FORCE_INLINE inline 261 #if !__has_cpp_attribute(nodiscard) 262 #error C++ attribute `nodiscard` is not available on this compiler. Important unused function results will not raise a warning. Please upgrade to a newer version. 265 #if !__has_cpp_attribute(deprecated) 266 #error C++ attribute `deprecated` is not available on this compiler. Please upgrade to a newer version. 269 #if !__has_cpp_attribute(noreturn) 270 #error C++ function attribute `noreturn` is not available on this compiler. Please upgrade to a newer version. 275 #if CFG(OS, WINDOWS) || CFG(OS, CYGWIN) 276 #define STX_IMPORT __declspec(dllimport) 277 #define STX_EXPORT __declspec(dllexport) 280 #if __has_cpp_attribute(gnu::visibility) 281 #define STX_IMPORT [[gnu::visibility("default")]] 282 #define STX_EXPORT [[gnu::visibility("default")]] 283 #define STX_LOCAL [[gnu::visibility("hidden")]] 293 #if defined(__wasm__) // Web Assembly 294 #define STX_BINARY_WASW 1 296 #define STX_BINARY_WASW 0 299 #if defined(__ELF__) // Executable and Linkable Formats 300 #define STX_BINARY_ELF 1 302 #define STX_BINARY_ELF 0 305 #if CFG(OS, WINDOWS) // Windows Portable Executable 306 #define STX_BINARY_EXE 1 308 #define STX_BINARY_EXE 0 313 #if defined(__llvm__) 314 #define STX_TOOLCHAIN_LLVM 1 316 #define STX_TOOLCHAIN_LLVM 0 321 #define STX_VERSION v1 323 #define STX_VERSION_STRING "v1" 325 #define STX_BEGIN_NAMESPACE \ 327 inline namespace v1 { 329 #define STX_END_NAMESPACE \