Add intrinsics headers

This commit is contained in:
Matt Borland
2023-02-17 09:06:53 -08:00
parent db46fbbe88
commit ee8d666a27

View File

@@ -64,6 +64,24 @@
#endif // Determine endianness
// Inclue intrinsics if available
#if defined(_MSC_VER)
# include <intrin.h>
# if defined(_WIN64)
# define BOOST_CHARCONV_HAS_MSVC_64BIT_INTRINSICS
# else
# define BOOST_CHARCONV_HAS_MSVC_32BIT_INTRINSICS
# endif
#elif (defined(__x86_64__) || defined(__i386__))
# include <x86intrin.h>
# define BOOST_CHARCONV_HAS_X86_INTRINSICS
#elif defined(__ARM_NEON__)
# include <arm_neon.h>
# define BOOST_CHARCONV_HAS_ARM_INTRINSICS
#else
# define BOOST_CHARCONV_HAS_NO_INTRINSICS
#endif
static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BYTE) &&
!(BOOST_CHARCONV_ENDIAN_BIG_BYTE && BOOST_CHARCONV_ENDIAN_LITTLE_BYTE),
"Inconsistent endianness detected. Please file an issue at https://github.com/cppalliance/charconv with your architecture");