diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2025-04-26 11:39:29 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2025-04-26 12:39:05 +0300 |
commit | 388d08032fcefee22ec17aa129181f1202a53a6c (patch) | |
tree | 151b72cd445318c0c00a0757e895e6d5c6296254 | |
parent | 6731becdc8fd407c6b048b8aea4ace312232dce4 (diff) | |
download | ydb-388d08032fcefee22ec17aa129181f1202a53a6c.tar.gz |
Update contrib/restricted/boost/core to 1.88.0
commit_hash:b3b4c89b830227d9a615540e9c2517ab1249374f
9 files changed, 57 insertions, 23 deletions
diff --git a/contrib/restricted/boost/core/.yandex_meta/default.nix b/contrib/restricted/boost/core/.yandex_meta/default.nix index 9c89c67b67d..9c4a538943c 100644 --- a/contrib/restricted/boost/core/.yandex_meta/default.nix +++ b/contrib/restricted/boost/core/.yandex_meta/default.nix @@ -1,13 +1,13 @@ self: super: with self; { boost_core = stdenv.mkDerivation rec { pname = "boost_core"; - version = "1.87.0"; + version = "1.88.0"; src = fetchFromGitHub { owner = "boostorg"; repo = "core"; rev = "boost-${version}"; - hash = "sha256-jfMBu2K9peGzT/rtvrBXHdN5z17GiwQjUQ0cO6OWU18="; + hash = "sha256-TwmbaVG3kXsV4c6crM5bTlmmw5S+8ZUbVqvlSCwrW7U="; }; }; } diff --git a/contrib/restricted/boost/core/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/core/.yandex_meta/devtools.copyrights.report index 46306a59b44..3eb6a992807 100644 --- a/contrib/restricted/boost/core/.yandex_meta/devtools.copyrights.report +++ b/contrib/restricted/boost/core/.yandex_meta/devtools.copyrights.report @@ -747,6 +747,18 @@ BELONGS ya.make Files with this license: include/boost/core/ref.hpp [16:18] +KEEP COPYRIGHT_SERVICE_LABEL f7e44300e4f56bdab9817c087cb9875c +BELONGS ya.make + License text: + Copyright 2025 Glen Joseph Fernandes + (glenjofe@gmail.com) + Scancode info: + Original SPDX id: COPYRIGHT_SERVICE_LABEL + Score : 100.00 + Match type : COPYRIGHT + Files with this license: + include/boost/core/detail/assert.hpp [2:3] + KEEP COPYRIGHT_SERVICE_LABEL faedff635aa9f9a8a18d7c7c02b75e2d BELONGS ya.make License text: diff --git a/contrib/restricted/boost/core/.yandex_meta/devtools.licenses.report b/contrib/restricted/boost/core/.yandex_meta/devtools.licenses.report index 6d69963dd74..407989986c7 100644 --- a/contrib/restricted/boost/core/.yandex_meta/devtools.licenses.report +++ b/contrib/restricted/boost/core/.yandex_meta/devtools.licenses.report @@ -166,6 +166,7 @@ BELONGS ya.make include/boost/core/allocator_traits.hpp [6:6] include/boost/core/data.hpp [6:6] include/boost/core/default_allocator.hpp [6:6] + include/boost/core/detail/assert.hpp [6:6] include/boost/core/first_scalar.hpp [6:6] include/boost/core/make_span.hpp [6:6] include/boost/core/noinit_adaptor.hpp [6:6] @@ -454,6 +455,7 @@ BELONGS ya.make include/boost/core/allocator_traits.hpp [5:5] include/boost/core/data.hpp [5:5] include/boost/core/default_allocator.hpp [5:5] + include/boost/core/detail/assert.hpp [5:5] include/boost/core/first_scalar.hpp [5:5] include/boost/core/make_span.hpp [5:5] include/boost/core/noinit_adaptor.hpp [5:5] diff --git a/contrib/restricted/boost/core/.yandex_meta/licenses.list.txt b/contrib/restricted/boost/core/.yandex_meta/licenses.list.txt index 9e0c4d19d09..605f9dc5e6f 100644 --- a/contrib/restricted/boost/core/.yandex_meta/licenses.list.txt +++ b/contrib/restricted/boost/core/.yandex_meta/licenses.list.txt @@ -414,5 +414,10 @@ Copyright 2024 Glen Joseph Fernandes (glenjofe@gmail.com) +====================COPYRIGHT==================== +Copyright 2025 Glen Joseph Fernandes +(glenjofe@gmail.com) + + ====================Public-Domain==================== // derived from Sebastiano Vigna's public domain implementation diff --git a/contrib/restricted/boost/core/include/boost/core/detail/assert.hpp b/contrib/restricted/boost/core/include/boost/core/detail/assert.hpp new file mode 100644 index 00000000000..d677e2e015f --- /dev/null +++ b/contrib/restricted/boost/core/include/boost/core/detail/assert.hpp @@ -0,0 +1,18 @@ +/* +Copyright 2025 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#undef BOOST_CORE_DETAIL_ASSERT + +#if !defined(__clang__) && \ + !defined(__INTEL_COMPILER) && \ + defined(__GNUC__) && \ + (__GNUC__ < 5) +#define BOOST_CORE_DETAIL_ASSERT(expr) void(0) +#else +#include <boost/assert.hpp> +#define BOOST_CORE_DETAIL_ASSERT(expr) BOOST_ASSERT(expr) +#endif diff --git a/contrib/restricted/boost/core/include/boost/core/detail/sp_thread_sleep.hpp b/contrib/restricted/boost/core/include/boost/core/detail/sp_thread_sleep.hpp index f461c3fd1ea..bb5b1e08725 100644 --- a/contrib/restricted/boost/core/include/boost/core/detail/sp_thread_sleep.hpp +++ b/contrib/restricted/boost/core/include/boost/core/detail/sp_thread_sleep.hpp @@ -67,7 +67,7 @@ namespace core inline void sp_thread_sleep() BOOST_NOEXCEPT { -#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) +#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) && !defined(__OHOS__) int oldst; pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &oldst ); @@ -85,7 +85,7 @@ inline void sp_thread_sleep() BOOST_NOEXCEPT nanosleep( &rqtp, 0 ); -#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) +#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) && !defined(__OHOS__) pthread_setcancelstate( oldst, &oldst ); diff --git a/contrib/restricted/boost/core/include/boost/core/detail/string_view.hpp b/contrib/restricted/boost/core/include/boost/core/detail/string_view.hpp index 5cce6f6cecc..92f1313812b 100644 --- a/contrib/restricted/boost/core/include/boost/core/detail/string_view.hpp +++ b/contrib/restricted/boost/core/include/boost/core/detail/string_view.hpp @@ -41,9 +41,6 @@ namespace boost // forward declaration of boost::basic_string_view from Utility template<class Ch, class Tr> class basic_string_view; -// forward declaration of boost::hash_range from ContainerHash -template<class It> std::size_t hash_range( It, It ); - namespace core { namespace detail @@ -381,7 +378,7 @@ public: } template<class End> BOOST_CXX14_CONSTEXPR basic_string_view( Ch const* first, End last, - typename boost::enable_if<boost::core::detail::is_same<End, Ch const*> >::type* = 0 ) BOOST_NOEXCEPT: p_( first ), n_( static_cast<size_type>( last - first ) ) + typename boost::enable_if<boost::core::detail::is_same<End, Ch const*>, int >::type = 0 ) BOOST_NOEXCEPT: p_( first ), n_( static_cast<size_type>( last - first ) ) { BOOST_ASSERT( last - first >= 0 ); } @@ -399,7 +396,7 @@ public: #endif template<class Ch2> basic_string_view( boost::basic_string_view<Ch2, std::char_traits<Ch2> > const& str, - typename boost::enable_if<boost::core::detail::is_same<Ch, Ch2> >::type* = 0 ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) + typename boost::enable_if<boost::core::detail::is_same<Ch, Ch2>, int >::type = 0 ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) { } @@ -1181,11 +1178,6 @@ public: } #endif - - inline friend std::size_t hash_value( basic_string_view const& sv ) - { - return boost::hash_range( sv.begin(), sv.end() ); - } }; // stream inserter diff --git a/contrib/restricted/boost/core/include/boost/core/span.hpp b/contrib/restricted/boost/core/include/boost/core/span.hpp index 2e64262dcad..3a602c25809 100644 --- a/contrib/restricted/boost/core/include/boost/core/span.hpp +++ b/contrib/restricted/boost/core/include/boost/core/span.hpp @@ -8,6 +8,7 @@ Distributed under the Boost Software License, Version 1.0. #ifndef BOOST_CORE_SPAN_HPP #define BOOST_CORE_SPAN_HPP +#include <boost/core/detail/assert.hpp> #include <boost/core/data.hpp> #include <array> #include <iterator> @@ -274,17 +275,21 @@ public: } constexpr span<T, dynamic_extent> first(size_type c) const { - return span<T, dynamic_extent>(s_.p, c); + return BOOST_CORE_DETAIL_ASSERT(c <= size()), + span<T, dynamic_extent>(s_.p, c); } constexpr span<T, dynamic_extent> last(size_type c) const { - return span<T, dynamic_extent>(s_.p + (s_.n - c), c); + return BOOST_CORE_DETAIL_ASSERT(c <= size()), + span<T, dynamic_extent>(s_.p + (s_.n - c), c); } constexpr span<T, dynamic_extent> subspan(size_type o, size_type c = dynamic_extent) const { - return span<T, dynamic_extent>(s_.p + o, - c == dynamic_extent ? s_.n - o : c); + return BOOST_CORE_DETAIL_ASSERT(o <= size() && + (c == dynamic_extent || c + o <= size())), + span<T, dynamic_extent>(s_.p + o, + c == dynamic_extent ? s_.n - o : c); } constexpr size_type size() const noexcept { @@ -300,15 +305,15 @@ public: } constexpr reference operator[](size_type i) const { - return s_.p[i]; + return BOOST_CORE_DETAIL_ASSERT(i < size()), s_.p[i]; } constexpr reference front() const { - return *s_.p; + return BOOST_CORE_DETAIL_ASSERT(!empty()), *s_.p; } constexpr reference back() const { - return s_.p[s_.n - 1]; + return BOOST_CORE_DETAIL_ASSERT(!empty()), s_.p[s_.n - 1]; } constexpr pointer data() const noexcept { diff --git a/contrib/restricted/boost/core/ya.make b/contrib/restricted/boost/core/ya.make index 9c25aca222d..61cf10c16c8 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.87.0) +VERSION(1.88.0) -ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.87.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.88.0.tar.gz) PEERDIR( contrib/restricted/boost/assert |