14#define HIBF_STR_HELPER(x) #x
15#define HIBF_STR(x) HIBF_STR_HELPER(x)
24#ifndef HIBF_DOXYGEN_ONLY
25# define HIBF_DOXYGEN_ONLY(x)
41#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
42# define HIBF_COMPILER_IS_GCC 1
44# define HIBF_COMPILER_IS_GCC 0
47#if HIBF_DOXYGEN_ONLY(1) 0
49# define HIBF_DISABLE_COMPILER_CHECK
56#ifndef HIBF_HAS_AVX512
57# if __AVX512F__ && __AVX512BW__
58# define HIBF_HAS_AVX512 1
60# define HIBF_HAS_AVX512 0
68#if HIBF_COMPILER_IS_GCC
70# error "At least GCC 12 is needed."
73# if (__GNUC__ == 12 && __GNUC_MINOR__ <= 2)
74# pragma warning "Be aware that GCC < 12.3 might have bugs that cause compile failure."
77# if HIBF_DOXYGEN_ONLY(1) 0
79# define HIBF_DISABLE_NEWER_COMPILER_DIAGNOSTIC
82# ifndef HIBF_DISABLE_NEWER_COMPILER_DIAGNOSTIC
85 "Your compiler is newer than the latest supported compiler version (gcc-14). It might be that compiling fails. You can disable this warning by setting -DHIBF_DISABLE_NEWER_COMPILER_DIAGNOSTIC."
94#if __has_include(<version>)
100# if (__cplusplus < 202100)
101# error "C++23 is required, make sure that you have set -std=c++23."
104# error "This is not a C++ compiler."
112#if __has_include(<hibf/version.hpp>)
115# error "HIBF include directory not set correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?"
124# define HIBF_PRAGMA(non_string_literal) _Pragma(#non_string_literal)
128#ifndef HIBF_DEPRECATED_HEADER
129# ifndef HIBF_DISABLE_DEPRECATED_WARNINGS
130# define HIBF_DEPRECATED_HEADER(message) HIBF_PRAGMA(GCC warning message)
132# define HIBF_DEPRECATED_HEADER(message)
137#ifndef HIBF_REMOVE_DEPRECATED_100
138# ifndef HIBF_DEPRECATED_100
139# ifndef HIBF_DISABLE_DEPRECATED_WARNINGS
140# define HIBF_DEPRECATED_100 \
141 [[deprecated("This will be removed in version 1.0.0; please see the documentation.")]]
143# define HIBF_DEPRECATED_100
153#if defined(__cpp_lib_constexpr_vector)
154# define HIBF_CONSTEXPR_VECTOR constexpr
156# define HIBF_CONSTEXPR_VECTOR
162#ifndef HIBF_WORKAROUND_GCC_BOGUS_MEMCPY
163# if HIBF_COMPILER_IS_GCC && (__GNUC__ == 12)
164# define HIBF_WORKAROUND_GCC_BOGUS_MEMCPY 1
166# define HIBF_WORKAROUND_GCC_BOGUS_MEMCPY 0
180#ifndef HIBF_WORKAROUND_GCC_NO_CXX11_ABI
181# if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
182# define HIBF_WORKAROUND_GCC_NO_CXX11_ABI 1
184# define HIBF_WORKAROUND_GCC_NO_CXX11_ABI 0
189#if defined(__cpp_lib_constexpr_vector) && __cpp_lib_constexpr_vector >= 201907L
190# define HIBF_WORKAROUND_LITERAL constexpr
192# define HIBF_WORKAROUND_LITERAL inline
195#if HIBF_DOXYGEN_ONLY(1) 0
197# define HIBF_DISABLE_LEGACY_STD_DIAGNOSTIC
200#if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
201# ifndef HIBF_DISABLE_LEGACY_STD_DIAGNOSTIC
203 "We do not actively support compiler that have -D_GLIBCXX_USE_CXX11_ABI=0 set, and it might be that compiling fails. It is known that all compilers of CentOS 7 / RHEL 7 set this flag by default (and that it cannot be overridden!). Note that these versions of the OSes are community-supported. You can disable this warning by setting -DHIBF_DISABLE_LEGACY_STD_DIAGNOSTIC."
213#undef HIBF_STR_HELPER
Provides version macros and global variables.