diff --git a/include/boost/endian/detail/intrinsic.hpp b/include/boost/endian/detail/intrinsic.hpp index 8cc4a91..a1a83cf 100644 --- a/include/boost/endian/detail/intrinsic.hpp +++ b/include/boost/endian/detail/intrinsic.hpp @@ -7,19 +7,15 @@ #ifndef BOOST_ENDIAN_INTRINSIC_HPP #define BOOST_ENDIAN_INTRINSIC_HPP -#ifndef BOOST_DETAIL_ENDIAN_HPP -# include -#endif -#ifndef BOOST_CSTDINT_HPP -# include -#endif - #if ((defined __GNUC__ && !defined(__MINGW32__)) || defined __clang__) #include #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 bswap_16 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 bswap_32 #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_8 bswap_64 + #elif defined _MSC_VER +// Microsoft documents these as being compatible since Windows 95 and specificly +// lists runtime library support since Visual Studio 2003 (aka 7.1). #include #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_2 _byteswap_ushort #define BOOST_ENDIAN_INTRINSIC_BYTE_SWAP_4 _byteswap_ulong