diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-17 04:57:52 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2023-12-17 05:13:23 +0300 |
commit | e0fee3f62fb672ae80623ec56a78649a8acc1fdd (patch) | |
tree | 25a1a53d025091714cdde19a4d6e5c468a77bccf /contrib/restricted/boost/endian | |
parent | ccf253b4b872123cb2f95d9a3098aa66a59a624b (diff) | |
download | ydb-e0fee3f62fb672ae80623ec56a78649a8acc1fdd.tar.gz |
Update contrib/restricted/boost/endian to 1.84.0
Diffstat (limited to 'contrib/restricted/boost/endian')
19 files changed, 525 insertions, 561 deletions
diff --git a/contrib/restricted/boost/endian/CMakeLists.darwin-x86_64.txt b/contrib/restricted/boost/endian/CMakeLists.darwin-x86_64.txt index ddf28f75fe..f0de7c6388 100644 --- a/contrib/restricted/boost/endian/CMakeLists.darwin-x86_64.txt +++ b/contrib/restricted/boost/endian/CMakeLists.darwin-x86_64.txt @@ -14,7 +14,4 @@ target_include_directories(restricted-boost-endian INTERFACE target_link_libraries(restricted-boost-endian INTERFACE contrib-libs-cxxsupp restricted-boost-config - restricted-boost-core - restricted-boost-static_assert - restricted-boost-type_traits ) diff --git a/contrib/restricted/boost/endian/CMakeLists.linux-x86_64.txt b/contrib/restricted/boost/endian/CMakeLists.linux-x86_64.txt index 8a7f037fd7..e800bcd3d0 100644 --- a/contrib/restricted/boost/endian/CMakeLists.linux-x86_64.txt +++ b/contrib/restricted/boost/endian/CMakeLists.linux-x86_64.txt @@ -15,7 +15,4 @@ target_link_libraries(restricted-boost-endian INTERFACE contrib-libs-linux-headers contrib-libs-cxxsupp restricted-boost-config - restricted-boost-core - restricted-boost-static_assert - restricted-boost-type_traits ) diff --git a/contrib/restricted/boost/endian/CMakeLists.windows-x86_64.txt b/contrib/restricted/boost/endian/CMakeLists.windows-x86_64.txt index ddf28f75fe..f0de7c6388 100644 --- a/contrib/restricted/boost/endian/CMakeLists.windows-x86_64.txt +++ b/contrib/restricted/boost/endian/CMakeLists.windows-x86_64.txt @@ -14,7 +14,4 @@ target_include_directories(restricted-boost-endian INTERFACE target_link_libraries(restricted-boost-endian INTERFACE contrib-libs-cxxsupp restricted-boost-config - restricted-boost-core - restricted-boost-static_assert - restricted-boost-type_traits ) diff --git a/contrib/restricted/boost/endian/README.md b/contrib/restricted/boost/endian/README.md index cbd15e2261..d40e630aba 100644 --- a/contrib/restricted/boost/endian/README.md +++ b/contrib/restricted/boost/endian/README.md @@ -7,12 +7,14 @@ It's part of Boost since release 1.58.0. See ## Supported compilers -* g++ 4.4 or later -* clang++ 3.3 or later -* Visual Studio 2008 or later +* g++ 4.6 or later +* clang++ 3.9 or later +* Visual Studio 2012 or later -Tested on [Travis](https://travis-ci.org/boostorg/endian/) and -[Appveyor](https://ci.appveyor.com/project/pdimov/endian/). +C++11 is required since release 1.84. + +Tested on [Github Actions](https://github.com/boostorg/endian/actions) +and [Appveyor](https://ci.appveyor.com/project/pdimov/endian/). ## License diff --git a/contrib/restricted/boost/endian/include/boost/endian/arithmetic.hpp b/contrib/restricted/boost/endian/include/boost/endian/arithmetic.hpp index fc9f8a1e7f..e771e06f7b 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/arithmetic.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/arithmetic.hpp @@ -27,13 +27,10 @@ # pragma warning(disable:4365) // conversion ... signed/unsigned mismatch #endif -#include <boost/endian/detail/requires_cxx11.hpp> #include <boost/endian/buffers.hpp> -#include <boost/core/scoped_enum.hpp> -#include <boost/static_assert.hpp> -#include <boost/cstdint.hpp> +#include <boost/endian/detail/static_assert.hpp> #include <boost/config.hpp> -#include <boost/config/workaround.hpp> +#include <cstdint> #include <iosfwd> #include <climits> @@ -45,17 +42,6 @@ # error Platforms with CHAR_BIT != 8 are not supported # endif -# ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_ENDIAN_DEFAULT_CONSTRUCT {} // C++03 -# else -# define BOOST_ENDIAN_DEFAULT_CONSTRUCT = default; // C++0x -# endif - -// g++ pre-4.6 does not support unrestricted unions, but we have no Config macro for that -# if (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || BOOST_WORKAROUND(BOOST_GCC, < 40600)) && defined(BOOST_ENDIAN_FORCE_PODNESS) -# define BOOST_ENDIAN_NO_CTORS -# endif - # ifndef BOOST_ENDIAN_EXPLICIT_CTORS # define BOOST_ENDIAN_EXPLICIT_OPT # else @@ -69,33 +55,33 @@ namespace boost namespace endian { - template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits, - BOOST_SCOPED_ENUM(align) Align = align::no> + template <order Order, class T, std::size_t n_bits, + align Align = align::no> class endian_arithmetic; // big endian signed integer aligned types - typedef endian_arithmetic<order::big, int8_t, 8, align::yes> big_int8_at; - typedef endian_arithmetic<order::big, int16_t, 16, align::yes> big_int16_at; - typedef endian_arithmetic<order::big, int32_t, 32, align::yes> big_int32_at; - typedef endian_arithmetic<order::big, int64_t, 64, align::yes> big_int64_at; + typedef endian_arithmetic<order::big, std::int8_t, 8, align::yes> big_int8_at; + typedef endian_arithmetic<order::big, std::int16_t, 16, align::yes> big_int16_at; + typedef endian_arithmetic<order::big, std::int32_t, 32, align::yes> big_int32_at; + typedef endian_arithmetic<order::big, std::int64_t, 64, align::yes> big_int64_at; // big endian unsigned integer aligned types - typedef endian_arithmetic<order::big, uint8_t, 8, align::yes> big_uint8_at; - typedef endian_arithmetic<order::big, uint16_t, 16, align::yes> big_uint16_at; - typedef endian_arithmetic<order::big, uint32_t, 32, align::yes> big_uint32_at; - typedef endian_arithmetic<order::big, uint64_t, 64, align::yes> big_uint64_at; + typedef endian_arithmetic<order::big, std::uint8_t, 8, align::yes> big_uint8_at; + typedef endian_arithmetic<order::big, std::uint16_t, 16, align::yes> big_uint16_at; + typedef endian_arithmetic<order::big, std::uint32_t, 32, align::yes> big_uint32_at; + typedef endian_arithmetic<order::big, std::uint64_t, 64, align::yes> big_uint64_at; // little endian signed integer aligned types - typedef endian_arithmetic<order::little, int8_t, 8, align::yes> little_int8_at; - typedef endian_arithmetic<order::little, int16_t, 16, align::yes> little_int16_at; - typedef endian_arithmetic<order::little, int32_t, 32, align::yes> little_int32_at; - typedef endian_arithmetic<order::little, int64_t, 64, align::yes> little_int64_at; + typedef endian_arithmetic<order::little, std::int8_t, 8, align::yes> little_int8_at; + typedef endian_arithmetic<order::little, std::int16_t, 16, align::yes> little_int16_at; + typedef endian_arithmetic<order::little, std::int32_t, 32, align::yes> little_int32_at; + typedef endian_arithmetic<order::little, std::int64_t, 64, align::yes> little_int64_at; // little endian unsigned integer aligned types - typedef endian_arithmetic<order::little, uint8_t, 8, align::yes> little_uint8_at; - typedef endian_arithmetic<order::little, uint16_t, 16, align::yes> little_uint16_at; - typedef endian_arithmetic<order::little, uint32_t, 32, align::yes> little_uint32_at; - typedef endian_arithmetic<order::little, uint64_t, 64, align::yes> little_uint64_at; + typedef endian_arithmetic<order::little, std::uint8_t, 8, align::yes> little_uint8_at; + typedef endian_arithmetic<order::little, std::uint16_t, 16, align::yes> little_uint16_at; + typedef endian_arithmetic<order::little, std::uint32_t, 32, align::yes> little_uint32_at; + typedef endian_arithmetic<order::little, std::uint64_t, 64, align::yes> little_uint64_at; // aligned floating point types typedef endian_arithmetic<order::big, float, 32, align::yes> big_float32_at; @@ -107,64 +93,64 @@ namespace endian // <cstdint> types are superior for this use case // big endian signed integer unaligned types - typedef endian_arithmetic<order::big, int_least8_t, 8> big_int8_t; - typedef endian_arithmetic<order::big, int_least16_t, 16> big_int16_t; - typedef endian_arithmetic<order::big, int_least32_t, 24> big_int24_t; - typedef endian_arithmetic<order::big, int_least32_t, 32> big_int32_t; - typedef endian_arithmetic<order::big, int_least64_t, 40> big_int40_t; - typedef endian_arithmetic<order::big, int_least64_t, 48> big_int48_t; - typedef endian_arithmetic<order::big, int_least64_t, 56> big_int56_t; - typedef endian_arithmetic<order::big, int_least64_t, 64> big_int64_t; + typedef endian_arithmetic<order::big, std::int_least8_t, 8> big_int8_t; + typedef endian_arithmetic<order::big, std::int_least16_t, 16> big_int16_t; + typedef endian_arithmetic<order::big, std::int_least32_t, 24> big_int24_t; + typedef endian_arithmetic<order::big, std::int_least32_t, 32> big_int32_t; + typedef endian_arithmetic<order::big, std::int_least64_t, 40> big_int40_t; + typedef endian_arithmetic<order::big, std::int_least64_t, 48> big_int48_t; + typedef endian_arithmetic<order::big, std::int_least64_t, 56> big_int56_t; + typedef endian_arithmetic<order::big, std::int_least64_t, 64> big_int64_t; // big endian unsigned integer unaligned types - typedef endian_arithmetic<order::big, uint_least8_t, 8> big_uint8_t; - typedef endian_arithmetic<order::big, uint_least16_t, 16> big_uint16_t; - typedef endian_arithmetic<order::big, uint_least32_t, 24> big_uint24_t; - typedef endian_arithmetic<order::big, uint_least32_t, 32> big_uint32_t; - typedef endian_arithmetic<order::big, uint_least64_t, 40> big_uint40_t; - typedef endian_arithmetic<order::big, uint_least64_t, 48> big_uint48_t; - typedef endian_arithmetic<order::big, uint_least64_t, 56> big_uint56_t; - typedef endian_arithmetic<order::big, uint_least64_t, 64> big_uint64_t; + typedef endian_arithmetic<order::big, std::uint_least8_t, 8> big_uint8_t; + typedef endian_arithmetic<order::big, std::uint_least16_t, 16> big_uint16_t; + typedef endian_arithmetic<order::big, std::uint_least32_t, 24> big_uint24_t; + typedef endian_arithmetic<order::big, std::uint_least32_t, 32> big_uint32_t; + typedef endian_arithmetic<order::big, std::uint_least64_t, 40> big_uint40_t; + typedef endian_arithmetic<order::big, std::uint_least64_t, 48> big_uint48_t; + typedef endian_arithmetic<order::big, std::uint_least64_t, 56> big_uint56_t; + typedef endian_arithmetic<order::big, std::uint_least64_t, 64> big_uint64_t; // little endian signed integer unaligned types - typedef endian_arithmetic<order::little, int_least8_t, 8> little_int8_t; - typedef endian_arithmetic<order::little, int_least16_t, 16> little_int16_t; - typedef endian_arithmetic<order::little, int_least32_t, 24> little_int24_t; - typedef endian_arithmetic<order::little, int_least32_t, 32> little_int32_t; - typedef endian_arithmetic<order::little, int_least64_t, 40> little_int40_t; - typedef endian_arithmetic<order::little, int_least64_t, 48> little_int48_t; - typedef endian_arithmetic<order::little, int_least64_t, 56> little_int56_t; - typedef endian_arithmetic<order::little, int_least64_t, 64> little_int64_t; + typedef endian_arithmetic<order::little, std::int_least8_t, 8> little_int8_t; + typedef endian_arithmetic<order::little, std::int_least16_t, 16> little_int16_t; + typedef endian_arithmetic<order::little, std::int_least32_t, 24> little_int24_t; + typedef endian_arithmetic<order::little, std::int_least32_t, 32> little_int32_t; + typedef endian_arithmetic<order::little, std::int_least64_t, 40> little_int40_t; + typedef endian_arithmetic<order::little, std::int_least64_t, 48> little_int48_t; + typedef endian_arithmetic<order::little, std::int_least64_t, 56> little_int56_t; + typedef endian_arithmetic<order::little, std::int_least64_t, 64> little_int64_t; // little endian unsigned integer unaligned types - typedef endian_arithmetic<order::little, uint_least8_t, 8> little_uint8_t; - typedef endian_arithmetic<order::little, uint_least16_t, 16> little_uint16_t; - typedef endian_arithmetic<order::little, uint_least32_t, 24> little_uint24_t; - typedef endian_arithmetic<order::little, uint_least32_t, 32> little_uint32_t; - typedef endian_arithmetic<order::little, uint_least64_t, 40> little_uint40_t; - typedef endian_arithmetic<order::little, uint_least64_t, 48> little_uint48_t; - typedef endian_arithmetic<order::little, uint_least64_t, 56> little_uint56_t; - typedef endian_arithmetic<order::little, uint_least64_t, 64> little_uint64_t; + typedef endian_arithmetic<order::little, std::uint_least8_t, 8> little_uint8_t; + typedef endian_arithmetic<order::little, std::uint_least16_t, 16> little_uint16_t; + typedef endian_arithmetic<order::little, std::uint_least32_t, 24> little_uint24_t; + typedef endian_arithmetic<order::little, std::uint_least32_t, 32> little_uint32_t; + typedef endian_arithmetic<order::little, std::uint_least64_t, 40> little_uint40_t; + typedef endian_arithmetic<order::little, std::uint_least64_t, 48> little_uint48_t; + typedef endian_arithmetic<order::little, std::uint_least64_t, 56> little_uint56_t; + typedef endian_arithmetic<order::little, std::uint_least64_t, 64> little_uint64_t; // native endian signed integer unaligned types - typedef endian_arithmetic<order::native, int_least8_t, 8> native_int8_t; - typedef endian_arithmetic<order::native, int_least16_t, 16> native_int16_t; - typedef endian_arithmetic<order::native, int_least32_t, 24> native_int24_t; - typedef endian_arithmetic<order::native, int_least32_t, 32> native_int32_t; - typedef endian_arithmetic<order::native, int_least64_t, 40> native_int40_t; - typedef endian_arithmetic<order::native, int_least64_t, 48> native_int48_t; - typedef endian_arithmetic<order::native, int_least64_t, 56> native_int56_t; - typedef endian_arithmetic<order::native, int_least64_t, 64> native_int64_t; + typedef endian_arithmetic<order::native, std::int_least8_t, 8> native_int8_t; + typedef endian_arithmetic<order::native, std::int_least16_t, 16> native_int16_t; + typedef endian_arithmetic<order::native, std::int_least32_t, 24> native_int24_t; + typedef endian_arithmetic<order::native, std::int_least32_t, 32> native_int32_t; + typedef endian_arithmetic<order::native, std::int_least64_t, 40> native_int40_t; + typedef endian_arithmetic<order::native, std::int_least64_t, 48> native_int48_t; + typedef endian_arithmetic<order::native, std::int_least64_t, 56> native_int56_t; + typedef endian_arithmetic<order::native, std::int_least64_t, 64> native_int64_t; // native endian unsigned integer unaligned types - typedef endian_arithmetic<order::native, uint_least8_t, 8> native_uint8_t; - typedef endian_arithmetic<order::native, uint_least16_t, 16> native_uint16_t; - typedef endian_arithmetic<order::native, uint_least32_t, 24> native_uint24_t; - typedef endian_arithmetic<order::native, uint_least32_t, 32> native_uint32_t; - typedef endian_arithmetic<order::native, uint_least64_t, 40> native_uint40_t; - typedef endian_arithmetic<order::native, uint_least64_t, 48> native_uint48_t; - typedef endian_arithmetic<order::native, uint_least64_t, 56> native_uint56_t; - typedef endian_arithmetic<order::native, uint_least64_t, 64> native_uint64_t; + typedef endian_arithmetic<order::native, std::uint_least8_t, 8> native_uint8_t; + typedef endian_arithmetic<order::native, std::uint_least16_t, 16> native_uint16_t; + typedef endian_arithmetic<order::native, std::uint_least32_t, 24> native_uint24_t; + typedef endian_arithmetic<order::native, std::uint_least32_t, 32> native_uint32_t; + typedef endian_arithmetic<order::native, std::uint_least64_t, 40> native_uint40_t; + typedef endian_arithmetic<order::native, std::uint_least64_t, 48> native_uint48_t; + typedef endian_arithmetic<order::native, std::uint_least64_t, 56> native_uint56_t; + typedef endian_arithmetic<order::native, std::uint_least64_t, 64> native_uint64_t; // unaligned floating point types typedef endian_arithmetic<order::big, float, 32, align::no> big_float32_t; @@ -176,8 +162,8 @@ namespace endian //---------------------------------- end synopsis ------------------------------------// -template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits, - BOOST_SCOPED_ENUM(align) Align> +template <order Order, class T, std::size_t n_bits, + align Align> class endian_arithmetic { private: @@ -198,7 +184,7 @@ public: #ifndef BOOST_ENDIAN_NO_CTORS - endian_arithmetic() BOOST_ENDIAN_DEFAULT_CONSTRUCT + endian_arithmetic() = default; BOOST_ENDIAN_EXPLICIT_OPT endian_arithmetic( T val ) BOOST_NOEXCEPT: buf_( val ) { diff --git a/contrib/restricted/boost/endian/include/boost/endian/buffers.hpp b/contrib/restricted/boost/endian/include/boost/endian/buffers.hpp index d0278c82ae..92701df5de 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/buffers.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/buffers.hpp @@ -27,14 +27,11 @@ # pragma warning(disable: 4127) // conditional expression is constant #endif -#include <boost/endian/detail/requires_cxx11.hpp> #include <boost/endian/detail/endian_store.hpp> #include <boost/endian/detail/endian_load.hpp> -#include <boost/core/scoped_enum.hpp> -#include <boost/static_assert.hpp> -#include <boost/cstdint.hpp> +#include <boost/endian/detail/static_assert.hpp> #include <boost/config.hpp> -#include <boost/config/workaround.hpp> +#include <cstdint> #include <iosfwd> #include <climits> #include <cstring> @@ -47,17 +44,6 @@ # error Platforms with CHAR_BIT != 8 are not supported # endif -# ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_ENDIAN_DEFAULT_CONSTRUCT {} // C++03 -# else -# define BOOST_ENDIAN_DEFAULT_CONSTRUCT = default; // C++0x -# endif - -// g++ pre-4.6 does not support unrestricted unions, but we have no Config macro for that -# if (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || BOOST_WORKAROUND(BOOST_GCC, < 40600)) && defined(BOOST_ENDIAN_FORCE_PODNESS) -# define BOOST_ENDIAN_NO_CTORS -# endif - //---------------------------------- synopsis ----------------------------------------// namespace boost @@ -65,40 +51,40 @@ namespace boost namespace endian { - BOOST_SCOPED_ENUM_START(align) + enum class align {no, yes # ifdef BOOST_ENDIAN_DEPRECATED_NAMES , unaligned = no, aligned = yes # endif - }; BOOST_SCOPED_ENUM_END + }; - template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits, - BOOST_SCOPED_ENUM(align) A = align::no> + template <order Order, class T, std::size_t n_bits, + align A = align::no> class endian_buffer; // aligned big endian signed integer buffers - typedef endian_buffer<order::big, int8_t, 8, align::yes> big_int8_buf_at; - typedef endian_buffer<order::big, int16_t, 16, align::yes> big_int16_buf_at; - typedef endian_buffer<order::big, int32_t, 32, align::yes> big_int32_buf_at; - typedef endian_buffer<order::big, int64_t, 64, align::yes> big_int64_buf_at; + typedef endian_buffer<order::big, std::int8_t, 8, align::yes> big_int8_buf_at; + typedef endian_buffer<order::big, std::int16_t, 16, align::yes> big_int16_buf_at; + typedef endian_buffer<order::big, std::int32_t, 32, align::yes> big_int32_buf_at; + typedef endian_buffer<order::big, std::int64_t, 64, align::yes> big_int64_buf_at; // aligned big endian unsigned integer buffers - typedef endian_buffer<order::big, uint8_t, 8, align::yes> big_uint8_buf_at; - typedef endian_buffer<order::big, uint16_t, 16, align::yes> big_uint16_buf_at; - typedef endian_buffer<order::big, uint32_t, 32, align::yes> big_uint32_buf_at; - typedef endian_buffer<order::big, uint64_t, 64, align::yes> big_uint64_buf_at; + typedef endian_buffer<order::big, std::uint8_t, 8, align::yes> big_uint8_buf_at; + typedef endian_buffer<order::big, std::uint16_t, 16, align::yes> big_uint16_buf_at; + typedef endian_buffer<order::big, std::uint32_t, 32, align::yes> big_uint32_buf_at; + typedef endian_buffer<order::big, std::uint64_t, 64, align::yes> big_uint64_buf_at; // aligned little endian signed integer buffers - typedef endian_buffer<order::little, int8_t, 8, align::yes> little_int8_buf_at; - typedef endian_buffer<order::little, int16_t, 16, align::yes> little_int16_buf_at; - typedef endian_buffer<order::little, int32_t, 32, align::yes> little_int32_buf_at; - typedef endian_buffer<order::little, int64_t, 64, align::yes> little_int64_buf_at; + typedef endian_buffer<order::little, std::int8_t, 8, align::yes> little_int8_buf_at; + typedef endian_buffer<order::little, std::int16_t, 16, align::yes> little_int16_buf_at; + typedef endian_buffer<order::little, std::int32_t, 32, align::yes> little_int32_buf_at; + typedef endian_buffer<order::little, std::int64_t, 64, align::yes> little_int64_buf_at; // aligned little endian unsigned integer buffers - typedef endian_buffer<order::little, uint8_t, 8, align::yes> little_uint8_buf_at; - typedef endian_buffer<order::little, uint16_t, 16, align::yes> little_uint16_buf_at; - typedef endian_buffer<order::little, uint32_t, 32, align::yes> little_uint32_buf_at; - typedef endian_buffer<order::little, uint64_t, 64, align::yes> little_uint64_buf_at; + typedef endian_buffer<order::little, std::uint8_t, 8, align::yes> little_uint8_buf_at; + typedef endian_buffer<order::little, std::uint16_t, 16, align::yes> little_uint16_buf_at; + typedef endian_buffer<order::little, std::uint32_t, 32, align::yes> little_uint32_buf_at; + typedef endian_buffer<order::little, std::uint64_t, 64, align::yes> little_uint64_buf_at; // aligned floating point buffers typedef endian_buffer<order::big, float, 32, align::yes> big_float32_buf_at; @@ -110,64 +96,64 @@ namespace endian // <cstdint> types are superior for this use case // unaligned big endian signed integer buffers - typedef endian_buffer<order::big, int_least8_t, 8> big_int8_buf_t; - typedef endian_buffer<order::big, int_least16_t, 16> big_int16_buf_t; - typedef endian_buffer<order::big, int_least32_t, 24> big_int24_buf_t; - typedef endian_buffer<order::big, int_least32_t, 32> big_int32_buf_t; - typedef endian_buffer<order::big, int_least64_t, 40> big_int40_buf_t; - typedef endian_buffer<order::big, int_least64_t, 48> big_int48_buf_t; - typedef endian_buffer<order::big, int_least64_t, 56> big_int56_buf_t; - typedef endian_buffer<order::big, int_least64_t, 64> big_int64_buf_t; + typedef endian_buffer<order::big, std::int_least8_t, 8> big_int8_buf_t; + typedef endian_buffer<order::big, std::int_least16_t, 16> big_int16_buf_t; + typedef endian_buffer<order::big, std::int_least32_t, 24> big_int24_buf_t; + typedef endian_buffer<order::big, std::int_least32_t, 32> big_int32_buf_t; + typedef endian_buffer<order::big, std::int_least64_t, 40> big_int40_buf_t; + typedef endian_buffer<order::big, std::int_least64_t, 48> big_int48_buf_t; + typedef endian_buffer<order::big, std::int_least64_t, 56> big_int56_buf_t; + typedef endian_buffer<order::big, std::int_least64_t, 64> big_int64_buf_t; // unaligned big endian unsigned integer buffers - typedef endian_buffer<order::big, uint_least8_t, 8> big_uint8_buf_t; - typedef endian_buffer<order::big, uint_least16_t, 16> big_uint16_buf_t; - typedef endian_buffer<order::big, uint_least32_t, 24> big_uint24_buf_t; - typedef endian_buffer<order::big, uint_least32_t, 32> big_uint32_buf_t; - typedef endian_buffer<order::big, uint_least64_t, 40> big_uint40_buf_t; - typedef endian_buffer<order::big, uint_least64_t, 48> big_uint48_buf_t; - typedef endian_buffer<order::big, uint_least64_t, 56> big_uint56_buf_t; - typedef endian_buffer<order::big, uint_least64_t, 64> big_uint64_buf_t; + typedef endian_buffer<order::big, std::uint_least8_t, 8> big_uint8_buf_t; + typedef endian_buffer<order::big, std::uint_least16_t, 16> big_uint16_buf_t; + typedef endian_buffer<order::big, std::uint_least32_t, 24> big_uint24_buf_t; + typedef endian_buffer<order::big, std::uint_least32_t, 32> big_uint32_buf_t; + typedef endian_buffer<order::big, std::uint_least64_t, 40> big_uint40_buf_t; + typedef endian_buffer<order::big, std::uint_least64_t, 48> big_uint48_buf_t; + typedef endian_buffer<order::big, std::uint_least64_t, 56> big_uint56_buf_t; + typedef endian_buffer<order::big, std::uint_least64_t, 64> big_uint64_buf_t; // unaligned little endian signed integer buffers - typedef endian_buffer<order::little, int_least8_t, 8> little_int8_buf_t; - typedef endian_buffer<order::little, int_least16_t, 16> little_int16_buf_t; - typedef endian_buffer<order::little, int_least32_t, 24> little_int24_buf_t; - typedef endian_buffer<order::little, int_least32_t, 32> little_int32_buf_t; - typedef endian_buffer<order::little, int_least64_t, 40> little_int40_buf_t; - typedef endian_buffer<order::little, int_least64_t, 48> little_int48_buf_t; - typedef endian_buffer<order::little, int_least64_t, 56> little_int56_buf_t; - typedef endian_buffer<order::little, int_least64_t, 64> little_int64_buf_t; + typedef endian_buffer<order::little, std::int_least8_t, 8> little_int8_buf_t; + typedef endian_buffer<order::little, std::int_least16_t, 16> little_int16_buf_t; + typedef endian_buffer<order::little, std::int_least32_t, 24> little_int24_buf_t; + typedef endian_buffer<order::little, std::int_least32_t, 32> little_int32_buf_t; + typedef endian_buffer<order::little, std::int_least64_t, 40> little_int40_buf_t; + typedef endian_buffer<order::little, std::int_least64_t, 48> little_int48_buf_t; + typedef endian_buffer<order::little, std::int_least64_t, 56> little_int56_buf_t; + typedef endian_buffer<order::little, std::int_least64_t, 64> little_int64_buf_t; // unaligned little endian unsigned integer buffers - typedef endian_buffer<order::little, uint_least8_t, 8> little_uint8_buf_t; - typedef endian_buffer<order::little, uint_least16_t, 16> little_uint16_buf_t; - typedef endian_buffer<order::little, uint_least32_t, 24> little_uint24_buf_t; - typedef endian_buffer<order::little, uint_least32_t, 32> little_uint32_buf_t; - typedef endian_buffer<order::little, uint_least64_t, 40> little_uint40_buf_t; - typedef endian_buffer<order::little, uint_least64_t, 48> little_uint48_buf_t; - typedef endian_buffer<order::little, uint_least64_t, 56> little_uint56_buf_t; - typedef endian_buffer<order::little, uint_least64_t, 64> little_uint64_buf_t; + typedef endian_buffer<order::little, std::uint_least8_t, 8> little_uint8_buf_t; + typedef endian_buffer<order::little, std::uint_least16_t, 16> little_uint16_buf_t; + typedef endian_buffer<order::little, std::uint_least32_t, 24> little_uint24_buf_t; + typedef endian_buffer<order::little, std::uint_least32_t, 32> little_uint32_buf_t; + typedef endian_buffer<order::little, std::uint_least64_t, 40> little_uint40_buf_t; + typedef endian_buffer<order::little, std::uint_least64_t, 48> little_uint48_buf_t; + typedef endian_buffer<order::little, std::uint_least64_t, 56> little_uint56_buf_t; + typedef endian_buffer<order::little, std::uint_least64_t, 64> little_uint64_buf_t; // unaligned native endian signed integer buffers - typedef endian_buffer<order::native, int_least8_t, 8> native_int8_buf_t; - typedef endian_buffer<order::native, int_least16_t, 16> native_int16_buf_t; - typedef endian_buffer<order::native, int_least32_t, 24> native_int24_buf_t; - typedef endian_buffer<order::native, int_least32_t, 32> native_int32_buf_t; - typedef endian_buffer<order::native, int_least64_t, 40> native_int40_buf_t; - typedef endian_buffer<order::native, int_least64_t, 48> native_int48_buf_t; - typedef endian_buffer<order::native, int_least64_t, 56> native_int56_buf_t; - typedef endian_buffer<order::native, int_least64_t, 64> native_int64_buf_t; + typedef endian_buffer<order::native, std::int_least8_t, 8> native_int8_buf_t; + typedef endian_buffer<order::native, std::int_least16_t, 16> native_int16_buf_t; + typedef endian_buffer<order::native, std::int_least32_t, 24> native_int24_buf_t; + typedef endian_buffer<order::native, std::int_least32_t, 32> native_int32_buf_t; + typedef endian_buffer<order::native, std::int_least64_t, 40> native_int40_buf_t; + typedef endian_buffer<order::native, std::int_least64_t, 48> native_int48_buf_t; + typedef endian_buffer<order::native, std::int_least64_t, 56> native_int56_buf_t; + typedef endian_buffer<order::native, std::int_least64_t, 64> native_int64_buf_t; // unaligned native endian unsigned integer buffers - typedef endian_buffer<order::native, uint_least8_t, 8> native_uint8_buf_t; - typedef endian_buffer<order::native, uint_least16_t, 16> native_uint16_buf_t; - typedef endian_buffer<order::native, uint_least32_t, 24> native_uint24_buf_t; - typedef endian_buffer<order::native, uint_least32_t, 32> native_uint32_buf_t; - typedef endian_buffer<order::native, uint_least64_t, 40> native_uint40_buf_t; - typedef endian_buffer<order::native, uint_least64_t, 48> native_uint48_buf_t; - typedef endian_buffer<order::native, uint_least64_t, 56> native_uint56_buf_t; - typedef endian_buffer<order::native, uint_least64_t, 64> native_uint64_buf_t; + typedef endian_buffer<order::native, std::uint_least8_t, 8> native_uint8_buf_t; + typedef endian_buffer<order::native, std::uint_least16_t, 16> native_uint16_buf_t; + typedef endian_buffer<order::native, std::uint_least32_t, 24> native_uint24_buf_t; + typedef endian_buffer<order::native, std::uint_least32_t, 32> native_uint32_buf_t; + typedef endian_buffer<order::native, std::uint_least64_t, 40> native_uint40_buf_t; + typedef endian_buffer<order::native, std::uint_least64_t, 48> native_uint48_buf_t; + typedef endian_buffer<order::native, std::uint_least64_t, 56> native_uint56_buf_t; + typedef endian_buffer<order::native, std::uint_least64_t, 64> native_uint64_buf_t; // unaligned floating point buffers typedef endian_buffer<order::big, float, 32, align::no> big_float32_buf_t; @@ -178,8 +164,8 @@ namespace endian typedef endian_buffer<order::native, double, 64, align::no> native_float64_buf_t; // Stream inserter - template <class charT, class traits, BOOST_SCOPED_ENUM(order) Order, class T, - std::size_t n_bits, BOOST_SCOPED_ENUM(align) A> + template <class charT, class traits, order Order, class T, + std::size_t n_bits, align A> std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, const endian_buffer<Order, T, n_bits, A>& x) @@ -188,8 +174,8 @@ namespace endian } // Stream extractor - template <class charT, class traits, BOOST_SCOPED_ENUM(order) Order, class T, - std::size_t n_bits, BOOST_SCOPED_ENUM(align) A> + template <class charT, class traits, order Order, class T, + std::size_t n_bits, align A> std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, endian_buffer<Order, T, n_bits, A>& x) @@ -216,14 +202,14 @@ namespace endian // unaligned endian_buffer specialization -template< BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits > +template< order Order, class T, std::size_t n_bits > class endian_buffer<Order, T, n_bits, align::no> { #ifdef BOOST_ENDIAN_NO_CTORS public: #endif - BOOST_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); + BOOST_ENDIAN_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); unsigned char value_[ n_bits / 8 ]; @@ -233,7 +219,7 @@ public: #ifndef BOOST_ENDIAN_NO_CTORS - endian_buffer() BOOST_ENDIAN_DEFAULT_CONSTRUCT + endian_buffer() = default; explicit endian_buffer( T val ) BOOST_NOEXCEPT { @@ -268,13 +254,13 @@ public: // aligned endian_buffer specialization -template< BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits > +template< order Order, class T, std::size_t n_bits > class endian_buffer<Order, T, n_bits, align::yes> { private: - BOOST_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); - BOOST_STATIC_ASSERT( sizeof(T) == n_bits/8 ); + BOOST_ENDIAN_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); + BOOST_ENDIAN_STATIC_ASSERT( sizeof(T) == n_bits/8 ); union { @@ -288,7 +274,7 @@ public: #ifndef BOOST_ENDIAN_NO_CTORS - endian_buffer() BOOST_ENDIAN_DEFAULT_CONSTRUCT + endian_buffer() = default; explicit endian_buffer( T val ) BOOST_NOEXCEPT { @@ -326,8 +312,8 @@ class endian_buffer<order::native, T, n_bits, align::yes> { private: - BOOST_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); - BOOST_STATIC_ASSERT( sizeof(T) == n_bits/8 ); + BOOST_ENDIAN_STATIC_ASSERT( (n_bits/8)*8 == n_bits ); + BOOST_ENDIAN_STATIC_ASSERT( sizeof(T) == n_bits/8 ); T value_; @@ -337,7 +323,7 @@ public: #ifndef BOOST_ENDIAN_NO_CTORS - endian_buffer() BOOST_ENDIAN_DEFAULT_CONSTRUCT + endian_buffer() = default; explicit endian_buffer( T val ) BOOST_NOEXCEPT: value_( val ) { diff --git a/contrib/restricted/boost/endian/include/boost/endian/conversion.hpp b/contrib/restricted/boost/endian/include/boost/endian/conversion.hpp index 067a83297b..c284c8ed70 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/conversion.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/conversion.hpp @@ -8,17 +8,14 @@ #ifndef BOOST_ENDIAN_CONVERSION_HPP #define BOOST_ENDIAN_CONVERSION_HPP -#include <boost/endian/detail/requires_cxx11.hpp> #include <boost/endian/detail/endian_reverse.hpp> #include <boost/endian/detail/endian_load.hpp> #include <boost/endian/detail/endian_store.hpp> #include <boost/endian/detail/order.hpp> -#include <boost/type_traits/is_class.hpp> -#include <boost/type_traits/is_array.hpp> -#include <boost/type_traits/integral_constant.hpp> -#include <boost/static_assert.hpp> -#include <boost/cstdint.hpp> +#include <boost/endian/detail/static_assert.hpp> #include <boost/config.hpp> +#include <type_traits> +#include <cstdint> //------------------------------------- synopsis ---------------------------------------// @@ -66,7 +63,7 @@ namespace endian // Returns: x if native endian order is little, otherwise endian_reverse(x) // generic conditional reverse byte order - template <BOOST_SCOPED_ENUM(order) From, BOOST_SCOPED_ENUM(order) To, + template <order From, order To, class EndianReversible> inline BOOST_CONSTEXPR EndianReversible conditional_reverse(EndianReversible from) BOOST_NOEXCEPT; // Returns: If From == To have different values, from. @@ -77,7 +74,7 @@ namespace endian // runtime conditional reverse byte order template <class EndianReversible > inline BOOST_CONSTEXPR EndianReversible conditional_reverse(EndianReversible from, - BOOST_SCOPED_ENUM(order) from_order, BOOST_SCOPED_ENUM(order) to_order) + order from_order, order to_order) BOOST_NOEXCEPT; // Returns: from_order == to_order ? from : endian_reverse(from). @@ -133,14 +130,14 @@ namespace endian // Effects: none if native byte-order is little, otherwise endian_reverse_inplace(x); // generic conditional reverse in place - template <BOOST_SCOPED_ENUM(order) From, BOOST_SCOPED_ENUM(order) To, + template <order From, order To, class EndianReversibleInplace> inline void conditional_reverse_inplace(EndianReversibleInplace& x) BOOST_NOEXCEPT; // runtime reverse in place template <class EndianReversibleInplace> inline void conditional_reverse_inplace(EndianReversibleInplace& x, - BOOST_SCOPED_ENUM(order) from_order, BOOST_SCOPED_ENUM(order) to_order) + order from_order, order to_order) BOOST_NOEXCEPT; //----------------------------------- end synopsis -------------------------------------// @@ -173,13 +170,13 @@ namespace detail { template<class EndianReversible> -inline BOOST_CONSTEXPR EndianReversible conditional_reverse_impl( EndianReversible x, boost::true_type ) BOOST_NOEXCEPT +inline BOOST_CONSTEXPR EndianReversible conditional_reverse_impl( EndianReversible x, std::true_type ) BOOST_NOEXCEPT { return x; } template<class EndianReversible> -inline BOOST_CONSTEXPR EndianReversible conditional_reverse_impl( EndianReversible x, boost::false_type ) BOOST_NOEXCEPT +inline BOOST_CONSTEXPR EndianReversible conditional_reverse_impl( EndianReversible x, std::false_type ) BOOST_NOEXCEPT { return endian_reverse( x ); } @@ -187,19 +184,19 @@ inline BOOST_CONSTEXPR EndianReversible conditional_reverse_impl( EndianReversib } // namespace detail // generic conditional reverse -template <BOOST_SCOPED_ENUM(order) From, BOOST_SCOPED_ENUM(order) To, class EndianReversible> +template <order From, order To, class EndianReversible> inline BOOST_CONSTEXPR EndianReversible conditional_reverse( EndianReversible x ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( boost::is_class<EndianReversible>::value || detail::is_endian_reversible<EndianReversible>::value ); - return detail::conditional_reverse_impl( x, boost::integral_constant<bool, From == To>() ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_class<EndianReversible>::value || detail::is_endian_reversible<EndianReversible>::value ); + return detail::conditional_reverse_impl( x, std::integral_constant<bool, From == To>() ); } // runtime conditional reverse template <class EndianReversible> inline BOOST_CONSTEXPR EndianReversible conditional_reverse( EndianReversible x, - BOOST_SCOPED_ENUM(order) from_order, BOOST_SCOPED_ENUM(order) to_order ) BOOST_NOEXCEPT + order from_order, order to_order ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( boost::is_class<EndianReversible>::value || detail::is_endian_reversible<EndianReversible>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_class<EndianReversible>::value || detail::is_endian_reversible<EndianReversible>::value ); return from_order == to_order? x: endian_reverse( x ); } @@ -235,12 +232,12 @@ namespace detail { template<class EndianReversibleInplace> -inline void conditional_reverse_inplace_impl( EndianReversibleInplace&, boost::true_type ) BOOST_NOEXCEPT +inline void conditional_reverse_inplace_impl( EndianReversibleInplace&, std::true_type ) BOOST_NOEXCEPT { } template<class EndianReversibleInplace> -inline void conditional_reverse_inplace_impl( EndianReversibleInplace& x, boost::false_type ) BOOST_NOEXCEPT +inline void conditional_reverse_inplace_impl( EndianReversibleInplace& x, std::false_type ) BOOST_NOEXCEPT { endian_reverse_inplace( x ); } @@ -248,25 +245,25 @@ inline void conditional_reverse_inplace_impl( EndianReversibleInplace& x, boost: } // namespace detail // generic conditional reverse in place -template <BOOST_SCOPED_ENUM(order) From, BOOST_SCOPED_ENUM(order) To, class EndianReversibleInplace> +template <order From, order To, class EndianReversibleInplace> inline void conditional_reverse_inplace( EndianReversibleInplace& x ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( - boost::is_class<EndianReversibleInplace>::value || - boost::is_array<EndianReversibleInplace>::value || + BOOST_ENDIAN_STATIC_ASSERT( + std::is_class<EndianReversibleInplace>::value || + std::is_array<EndianReversibleInplace>::value || detail::is_endian_reversible_inplace<EndianReversibleInplace>::value ); - detail::conditional_reverse_inplace_impl( x, boost::integral_constant<bool, From == To>() ); + detail::conditional_reverse_inplace_impl( x, std::integral_constant<bool, From == To>() ); } // runtime reverse in place template <class EndianReversibleInplace> inline void conditional_reverse_inplace( EndianReversibleInplace& x, - BOOST_SCOPED_ENUM(order) from_order, BOOST_SCOPED_ENUM(order) to_order ) BOOST_NOEXCEPT + order from_order, order to_order ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( - boost::is_class<EndianReversibleInplace>::value || - boost::is_array<EndianReversibleInplace>::value || + BOOST_ENDIAN_STATIC_ASSERT( + std::is_class<EndianReversibleInplace>::value || + std::is_array<EndianReversibleInplace>::value || detail::is_endian_reversible_inplace<EndianReversibleInplace>::value ); if( from_order != to_order ) @@ -279,310 +276,310 @@ inline void conditional_reverse_inplace( EndianReversibleInplace& x, // load 16 -inline boost::int16_t load_little_s16( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int16_t load_little_s16( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int16_t, 2, order::little>( p ); + return boost::endian::endian_load<std::int16_t, 2, order::little>( p ); } -inline boost::uint16_t load_little_u16( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint16_t load_little_u16( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint16_t, 2, order::little>( p ); + return boost::endian::endian_load<std::uint16_t, 2, order::little>( p ); } -inline boost::int16_t load_big_s16( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int16_t load_big_s16( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int16_t, 2, order::big>( p ); + return boost::endian::endian_load<std::int16_t, 2, order::big>( p ); } -inline boost::uint16_t load_big_u16( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint16_t load_big_u16( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint16_t, 2, order::big>( p ); + return boost::endian::endian_load<std::uint16_t, 2, order::big>( p ); } // load 24 -inline boost::int32_t load_little_s24( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int32_t load_little_s24( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int32_t, 3, order::little>( p ); + return boost::endian::endian_load<std::int32_t, 3, order::little>( p ); } -inline boost::uint32_t load_little_u24( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint32_t load_little_u24( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint32_t, 3, order::little>( p ); + return boost::endian::endian_load<std::uint32_t, 3, order::little>( p ); } -inline boost::int32_t load_big_s24( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int32_t load_big_s24( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int32_t, 3, order::big>( p ); + return boost::endian::endian_load<std::int32_t, 3, order::big>( p ); } -inline boost::uint32_t load_big_u24( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint32_t load_big_u24( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint32_t, 3, order::big>( p ); + return boost::endian::endian_load<std::uint32_t, 3, order::big>( p ); } // load 32 -inline boost::int32_t load_little_s32( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int32_t load_little_s32( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int32_t, 4, order::little>( p ); + return boost::endian::endian_load<std::int32_t, 4, order::little>( p ); } -inline boost::uint32_t load_little_u32( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint32_t load_little_u32( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint32_t, 4, order::little>( p ); + return boost::endian::endian_load<std::uint32_t, 4, order::little>( p ); } -inline boost::int32_t load_big_s32( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int32_t load_big_s32( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int32_t, 4, order::big>( p ); + return boost::endian::endian_load<std::int32_t, 4, order::big>( p ); } -inline boost::uint32_t load_big_u32( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint32_t load_big_u32( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint32_t, 4, order::big>( p ); + return boost::endian::endian_load<std::uint32_t, 4, order::big>( p ); } // load 40 -inline boost::int64_t load_little_s40( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_little_s40( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 5, order::little>( p ); + return boost::endian::endian_load<std::int64_t, 5, order::little>( p ); } -inline boost::uint64_t load_little_u40( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_little_u40( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 5, order::little>( p ); + return boost::endian::endian_load<std::uint64_t, 5, order::little>( p ); } -inline boost::int64_t load_big_s40( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_big_s40( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 5, order::big>( p ); + return boost::endian::endian_load<std::int64_t, 5, order::big>( p ); } -inline boost::uint64_t load_big_u40( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_big_u40( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 5, order::big>( p ); + return boost::endian::endian_load<std::uint64_t, 5, order::big>( p ); } // load 48 -inline boost::int64_t load_little_s48( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_little_s48( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 6, order::little>( p ); + return boost::endian::endian_load<std::int64_t, 6, order::little>( p ); } -inline boost::uint64_t load_little_u48( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_little_u48( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 6, order::little>( p ); + return boost::endian::endian_load<std::uint64_t, 6, order::little>( p ); } -inline boost::int64_t load_big_s48( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_big_s48( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 6, order::big>( p ); + return boost::endian::endian_load<std::int64_t, 6, order::big>( p ); } -inline boost::uint64_t load_big_u48( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_big_u48( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 6, order::big>( p ); + return boost::endian::endian_load<std::uint64_t, 6, order::big>( p ); } // load 56 -inline boost::int64_t load_little_s56( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_little_s56( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 7, order::little>( p ); + return boost::endian::endian_load<std::int64_t, 7, order::little>( p ); } -inline boost::uint64_t load_little_u56( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_little_u56( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 7, order::little>( p ); + return boost::endian::endian_load<std::uint64_t, 7, order::little>( p ); } -inline boost::int64_t load_big_s56( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_big_s56( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 7, order::big>( p ); + return boost::endian::endian_load<std::int64_t, 7, order::big>( p ); } -inline boost::uint64_t load_big_u56( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_big_u56( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 7, order::big>( p ); + return boost::endian::endian_load<std::uint64_t, 7, order::big>( p ); } // load 64 -inline boost::int64_t load_little_s64( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_little_s64( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 8, order::little>( p ); + return boost::endian::endian_load<std::int64_t, 8, order::little>( p ); } -inline boost::uint64_t load_little_u64( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_little_u64( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 8, order::little>( p ); + return boost::endian::endian_load<std::uint64_t, 8, order::little>( p ); } -inline boost::int64_t load_big_s64( unsigned char const * p ) BOOST_NOEXCEPT +inline std::int64_t load_big_s64( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::int64_t, 8, order::big>( p ); + return boost::endian::endian_load<std::int64_t, 8, order::big>( p ); } -inline boost::uint64_t load_big_u64( unsigned char const * p ) BOOST_NOEXCEPT +inline std::uint64_t load_big_u64( unsigned char const * p ) BOOST_NOEXCEPT { - return boost::endian::endian_load<boost::uint64_t, 8, order::big>( p ); + return boost::endian::endian_load<std::uint64_t, 8, order::big>( p ); } // store 16 -inline void store_little_s16( unsigned char * p, boost::int16_t v ) +inline void store_little_s16( unsigned char * p, std::int16_t v ) { - boost::endian::endian_store<boost::int16_t, 2, order::little>( p, v ); + boost::endian::endian_store<std::int16_t, 2, order::little>( p, v ); } -inline void store_little_u16( unsigned char * p, boost::uint16_t v ) +inline void store_little_u16( unsigned char * p, std::uint16_t v ) { - boost::endian::endian_store<boost::uint16_t, 2, order::little>( p, v ); + boost::endian::endian_store<std::uint16_t, 2, order::little>( p, v ); } -inline void store_big_s16( unsigned char * p, boost::int16_t v ) +inline void store_big_s16( unsigned char * p, std::int16_t v ) { - boost::endian::endian_store<boost::int16_t, 2, order::big>( p, v ); + boost::endian::endian_store<std::int16_t, 2, order::big>( p, v ); } -inline void store_big_u16( unsigned char * p, boost::uint16_t v ) +inline void store_big_u16( unsigned char * p, std::uint16_t v ) { - boost::endian::endian_store<boost::uint16_t, 2, order::big>( p, v ); + boost::endian::endian_store<std::uint16_t, 2, order::big>( p, v ); } // store 24 -inline void store_little_s24( unsigned char * p, boost::int32_t v ) +inline void store_little_s24( unsigned char * p, std::int32_t v ) { - boost::endian::endian_store<boost::int32_t, 3, order::little>( p, v ); + boost::endian::endian_store<std::int32_t, 3, order::little>( p, v ); } -inline void store_little_u24( unsigned char * p, boost::uint32_t v ) +inline void store_little_u24( unsigned char * p, std::uint32_t v ) { - boost::endian::endian_store<boost::uint32_t, 3, order::little>( p, v ); + boost::endian::endian_store<std::uint32_t, 3, order::little>( p, v ); } -inline void store_big_s24( unsigned char * p, boost::int32_t v ) +inline void store_big_s24( unsigned char * p, std::int32_t v ) { - boost::endian::endian_store<boost::int32_t, 3, order::big>( p, v ); + boost::endian::endian_store<std::int32_t, 3, order::big>( p, v ); } -inline void store_big_u24( unsigned char * p, boost::uint32_t v ) +inline void store_big_u24( unsigned char * p, std::uint32_t v ) { - boost::endian::endian_store<boost::uint32_t, 3, order::big>( p, v ); + boost::endian::endian_store<std::uint32_t, 3, order::big>( p, v ); } // store 32 -inline void store_little_s32( unsigned char * p, boost::int32_t v ) +inline void store_little_s32( unsigned char * p, std::int32_t v ) { - boost::endian::endian_store<boost::int32_t, 4, order::little>( p, v ); + boost::endian::endian_store<std::int32_t, 4, order::little>( p, v ); } -inline void store_little_u32( unsigned char * p, boost::uint32_t v ) +inline void store_little_u32( unsigned char * p, std::uint32_t v ) { - boost::endian::endian_store<boost::uint32_t, 4, order::little>( p, v ); + boost::endian::endian_store<std::uint32_t, 4, order::little>( p, v ); } -inline void store_big_s32( unsigned char * p, boost::int32_t v ) +inline void store_big_s32( unsigned char * p, std::int32_t v ) { - boost::endian::endian_store<boost::int32_t, 4, order::big>( p, v ); + boost::endian::endian_store<std::int32_t, 4, order::big>( p, v ); } -inline void store_big_u32( unsigned char * p, boost::uint32_t v ) +inline void store_big_u32( unsigned char * p, std::uint32_t v ) { - boost::endian::endian_store<boost::uint32_t, 4, order::big>( p, v ); + boost::endian::endian_store<std::uint32_t, 4, order::big>( p, v ); } // store 40 -inline void store_little_s40( unsigned char * p, boost::int64_t v ) +inline void store_little_s40( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 5, order::little>( p, v ); + boost::endian::endian_store<std::int64_t, 5, order::little>( p, v ); } -inline void store_little_u40( unsigned char * p, boost::uint64_t v ) +inline void store_little_u40( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 5, order::little>( p, v ); + boost::endian::endian_store<std::uint64_t, 5, order::little>( p, v ); } -inline void store_big_s40( unsigned char * p, boost::int64_t v ) +inline void store_big_s40( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 5, order::big>( p, v ); + boost::endian::endian_store<std::int64_t, 5, order::big>( p, v ); } -inline void store_big_u40( unsigned char * p, boost::uint64_t v ) +inline void store_big_u40( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 5, order::big>( p, v ); + boost::endian::endian_store<std::uint64_t, 5, order::big>( p, v ); } // store 48 -inline void store_little_s48( unsigned char * p, boost::int64_t v ) +inline void store_little_s48( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 6, order::little>( p, v ); + boost::endian::endian_store<std::int64_t, 6, order::little>( p, v ); } -inline void store_little_u48( unsigned char * p, boost::uint64_t v ) +inline void store_little_u48( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 6, order::little>( p, v ); + boost::endian::endian_store<std::uint64_t, 6, order::little>( p, v ); } -inline void store_big_s48( unsigned char * p, boost::int64_t v ) +inline void store_big_s48( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 6, order::big>( p, v ); + boost::endian::endian_store<std::int64_t, 6, order::big>( p, v ); } -inline void store_big_u48( unsigned char * p, boost::uint64_t v ) +inline void store_big_u48( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 6, order::big>( p, v ); + boost::endian::endian_store<std::uint64_t, 6, order::big>( p, v ); } // store 56 -inline void store_little_s56( unsigned char * p, boost::int64_t v ) +inline void store_little_s56( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 7, order::little>( p, v ); + boost::endian::endian_store<std::int64_t, 7, order::little>( p, v ); } -inline void store_little_u56( unsigned char * p, boost::uint64_t v ) +inline void store_little_u56( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 7, order::little>( p, v ); + boost::endian::endian_store<std::uint64_t, 7, order::little>( p, v ); } -inline void store_big_s56( unsigned char * p, boost::int64_t v ) +inline void store_big_s56( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 7, order::big>( p, v ); + boost::endian::endian_store<std::int64_t, 7, order::big>( p, v ); } -inline void store_big_u56( unsigned char * p, boost::uint64_t v ) +inline void store_big_u56( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 7, order::big>( p, v ); + boost::endian::endian_store<std::uint64_t, 7, order::big>( p, v ); } // store 64 -inline void store_little_s64( unsigned char * p, boost::int64_t v ) +inline void store_little_s64( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 8, order::little>( p, v ); + boost::endian::endian_store<std::int64_t, 8, order::little>( p, v ); } -inline void store_little_u64( unsigned char * p, boost::uint64_t v ) +inline void store_little_u64( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 8, order::little>( p, v ); + boost::endian::endian_store<std::uint64_t, 8, order::little>( p, v ); } -inline void store_big_s64( unsigned char * p, boost::int64_t v ) +inline void store_big_s64( unsigned char * p, std::int64_t v ) { - boost::endian::endian_store<boost::int64_t, 8, order::big>( p, v ); + boost::endian::endian_store<std::int64_t, 8, order::big>( p, v ); } -inline void store_big_u64( unsigned char * p, boost::uint64_t v ) +inline void store_big_u64( unsigned char * p, std::uint64_t v ) { - boost::endian::endian_store<boost::uint64_t, 8, order::big>( p, v ); + boost::endian::endian_store<std::uint64_t, 8, order::big>( p, v ); } } // namespace endian diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_load.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_load.hpp index 8dd9a20b31..eac2407cb0 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_load.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_load.hpp @@ -10,10 +10,8 @@ #include <boost/endian/detail/order.hpp> #include <boost/endian/detail/integral_by_size.hpp> #include <boost/endian/detail/is_trivially_copyable.hpp> -#include <boost/type_traits/is_signed.hpp> -#include <boost/type_traits/is_integral.hpp> -#include <boost/type_traits/is_enum.hpp> -#include <boost/static_assert.hpp> +#include <boost/endian/detail/static_assert.hpp> +#include <type_traits> #include <cstddef> #include <cstring> @@ -25,7 +23,7 @@ namespace endian namespace detail { -template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, BOOST_SCOPED_ENUM(order) O2> struct endian_load_impl +template<class T, std::size_t N1, order O1, std::size_t N2, order O2> struct endian_load_impl { }; @@ -38,11 +36,11 @@ template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, B // T is TriviallyCopyable // if N < sizeof(T), T is integral or enum -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order> +template<class T, std::size_t N, order Order> inline T endian_load( unsigned char const * p ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8 ); - BOOST_STATIC_ASSERT( N >= 1 && N <= sizeof(T) ); + BOOST_ENDIAN_STATIC_ASSERT( sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8 ); + BOOST_ENDIAN_STATIC_ASSERT( N >= 1 && N <= sizeof(T) ); return detail::endian_load_impl<T, sizeof(T), order::native, N, Order>()( p ); } @@ -52,11 +50,11 @@ namespace detail // same endianness, same size -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_load_impl<T, N, O, N, O> +template<class T, std::size_t N, order O> struct endian_load_impl<T, N, O, N, O> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( is_trivially_copyable<T>::value ); T t; std::memcpy( &t, p, N ); @@ -66,11 +64,11 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_load_ // same size, reverse endianness -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM(order) O2> struct endian_load_impl<T, N, O1, N, O2> +template<class T, std::size_t N, order O1, order O2> struct endian_load_impl<T, N, O1, N, O2> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( is_trivially_copyable<T>::value ); typename integral_by_size<N>::type tmp; std::memcpy( &tmp, p, N ); @@ -85,30 +83,30 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM( // expanding load 1 -> 2 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 2, Order, 1, order::little> +template<class T, order Order> struct endian_load_impl<T, 2, Order, 1, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 2 ]; tmp[0] = p[0]; - tmp[1] = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + tmp[1] = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; return boost::endian::endian_load<T, 2, order::little>( tmp ); } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 2, Order, 1, order::big> +template<class T, order Order> struct endian_load_impl<T, 2, Order, 1, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 2 ]; - tmp[0] = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + tmp[0] = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[1] = p[0]; return boost::endian::endian_load<T, 2, order::big>( tmp ); @@ -117,15 +115,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 2, // expanding load 1 -> 4 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 1, order::little> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 1, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = fill; @@ -136,15 +134,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 1, order::big> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 1, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -157,15 +155,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, // expanding load 2 -> 4 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 2, order::little> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 2, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[1] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[1] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -176,15 +174,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 2, order::big> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 2, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -197,32 +195,32 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, // expanding load 3 -> 4 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 3, order::little> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 3, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; tmp[0] = p[0]; tmp[1] = p[1]; tmp[2] = p[2]; - tmp[3] = boost::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00; + tmp[3] = std::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00; return boost::endian::endian_load<T, 4, order::little>( tmp ); } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, Order, 3, order::big> +template<class T, order Order> struct endian_load_impl<T, 4, Order, 3, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; - tmp[0] = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + tmp[0] = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[1] = p[0]; tmp[2] = p[1]; tmp[3] = p[2]; @@ -233,15 +231,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 4, // expanding load 1 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 1, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 1, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; @@ -257,15 +255,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 1, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 1, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -283,15 +281,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 2 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 2, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 2, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[1] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[1] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -307,15 +305,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 2, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 2, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -333,15 +331,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 3 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 3, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 3, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[2] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -357,15 +355,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 3, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 3, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -383,15 +381,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 4 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 4, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 4, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[3] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[3] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -407,15 +405,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 4, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 4, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -433,15 +431,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 5 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 5, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 5, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[4] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[4] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -457,15 +455,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 5, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 5, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -483,15 +481,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 6 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 6, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 6, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[5] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[5] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -507,15 +505,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 6, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 6, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; tmp[1] = fill; @@ -533,15 +531,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, // expanding load 7 -> 8 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 7, order::little> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 7, order::little> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[6] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[6] & 0x80 )? 0xFF: 0x00; tmp[0] = p[0]; tmp[1] = p[1]; @@ -557,15 +555,15 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_load_impl<T, 8, Order, 7, order::big> +template<class T, order Order> struct endian_load_impl<T, 8, Order, 7, order::big> { inline T operator()( unsigned char const * p ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; - unsigned char fill = boost::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; + unsigned char fill = std::is_signed<T>::value && ( p[0] & 0x80 )? 0xFF: 0x00; tmp[0] = fill; diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_reverse.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_reverse.hpp index 007dcd00a7..850445b06f 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_reverse.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_reverse.hpp @@ -8,14 +8,11 @@ #include <boost/endian/detail/integral_by_size.hpp> #include <boost/endian/detail/intrinsic.hpp> #include <boost/endian/detail/is_scoped_enum.hpp> -#include <boost/type_traits/is_integral.hpp> -#include <boost/type_traits/is_same.hpp> -#include <boost/type_traits/enable_if.hpp> -#include <boost/type_traits/is_class.hpp> -#include <boost/type_traits/integral_constant.hpp> -#include <boost/static_assert.hpp> -#include <boost/cstdint.hpp> +#include <boost/endian/detail/is_integral.hpp> +#include <boost/endian/detail/static_assert.hpp> #include <boost/config.hpp> +#include <type_traits> +#include <cstdint> #include <cstddef> #include <cstring> @@ -47,12 +44,12 @@ namespace detail // -- intrinsic approach suggested by reviewers, and by David Stone, who provided // his Boost licensed macro implementation (detail/intrinsic.hpp) -inline uint8_t BOOST_CONSTEXPR endian_reverse_impl( uint8_t x ) BOOST_NOEXCEPT +inline std::uint8_t BOOST_CONSTEXPR endian_reverse_impl( std::uint8_t x ) BOOST_NOEXCEPT { return x; } -inline uint16_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint16_t x ) BOOST_NOEXCEPT +inline std::uint16_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( std::uint16_t x ) BOOST_NOEXCEPT { #ifdef BOOST_ENDIAN_NO_INTRINSICS @@ -65,11 +62,11 @@ inline uint16_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint16_t x ) BOOST_N #endif } -inline uint32_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint32_t x ) BOOST_NOEXCEPT +inline std::uint32_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( std::uint32_t x ) BOOST_NOEXCEPT { #ifdef BOOST_ENDIAN_NO_INTRINSICS - uint32_t step16 = x << 16 | x >> 16; + std::uint32_t step16 = x << 16 | x >> 16; return ((step16 << 8) & 0xff00ff00) | ((step16 >> 8) & 0x00ff00ff); #else @@ -79,12 +76,12 @@ inline uint32_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint32_t x ) BOOST_N #endif } -inline uint64_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint64_t x ) BOOST_NOEXCEPT +inline std::uint64_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( std::uint64_t x ) BOOST_NOEXCEPT { #ifdef BOOST_ENDIAN_NO_INTRINSICS - uint64_t step32 = x << 32 | x >> 32; - uint64_t step16 = (step32 & 0x0000FFFF0000FFFFULL) << 16 | (step32 & 0xFFFF0000FFFF0000ULL) >> 16; + std::uint64_t step32 = x << 32 | x >> 32; + std::uint64_t step16 = (step32 & 0x0000FFFF0000FFFFULL) << 16 | (step32 & 0xFFFF0000FFFF0000ULL) >> 16; return (step16 & 0x00FF00FF00FF00FFULL) << 8 | (step16 & 0xFF00FF00FF00FF00ULL) >> 8; #else @@ -94,27 +91,27 @@ inline uint64_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint64_t x ) BOOST_N # endif } -#if defined(BOOST_HAS_INT128) +#if defined(__SIZEOF_INT128__) -inline uint128_type BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( uint128_type x ) BOOST_NOEXCEPT +inline __uint128_t BOOST_ENDIAN_CONSTEXPR endian_reverse_impl( __uint128_t x ) BOOST_NOEXCEPT { - return endian_reverse_impl( static_cast<uint64_t>( x >> 64 ) ) | - static_cast<uint128_type>( endian_reverse_impl( static_cast<uint64_t>( x ) ) ) << 64; + return endian_reverse_impl( static_cast<std::uint64_t>( x >> 64 ) ) | + static_cast<__uint128_t>( endian_reverse_impl( static_cast<std::uint64_t>( x ) ) ) << 64; } #endif // is_endian_reversible -template<class T> struct is_endian_reversible: boost::integral_constant<bool, - (boost::is_integral<T>::value && !boost::is_same<T, bool>::value) || is_scoped_enum<T>::value> +template<class T> struct is_endian_reversible: std::integral_constant<bool, + (is_integral<T>::value && !std::is_same<T, bool>::value) || is_scoped_enum<T>::value> { }; // is_endian_reversible_inplace -template<class T> struct is_endian_reversible_inplace: boost::integral_constant<bool, - boost::is_integral<T>::value || boost::is_enum<T>::value || boost::is_same<T, float>::value || boost::is_same<T, double>::value> +template<class T> struct is_endian_reversible_inplace: std::integral_constant<bool, + is_integral<T>::value || std::is_enum<T>::value || std::is_same<T, float>::value || std::is_same<T, double>::value> { }; @@ -124,10 +121,10 @@ template<class T> struct is_endian_reversible_inplace: boost::integral_constant< // T is non-bool integral or scoped enumeration type template<class T> inline BOOST_CONSTEXPR - typename enable_if_< !is_class<T>::value, T >::type + typename std::enable_if< !std::is_class<T>::value, T >::type endian_reverse( T x ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( detail::is_endian_reversible<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( detail::is_endian_reversible<T>::value ); typedef typename detail::integral_by_size< sizeof(T) >::type uintN_t; @@ -138,10 +135,10 @@ template<class T> inline BOOST_CONSTEXPR // T is integral, enumeration, float or double template<class T> inline - typename enable_if_< !is_class<T>::value >::type + typename std::enable_if< !std::is_class<T>::value >::type endian_reverse_inplace( T & x ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( detail::is_endian_reversible_inplace<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( detail::is_endian_reversible_inplace<T>::value ); typename detail::integral_by_size< sizeof(T) >::type x2; @@ -155,7 +152,7 @@ template<class T> inline // Default implementation for user-defined types template<class T> inline - typename enable_if_< is_class<T>::value >::type + typename std::enable_if< std::is_class<T>::value >::type endian_reverse_inplace( T & x ) BOOST_NOEXCEPT { x = endian_reverse( x ); diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_store.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_store.hpp index a624352db9..523f0395e4 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/endian_store.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/endian_store.hpp @@ -10,9 +10,8 @@ #include <boost/endian/detail/order.hpp> #include <boost/endian/detail/integral_by_size.hpp> #include <boost/endian/detail/is_trivially_copyable.hpp> -#include <boost/type_traits/is_integral.hpp> -#include <boost/type_traits/is_enum.hpp> -#include <boost/static_assert.hpp> +#include <boost/endian/detail/static_assert.hpp> +#include <type_traits> #include <cstddef> #include <cstring> @@ -24,7 +23,7 @@ namespace endian namespace detail { -template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, BOOST_SCOPED_ENUM(order) O2> struct endian_store_impl +template<class T, std::size_t N1, order O1, std::size_t N2, order O2> struct endian_store_impl { }; @@ -37,11 +36,11 @@ template<class T, std::size_t N1, BOOST_SCOPED_ENUM(order) O1, std::size_t N2, B // T is TriviallyCopyable // if N < sizeof(T), T is integral or enum -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) Order> +template<class T, std::size_t N, order Order> inline void endian_store( unsigned char * p, T const & v ) BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8 ); - BOOST_STATIC_ASSERT( N >= 1 && N <= sizeof(T) ); + BOOST_ENDIAN_STATIC_ASSERT( sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8 ); + BOOST_ENDIAN_STATIC_ASSERT( N >= 1 && N <= sizeof(T) ); return detail::endian_store_impl<T, sizeof(T), order::native, N, Order>()( p, v ); } @@ -51,11 +50,11 @@ namespace detail // same endianness, same size -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_store_impl<T, N, O, N, O> +template<class T, std::size_t N, order O> struct endian_store_impl<T, N, O, N, O> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( is_trivially_copyable<T>::value ); std::memcpy( p, &v, N ); } @@ -63,11 +62,11 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O> struct endian_store // same size, reverse endianness -template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM(order) O2> struct endian_store_impl<T, N, O1, N, O2> +template<class T, std::size_t N, order O1, order O2> struct endian_store_impl<T, N, O1, N, O2> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_trivially_copyable<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( is_trivially_copyable<T>::value ); typename integral_by_size<N>::type tmp; std::memcpy( &tmp, &v, N ); @@ -80,11 +79,11 @@ template<class T, std::size_t N, BOOST_SCOPED_ENUM(order) O1, BOOST_SCOPED_ENUM( // truncating store 2 -> 1 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 2, Order, 1, order::little> +template<class T, order Order> struct endian_store_impl<T, 2, Order, 1, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 2 ]; boost::endian::endian_store<T, 2, order::little>( tmp, v ); @@ -93,11 +92,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 2, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 2, Order, 1, order::big> +template<class T, order Order> struct endian_store_impl<T, 2, Order, 1, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 2 ]; boost::endian::endian_store<T, 2, order::big>( tmp, v ); @@ -108,11 +107,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 2, // truncating store 4 -> 1 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 1, order::little> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 1, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::little>( tmp, v ); @@ -121,11 +120,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 1, order::big> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 1, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::big>( tmp, v ); @@ -136,11 +135,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, // truncating store 4 -> 2 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 2, order::little> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 2, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::little>( tmp, v ); @@ -150,11 +149,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 2, order::big> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 2, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::big>( tmp, v ); @@ -166,11 +165,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, // truncating store 4 -> 3 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 3, order::little> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 3, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::little>( tmp, v ); @@ -181,11 +180,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, Order, 3, order::big> +template<class T, order Order> struct endian_store_impl<T, 4, Order, 3, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 4 ]; boost::endian::endian_store<T, 4, order::big>( tmp, v ); @@ -198,11 +197,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 4, // truncating store 8 -> 1 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 1, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 1, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -211,11 +210,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 1, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 1, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -226,11 +225,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 2 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 2, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 2, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -240,11 +239,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 2, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 2, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -256,11 +255,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 3 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 3, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 3, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -271,11 +270,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 3, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 3, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -288,11 +287,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 4 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 4, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 4, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -304,11 +303,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 4, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 4, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -322,11 +321,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 5 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 5, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 5, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -339,11 +338,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 5, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 5, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -358,11 +357,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 6 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 6, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 6, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -376,11 +375,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 6, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 6, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); @@ -396,11 +395,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, // truncating store 8 -> 7 -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 7, order::little> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 7, order::little> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::little>( tmp, v ); @@ -415,11 +414,11 @@ template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, } }; -template<class T, BOOST_SCOPED_ENUM(order) Order> struct endian_store_impl<T, 8, Order, 7, order::big> +template<class T, order Order> struct endian_store_impl<T, 8, Order, 7, order::big> { inline void operator()( unsigned char * p, T const & v ) const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT( is_integral<T>::value || is_enum<T>::value ); + BOOST_ENDIAN_STATIC_ASSERT( std::is_integral<T>::value || std::is_enum<T>::value ); unsigned char tmp[ 8 ]; boost::endian::endian_store<T, 8, order::big>( tmp, v ); diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/integral_by_size.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/integral_by_size.hpp index d53ee17ce4..2ff2445a8d 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/integral_by_size.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/integral_by_size.hpp @@ -6,8 +6,7 @@ // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt -#include <boost/cstdint.hpp> -#include <boost/config.hpp> +#include <cstdint> #include <cstddef> namespace boost @@ -23,29 +22,29 @@ template<std::size_t N> struct integral_by_size template<> struct integral_by_size<1> { - typedef uint8_t type; + typedef std::uint8_t type; }; template<> struct integral_by_size<2> { - typedef uint16_t type; + typedef std::uint16_t type; }; template<> struct integral_by_size<4> { - typedef uint32_t type; + typedef std::uint32_t type; }; template<> struct integral_by_size<8> { - typedef uint64_t type; + typedef std::uint64_t type; }; -#if defined(BOOST_HAS_INT128) +#if defined(__SIZEOF_INT128__) template<> struct integral_by_size<16> { - typedef uint128_type type; + typedef __uint128_t type; }; #endif diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/is_integral.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/is_integral.hpp new file mode 100644 index 0000000000..06b8d8b7e6 --- /dev/null +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/is_integral.hpp @@ -0,0 +1,37 @@ +#ifndef BOOST_ENDIAN_DETAIL_IS_INTEGRAL_HPP_INCLUDED +#define BOOST_ENDIAN_DETAIL_IS_INTEGRAL_HPP_INCLUDED + +// Copyright 2023 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// http://www.boost.org/LICENSE_1_0.txt + +#include <type_traits> + +namespace boost +{ +namespace endian +{ +namespace detail +{ + +template<class T> struct is_integral: std::is_integral<T> +{ +}; + +#if defined(__SIZEOF_INT128__) + +template<> struct is_integral<__int128_t>: std::true_type +{ +}; + +template<> struct is_integral<__uint128_t>: std::true_type +{ +}; + +#endif + +} // namespace detail +} // namespace endian +} // namespace boost + +#endif // BOOST_ENDIAN_DETAIL_IS_INTEGRAL_HPP_INCLUDED diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/is_scoped_enum.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/is_scoped_enum.hpp index f5690a9a6a..88bc1e8cef 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/is_scoped_enum.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/is_scoped_enum.hpp @@ -6,9 +6,7 @@ // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt -#include <boost/type_traits/conditional.hpp> -#include <boost/type_traits/is_enum.hpp> -#include <boost/type_traits/is_convertible.hpp> +#include <type_traits> namespace boost { @@ -17,13 +15,13 @@ namespace endian namespace detail { -template<class T> struct negation: boost::integral_constant<bool, !T::value> {}; +template<class T> struct negation: std::integral_constant<bool, !T::value> {}; template<class T> struct is_scoped_enum: - boost::conditional< - boost::is_enum<T>::value, - negation< boost::is_convertible<T, int> >, - boost::false_type + std::conditional< + std::is_enum<T>::value, + negation< std::is_convertible<T, int> >, + std::false_type >::type { }; diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/is_trivially_copyable.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/is_trivially_copyable.hpp index b34f94896d..a0ada2e39b 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/is_trivially_copyable.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/is_trivially_copyable.hpp @@ -1,19 +1,12 @@ #ifndef BOOST_ENDIAN_DETAIL_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED #define BOOST_ENDIAN_DETAIL_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED -// Copyright 2019 Peter Dimov -// +// Copyright 2019, 2023 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt #include <boost/config.hpp> -#include <boost/type_traits/has_trivial_copy.hpp> -#include <boost/type_traits/has_trivial_assign.hpp> -#include <boost/type_traits/has_trivial_destructor.hpp> - -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -# include <type_traits> -#endif +#include <type_traits> namespace boost { @@ -22,14 +15,14 @@ namespace endian namespace detail { -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) +#if defined( BOOST_LIBSTDCXX_VERSION ) && BOOST_LIBSTDCXX_VERSION < 50000 -using std::is_trivially_copyable; +template<class T> struct is_trivially_copyable: std::integral_constant<bool, + __has_trivial_copy(T) && __has_trivial_assign(T) && __has_trivial_destructor(T)> {}; #else -template<class T> struct is_trivially_copyable: boost::integral_constant<bool, - boost::has_trivial_copy<T>::value && boost::has_trivial_assign<T>::value && boost::has_trivial_destructor<T>::value> {}; +using std::is_trivially_copyable; #endif diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/order.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/order.hpp index ddf4c9c371..d2e1a91f31 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/order.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/order.hpp @@ -6,8 +6,6 @@ // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt -#include <boost/core/scoped_enum.hpp> - #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER little @@ -43,13 +41,12 @@ namespace boost namespace endian { -BOOST_SCOPED_ENUM_START(order) +enum class order { big, little, native = BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER - -}; BOOST_SCOPED_ENUM_END +}; } // namespace endian } // namespace boost diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/requires_cxx11.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/requires_cxx11.hpp deleted file mode 100644 index 8e4d4f7c16..0000000000 --- a/contrib/restricted/boost/endian/include/boost/endian/detail/requires_cxx11.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BOOST_ENDIAN_DETAIL_REQUIRES_CXX11_HPP_INCLUDED -#define BOOST_ENDIAN_DETAIL_REQUIRES_CXX11_HPP_INCLUDED - -// Copyright 2023 Peter Dimov -// Distributed under the Boost Software License, Version 1.0. -// https://www.boost.org/LICENSE_1_0.txt - -#include <boost/config.hpp> -#include <boost/config/pragma_message.hpp> - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ - defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ - defined(BOOST_NO_CXX11_DECLTYPE) || \ - defined(BOOST_NO_CXX11_CONSTEXPR) || \ - defined(BOOST_NO_CXX11_NOEXCEPT) || \ - defined(BOOST_NO_CXX11_SCOPED_ENUMS) || \ - defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) - -BOOST_PRAGMA_MESSAGE("C++03 support was deprecated in Boost.Endian 1.82 and will be removed in Boost.Endian 1.84. Please open an issue in https://github.com/boostorg/endian if you want it retained.") - -#endif - -#endif // #ifndef BOOST_ENDIAN_DETAIL_REQUIRES_CXX11_HPP_INCLUDED diff --git a/contrib/restricted/boost/endian/include/boost/endian/detail/static_assert.hpp b/contrib/restricted/boost/endian/include/boost/endian/detail/static_assert.hpp new file mode 100644 index 0000000000..5b89b4fc36 --- /dev/null +++ b/contrib/restricted/boost/endian/include/boost/endian/detail/static_assert.hpp @@ -0,0 +1,10 @@ +#ifndef BOOST_ENDIAN_DETAIL_STATIC_ASSERT_HPP_INCLUDED +#define BOOST_ENDIAN_DETAIL_STATIC_ASSERT_HPP_INCLUDED + +// Copyright 2023 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#define BOOST_ENDIAN_STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__) + +#endif // BOOST_ENDIAN_DETAIL_STATIC_ASSERT_HPP_INCLUDED diff --git a/contrib/restricted/boost/endian/include/boost/endian/endian.hpp b/contrib/restricted/boost/endian/include/boost/endian/endian.hpp index 06b607bae2..655d05a292 100644 --- a/contrib/restricted/boost/endian/include/boost/endian/endian.hpp +++ b/contrib/restricted/boost/endian/include/boost/endian/endian.hpp @@ -29,8 +29,8 @@ namespace endian typedef align alignment; # ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES - template <BOOST_SCOPED_ENUM(order) Order, class T, std::size_t n_bits, - BOOST_SCOPED_ENUM(align) Align = align::no> + template <order Order, class T, std::size_t n_bits, + align Align = align::no> using endian = endian_arithmetic<Order, T, n_bits, Align>; # endif diff --git a/contrib/restricted/boost/endian/ya.make b/contrib/restricted/boost/endian/ya.make index c2f7a6dd6a..a641f9cf28 100644 --- a/contrib/restricted/boost/endian/ya.make +++ b/contrib/restricted/boost/endian/ya.make @@ -6,15 +6,12 @@ LICENSE(BSL-1.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.83.0) +VERSION(1.84.0) -ORIGINAL_SOURCE(https://github.com/boostorg/endian/archive/boost-1.83.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/endian/archive/boost-1.84.0.tar.gz) PEERDIR( contrib/restricted/boost/config - contrib/restricted/boost/core - contrib/restricted/boost/static_assert - contrib/restricted/boost/type_traits ) ADDINCL( |