diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-12-19 07:21:37 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-12-19 07:41:37 +0300 |
commit | bb27117b9fffee67d433e1fdee486dccaeeb9502 (patch) | |
tree | e737c641e4ee5ced76268d6c1c20233d61d484d5 | |
parent | ceaf819ec17ae867a769a4df01be02e069cd20a6 (diff) | |
download | ydb-bb27117b9fffee67d433e1fdee486dccaeeb9502.tar.gz |
Update contrib/restricted/boost/mp11 to 1.87.0
commit_hash:40927cc9b86aa64dfa64c1c3c09e868d7b7f7a35
8 files changed, 239 insertions, 9 deletions
diff --git a/contrib/restricted/boost/mp11/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/mp11/.yandex_meta/devtools.copyrights.report index 2ad71a9b96..6482134139 100644 --- a/contrib/restricted/boost/mp11/.yandex_meta/devtools.copyrights.report +++ b/contrib/restricted/boost/mp11/.yandex_meta/devtools.copyrights.report @@ -81,7 +81,6 @@ BELONGS ya.make Score : 100.00 Match type : COPYRIGHT Files with this license: - include/boost/mp11.hpp [4:4] include/boost/mp11/detail/mp_map_find.hpp [4:4] include/boost/mp11/detail/mp_plus.hpp [4:4] include/boost/mp11/integral.hpp [4:4] @@ -136,6 +135,17 @@ BELONGS ya.make include/boost/mp11/detail/mp_count.hpp [4:4] include/boost/mp11/detail/mp_list.hpp [4:4] +KEEP COPYRIGHT_SERVICE_LABEL aa53a493e659c97cf28c1683cd4be365 +BELONGS ya.make + License text: + // Copyright 2015-2024 Peter Dimov. + Scancode info: + Original SPDX id: COPYRIGHT_SERVICE_LABEL + Score : 100.00 + Match type : COPYRIGHT + Files with this license: + include/boost/mp11.hpp [4:4] + KEEP COPYRIGHT_SERVICE_LABEL b280e59de7ebe0b280acf5004569984f BELONGS ya.make License text: @@ -160,6 +170,17 @@ BELONGS ya.make include/boost/mp11/detail/mp_rename.hpp [4:4] include/boost/mp11/list.hpp [4:4] +KEEP COPYRIGHT_SERVICE_LABEL c2c38b6a2143de73450b97fc281564d1 +BELONGS ya.make + License text: + // Copyright 2024 Joaquin M Lopez Munoz. + Scancode info: + Original SPDX id: COPYRIGHT_SERVICE_LABEL + Score : 100.00 + Match type : COPYRIGHT + Files with this license: + include/boost/mp11/lambda.hpp [4:4] + KEEP COPYRIGHT_SERVICE_LABEL cd293b74a3df4ce171f943aaee35b153 BELONGS ya.make License text: diff --git a/contrib/restricted/boost/mp11/.yandex_meta/devtools.licenses.report b/contrib/restricted/boost/mp11/.yandex_meta/devtools.licenses.report index f419b99376..232899b96e 100644 --- a/contrib/restricted/boost/mp11/.yandex_meta/devtools.licenses.report +++ b/contrib/restricted/boost/mp11/.yandex_meta/devtools.licenses.report @@ -87,6 +87,7 @@ BELONGS ya.make include/boost/mp11/detail/mp_void.hpp [6:9] include/boost/mp11/detail/mp_with_index.hpp [6:9] include/boost/mp11/integral.hpp [6:9] + include/boost/mp11/lambda.hpp [6:9] include/boost/mp11/list.hpp [6:9] include/boost/mp11/map.hpp [6:9] include/boost/mp11/tuple.hpp [6:9] diff --git a/contrib/restricted/boost/mp11/.yandex_meta/licenses.list.txt b/contrib/restricted/boost/mp11/.yandex_meta/licenses.list.txt index 6af4f2f4ac..f8a79dab2e 100644 --- a/contrib/restricted/boost/mp11/.yandex_meta/licenses.list.txt +++ b/contrib/restricted/boost/mp11/.yandex_meta/licenses.list.txt @@ -59,6 +59,10 @@ Distributed under the [Boost Software License, Version 1.0](http://boost.org/LIC ====================COPYRIGHT==================== +// Copyright 2015-2024 Peter Dimov. + + +====================COPYRIGHT==================== // Copyright 2017 Peter Dimov. @@ -71,6 +75,10 @@ Distributed under the [Boost Software License, Version 1.0](http://boost.org/LIC ====================COPYRIGHT==================== +// Copyright 2024 Joaquin M Lopez Munoz. + + +====================COPYRIGHT==================== // Copyright 2015, 2017, 2019 Peter Dimov. diff --git a/contrib/restricted/boost/mp11/include/boost/mp11.hpp b/contrib/restricted/boost/mp11/include/boost/mp11.hpp index 5e459395fe..799a3063a8 100644 --- a/contrib/restricted/boost/mp11/include/boost/mp11.hpp +++ b/contrib/restricted/boost/mp11/include/boost/mp11.hpp @@ -1,7 +1,7 @@ #ifndef BOOST_MP11_HPP_INCLUDED #define BOOST_MP11_HPP_INCLUDED -// Copyright 2015 Peter Dimov. +// Copyright 2015-2024 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // @@ -16,6 +16,7 @@ #include <boost/mp11/map.hpp> #include <boost/mp11/set.hpp> #include <boost/mp11/bind.hpp> +#include <boost/mp11/lambda.hpp> #include <boost/mp11/integer_sequence.hpp> #include <boost/mp11/tuple.hpp> diff --git a/contrib/restricted/boost/mp11/include/boost/mp11/detail/mp_count.hpp b/contrib/restricted/boost/mp11/include/boost/mp11/detail/mp_count.hpp index 37b39ed547..bc8aed93e9 100644 --- a/contrib/restricted/boost/mp11/include/boost/mp11/detail/mp_count.hpp +++ b/contrib/restricted/boost/mp11/include/boost/mp11/detail/mp_count.hpp @@ -51,9 +51,9 @@ template<class V, class... T> constexpr std::size_t cx_count() std::size_t r = 0; - for( std::size_t i = 1; i < sizeof...(T) + 1; ++i ) + for( std::size_t i = 0; i < sizeof...(T); ++i ) { - r += a[ i ]; + r += a[ i+1 ]; } return r; @@ -98,9 +98,9 @@ template<template<class...> class P, class... T> constexpr std::size_t cx_count_ std::size_t r = 0; - for( std::size_t i = 1; i < sizeof...(T) + 1; ++i ) + for( std::size_t i = 0; i < sizeof...(T); ++i ) { - r += a[ i ]; + r += a[ i+1 ]; } return r; diff --git a/contrib/restricted/boost/mp11/include/boost/mp11/lambda.hpp b/contrib/restricted/boost/mp11/include/boost/mp11/lambda.hpp new file mode 100644 index 0000000000..3d027c2a69 --- /dev/null +++ b/contrib/restricted/boost/mp11/include/boost/mp11/lambda.hpp @@ -0,0 +1,199 @@ +#ifndef BOOST_MP11_LAMBDA_HPP_INCLUDED +#define BOOST_MP11_LAMBDA_HPP_INCLUDED + +// Copyright 2024 Joaquin M Lopez Munoz. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include <boost/mp11/detail/config.hpp> + +#if BOOST_MP11_WORKAROUND(BOOST_MP11_MSVC, <= 1800) + +// mp_lambda not supported due to compiler limitations + +#else + +#include <boost/mp11/bind.hpp> +#include <cstddef> +#include <type_traits> + +#if defined(_MSC_VER) || defined(__GNUC__) +# pragma push_macro( "I" ) +# undef I +#endif + +namespace boost +{ +namespace mp11 +{ +namespace detail +{ + +template<class T> struct lambda_impl; + +} // namespace detail + +// mp_lambda +template<class T> using mp_lambda = typename detail::lambda_impl<T>::type; + +namespace detail +{ + +// base case (no placeholder replacement) +template<class T> struct lambda_impl +{ + template<class... U> using make = T; + using type = mp_bind<make>; +}; + +// placeholders (behave directly as mp_bind expressions) +template<std::size_t I> struct lambda_impl<mp_arg<I>> +{ + using type = mp_arg<I>; +}; + +#define BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(name, compound_type) \ +template<class T> using lambda_make_##name = compound_type; \ + \ +template<class T> struct lambda_impl<compound_type> \ +{ \ + using type = mp_bind<lambda_make_##name, mp_lambda<T>>; \ +}; + +// [basic.type.qualifier] +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(const, const T) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(volatile, volatile T) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(const_volatile, const volatile T) + +// [dcl.ptr] +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(pointer, T*) + +// [dcl.ref] +// GCC < 7 fails with template<class U> using make = U&; +template<class T> struct lambda_impl<T&> +{ + template<class U> using make = typename std::add_lvalue_reference<U>::type; + using type = mp_bind<make, mp_lambda<T>>; +}; + +template<class T> struct lambda_impl<T&&> +{ + template<class U> using make = typename std::add_rvalue_reference<U>::type; + using type = mp_bind<make, mp_lambda<T>>; +}; + +// [dcl.array] +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL(array, T[]) + +#undef BOOST_MP11_SPECIALIZE_LAMBDA_IMPL + +template<class T, std::size_t N> struct lambda_impl<T[N]> +{ + template<class Q> using make = Q[N]; + using type = mp_bind<make, mp_lambda<T>>; +}; + +// [dcl.fct], [dcl.mptr] (member functions) +#define BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(name, qualifier) \ +template<class R, class... T> using lambda_make_fct_##name = R(T...) qualifier; \ + \ +template<class R, class... T> struct lambda_impl<R(T...) qualifier> \ +{ \ + using type = mp_bind< \ + lambda_make_fct_##name, \ + mp_lambda<R>, mp_lambda<T>...>; \ +}; \ + \ +template<class R, class... T> using lambda_make_fct_##name##_ellipsis = \ + R(T..., ...) qualifier; \ + \ +template<class R, class... T> struct lambda_impl<R(T..., ...) qualifier> \ +{ \ + using type = mp_bind< \ + lambda_make_fct_##name##_ellipsis, \ + mp_lambda<R>, mp_lambda<T>...>; \ +}; \ + \ +template<class R, class C, class... T> using lambda_make_mfptr_##name = \ + R (C::*)(T...) qualifier; \ + \ +template<class R, class C, class... T> struct lambda_impl<R (C::*)(T...) qualifier> \ +{ \ + using type = mp_bind< \ + lambda_make_mfptr_##name, \ + mp_lambda<R>, mp_lambda<C>, mp_lambda<T>...>; \ +}; \ + \ +template<class R, class C, class... T> using lambda_make_mfptr_##name##_ellipsis = \ + R (C::*)(T..., ...) qualifier; \ + \ +template<class R, class C, class... T> struct lambda_impl<R (C::*)(T..., ...) qualifier> \ +{ \ + using type = mp_bind< \ + lambda_make_mfptr_##name##_ellipsis, \ + mp_lambda<R>, mp_lambda<C>, mp_lambda<T>...>; \ +}; + +#define BOOST_MP11_LAMBDA_EMPTY() + +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(no_qualifier, BOOST_MP11_LAMBDA_EMPTY()) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const, const) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile, volatile) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile, const volatile) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(ref, &) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_ref, const&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile_ref, volatile&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile_ref, const volatile&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(rvalue_ref, &&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_rvalue_ref, const&&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile_rvalue_ref, volatile&&) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile_rvalue_ref, const volatile&&) + +#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L + +// P0012R1: exception specification as part of the type system +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(noexcept, noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_noexcept, const noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile_noexcept, volatile noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile_noexcept, const volatile noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(ref_noexcept, & noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_ref_noexcept, const& noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile_ref_noexcept, volatile& noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile_ref_noexcept, const volatile& noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(rvalue_ref_noexcept, && noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_rvalue_ref_noexcept, const&& noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(volatile_rvalue_ref_noexcept, volatile&& noexcept) +BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR(const_volatile_rvalue_ref_noexcept, const volatile&& noexcept) + +#endif // P0012R1 + +#undef BOOST_MP11_LAMBDA_EMPTY +#undef BOOST_MP11_SPECIALIZE_LAMBDA_IMPL_FCT_AND_MFPTR + +// [dcl.mptr] (data members) +template<class T, class C> struct lambda_impl<T C::*> +{ + template<class U, class D> using make = U D::*; + using type = mp_bind<make, mp_lambda<T>, mp_lambda<C>>; +}; + +// template class instantiation +template<template <class...> class C, class... Ts> struct lambda_impl<C<Ts...>> +{ + using type = mp_bind<C, mp_lambda<Ts>...>; +}; + +} // namespace detail +} // namespace mp11 +} // namespace boost + +#if defined(_MSC_VER) || defined(__GNUC__) +# pragma pop_macro( "I" ) +#endif + +#endif // mp_lambda supported + +#endif // #ifndef BOOST_MP11_LAMBDA_HPP_INCLUDED diff --git a/contrib/restricted/boost/mp11/include/boost/mp11/version.hpp b/contrib/restricted/boost/mp11/include/boost/mp11/version.hpp index d991a7657f..381068358d 100644 --- a/contrib/restricted/boost/mp11/include/boost/mp11/version.hpp +++ b/contrib/restricted/boost/mp11/include/boost/mp11/version.hpp @@ -11,6 +11,6 @@ // Same format as BOOST_VERSION: // major * 100000 + minor * 100 + patch -#define BOOST_MP11_VERSION 108600 +#define BOOST_MP11_VERSION 108700 #endif // #ifndef BOOST_MP11_VERSION_HPP_INCLUDED diff --git a/contrib/restricted/boost/mp11/ya.make b/contrib/restricted/boost/mp11/ya.make index 1299acc117..e8c641ac18 100644 --- a/contrib/restricted/boost/mp11/ya.make +++ b/contrib/restricted/boost/mp11/ya.make @@ -6,9 +6,9 @@ LICENSE(BSL-1.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.86.0) +VERSION(1.87.0) -ORIGINAL_SOURCE(https://github.com/boostorg/mp11/archive/boost-1.86.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/boostorg/mp11/archive/boost-1.87.0.tar.gz) ADDINCL( GLOBAL contrib/restricted/boost/mp11/include |