diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-04-23 11:33:26 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-04-23 11:48:00 +0300 |
commit | ae5472d0928c374dc719b154c9dcb2be6e0a0695 (patch) | |
tree | 1b462a98533621ad7b782e5079726c5ad6734a3c | |
parent | 788be0726a19c2cbb4153cadd5a530fdaabf1cf9 (diff) | |
download | ydb-ae5472d0928c374dc719b154c9dcb2be6e0a0695.tar.gz |
Update contrib/restricted/boost/core to 1.85.0
1bb2acda6377c988e483392dfbb76ef5b0a6adec
-rw-r--r-- | contrib/restricted/boost/core/include/boost/core/bit.hpp | 20 | ||||
-rw-r--r-- | contrib/restricted/boost/core/include/boost/core/checked_delete.hpp | 9 | ||||
-rw-r--r-- | contrib/restricted/boost/core/ya.make | 4 |
3 files changed, 30 insertions, 3 deletions
diff --git a/contrib/restricted/boost/core/include/boost/core/bit.hpp b/contrib/restricted/boost/core/include/boost/core/bit.hpp index a6147e4d44..cebc87877f 100644 --- a/contrib/restricted/boost/core/include/boost/core/bit.hpp +++ b/contrib/restricted/boost/core/include/boost/core/bit.hpp @@ -47,12 +47,19 @@ # if __has_builtin(__builtin_bit_cast) # define BOOST_CORE_HAS_BUILTIN_BIT_CAST # endif +# if __has_builtin(__builtin_bswap16) +# define BOOST_CORE_HAS_BUILTIN_BSWAP16 +# endif #endif -#if defined(BOOST_MSVC) && BOOST_MSVC >= 1926 +#if !defined(BOOST_CORE_HAS_BUILTIN_BIT_CAST) && (defined(BOOST_MSVC) && BOOST_MSVC >= 1926) # define BOOST_CORE_HAS_BUILTIN_BIT_CAST #endif +#if !defined(BOOST_CORE_HAS_BUILTIN_BSWAP16) && (defined(BOOST_GCC) && BOOST_GCC >= 40800) +# define BOOST_CORE_HAS_BUILTIN_BSWAP16 +#endif + namespace boost { namespace core @@ -825,11 +832,22 @@ BOOST_CONSTEXPR inline boost::uint8_t byteswap_impl( boost::uint8_t x ) BOOST_NO return x; } +#if defined(BOOST_CORE_HAS_BUILTIN_BSWAP16) + +BOOST_CONSTEXPR inline boost::uint16_t byteswap_impl( boost::uint16_t x ) BOOST_NOEXCEPT +{ + return __builtin_bswap16( x ); +} + +#else + BOOST_CONSTEXPR inline boost::uint16_t byteswap_impl( boost::uint16_t x ) BOOST_NOEXCEPT { return static_cast<boost::uint16_t>( x << 8 | x >> 8 ); } +#endif + #if defined(__GNUC__) || defined(__clang__) BOOST_CXX14_CONSTEXPR inline boost::uint32_t byteswap_impl( boost::uint32_t x ) BOOST_NOEXCEPT diff --git a/contrib/restricted/boost/core/include/boost/core/checked_delete.hpp b/contrib/restricted/boost/core/include/boost/core/checked_delete.hpp index b74a43afab..67f3c74287 100644 --- a/contrib/restricted/boost/core/include/boost/core/checked_delete.hpp +++ b/contrib/restricted/boost/core/include/boost/core/checked_delete.hpp @@ -60,6 +60,10 @@ template<class T> inline void checked_array_delete(T * x) BOOST_NOEXCEPT delete [] x; } +// Block unintended ADL +namespace checked_deleters +{ + template<class T> struct checked_deleter { typedef void result_type; @@ -83,6 +87,11 @@ template<class T> struct checked_array_deleter } }; +} // namespace checked_deleters + +using checked_deleters::checked_deleter; +using checked_deleters::checked_array_deleter; + } // namespace boost #endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP diff --git a/contrib/restricted/boost/core/ya.make b/contrib/restricted/boost/core/ya.make index 659d5028d3..2852b74662 100644 --- a/contrib/restricted/boost/core/ya.make +++ b/contrib/restricted/boost/core/ya.make @@ -9,9 +9,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.84.0) +VERSION(1.85.0) -ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.84.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.85.0.tar.gz) PEERDIR( contrib/restricted/boost/assert |