aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/boost
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-05-09 17:58:54 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-05-09 17:58:54 +0300
commit520e5b3048293285df02d1d268d9b1d035bb803e (patch)
tree6055a1cceed48d6baccf23e472621082335808ba /contrib/restricted/boost
parente6040dda7b999bdb3850fdb954e620f93900c431 (diff)
downloadydb-520e5b3048293285df02d1d268d9b1d035bb803e.tar.gz
Update contrib/restricted/boost/function to 1.82.0
Diffstat (limited to 'contrib/restricted/boost')
-rw-r--r--contrib/restricted/boost/function/CMakeLists.darwin-x86_64.txt2
-rw-r--r--contrib/restricted/boost/function/CMakeLists.linux-aarch64.txt2
-rw-r--r--contrib/restricted/boost/function/CMakeLists.linux-x86_64.txt2
-rw-r--r--contrib/restricted/boost/function/CMakeLists.windows-x86_64.txt2
-rw-r--r--contrib/restricted/boost/function/include/boost/function.hpp2
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp39
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp1
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp22
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function_base.hpp60
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function_template.hpp12
10 files changed, 102 insertions, 42 deletions
diff --git a/contrib/restricted/boost/function/CMakeLists.darwin-x86_64.txt b/contrib/restricted/boost/function/CMakeLists.darwin-x86_64.txt
index 5eed0832c4..b70e979a9a 100644
--- a/contrib/restricted/boost/function/CMakeLists.darwin-x86_64.txt
+++ b/contrib/restricted/boost/function/CMakeLists.darwin-x86_64.txt
@@ -17,10 +17,8 @@ target_link_libraries(restricted-boost-function INTERFACE
restricted-boost-bind
restricted-boost-config
restricted-boost-core
- restricted-boost-integer
restricted-boost-preprocessor
restricted-boost-throw_exception
- restricted-boost-type_index
restricted-boost-type_traits
restricted-boost-typeof
)
diff --git a/contrib/restricted/boost/function/CMakeLists.linux-aarch64.txt b/contrib/restricted/boost/function/CMakeLists.linux-aarch64.txt
index a963bc1c02..8099951df8 100644
--- a/contrib/restricted/boost/function/CMakeLists.linux-aarch64.txt
+++ b/contrib/restricted/boost/function/CMakeLists.linux-aarch64.txt
@@ -18,10 +18,8 @@ target_link_libraries(restricted-boost-function INTERFACE
restricted-boost-bind
restricted-boost-config
restricted-boost-core
- restricted-boost-integer
restricted-boost-preprocessor
restricted-boost-throw_exception
- restricted-boost-type_index
restricted-boost-type_traits
restricted-boost-typeof
)
diff --git a/contrib/restricted/boost/function/CMakeLists.linux-x86_64.txt b/contrib/restricted/boost/function/CMakeLists.linux-x86_64.txt
index a963bc1c02..8099951df8 100644
--- a/contrib/restricted/boost/function/CMakeLists.linux-x86_64.txt
+++ b/contrib/restricted/boost/function/CMakeLists.linux-x86_64.txt
@@ -18,10 +18,8 @@ target_link_libraries(restricted-boost-function INTERFACE
restricted-boost-bind
restricted-boost-config
restricted-boost-core
- restricted-boost-integer
restricted-boost-preprocessor
restricted-boost-throw_exception
- restricted-boost-type_index
restricted-boost-type_traits
restricted-boost-typeof
)
diff --git a/contrib/restricted/boost/function/CMakeLists.windows-x86_64.txt b/contrib/restricted/boost/function/CMakeLists.windows-x86_64.txt
index 5eed0832c4..b70e979a9a 100644
--- a/contrib/restricted/boost/function/CMakeLists.windows-x86_64.txt
+++ b/contrib/restricted/boost/function/CMakeLists.windows-x86_64.txt
@@ -17,10 +17,8 @@ target_link_libraries(restricted-boost-function INTERFACE
restricted-boost-bind
restricted-boost-config
restricted-boost-core
- restricted-boost-integer
restricted-boost-preprocessor
restricted-boost-throw_exception
- restricted-boost-type_index
restricted-boost-type_traits
restricted-boost-typeof
)
diff --git a/contrib/restricted/boost/function/include/boost/function.hpp b/contrib/restricted/boost/function/include/boost/function.hpp
index ef907e0ff1..f6ee8820ac 100644
--- a/contrib/restricted/boost/function/include/boost/function.hpp
+++ b/contrib/restricted/boost/function/include/boost/function.hpp
@@ -71,4 +71,6 @@
# undef BOOST_PP_ITERATION_PARAMS_1
#endif
+#include <boost/function/detail/epilogue.hpp>
+
#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp b/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp
new file mode 100644
index 0000000000..908788bcd1
--- /dev/null
+++ b/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp
@@ -0,0 +1,39 @@
+// Boost.Function library
+
+#ifndef BOOST_FUNCTION_EPILOGUE_HPP
+#define BOOST_FUNCTION_EPILOGUE_HPP
+
+// Copyright 2023 Peter Dimov
+// Distributed under the Boost Software License, Version 1.0.
+// https://www.boost.org/LICENSE_1_0.txt
+
+// Resolve C++20 issue with fn == bind(...)
+// https://github.com/boostorg/function/issues/45
+
+#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+
+namespace boost
+{
+
+namespace _bi
+{
+
+template<class R, class F, class L> class bind_t;
+
+} // namespace _bi
+
+template<class S, class R, class F, class L> bool operator==( function<S> const& f, _bi::bind_t<R, F, L> const& b )
+{
+ return f.contains( b );
+}
+
+template<class S, class R, class F, class L> bool operator!=( function<S> const& f, _bi::bind_t<R, F, L> const& b )
+{
+ return !f.contains( b );
+}
+
+} // namespace boost
+
+#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+
+#endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp b/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp
index 53d0f05cd3..2edebe0613 100644
--- a/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_FUNCTION_PROLOGUE_HPP
#define BOOST_FUNCTION_PROLOGUE_HPP
+# include <boost/function/detail/requires_cxx11.hpp>
# include <cassert>
# include <algorithm>
# include <boost/config/no_tr1/functional.hpp> // unary_function, binary_function
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp b/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp
new file mode 100644
index 0000000000..a68da218c4
--- /dev/null
+++ b/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp
@@ -0,0 +1,22 @@
+#ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
+#define BOOST_FUNCTION_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_HDR_FUNCTIONAL)
+
+BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Function 1.82 and will be removed in Boost.Function 1.84.")
+
+#endif
+
+#endif // #ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
diff --git a/contrib/restricted/boost/function/include/boost/function/function_base.hpp b/contrib/restricted/boost/function/include/boost/function/function_base.hpp
index 14185323d4..5693e11e96 100644
--- a/contrib/restricted/boost/function/include/boost/function/function_base.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function_base.hpp
@@ -11,31 +11,27 @@
#ifndef BOOST_FUNCTION_BASE_HEADER
#define BOOST_FUNCTION_BASE_HEADER
-#include <stdexcept>
-#include <string>
-#include <memory>
-#include <new>
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-#include <boost/integer.hpp>
-#include <boost/type_index.hpp>
+#include <boost/function/function_fwd.hpp>
+#include <boost/function_equal.hpp>
+#include <boost/core/typeinfo.hpp>
+#include <boost/core/ref.hpp>
#include <boost/type_traits/has_trivial_copy.hpp>
#include <boost/type_traits/has_trivial_destructor.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/composite_traits.hpp>
-#include <boost/ref.hpp>
#include <boost/type_traits/conditional.hpp>
-#include <boost/config/workaround.hpp>
#include <boost/type_traits/alignment_of.hpp>
-#ifndef BOOST_NO_SFINAE
#include <boost/type_traits/enable_if.hpp>
-#else
#include <boost/type_traits/integral_constant.hpp>
-#endif
-#include <boost/function_equal.hpp>
-#include <boost/function/function_fwd.hpp>
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+#include <stdexcept>
+#include <string>
+#include <memory>
+#include <new>
#if defined(BOOST_MSVC)
# pragma warning( push )
@@ -74,7 +70,7 @@ namespace boost {
// For pointers to std::type_info objects
struct type_t {
// (get_functor_type_tag, check_functor_type_tag).
- const boost::typeindex::type_info* type;
+ const boost::core::typeinfo* type;
// Whether the type is const-qualified.
bool const_qualified;
@@ -204,7 +200,7 @@ namespace boost {
{
// Check whether we have the same type. We can add
// cv-qualifiers, but we can't take them away.
- if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
+ if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(F)
&& (!in_buffer.members.obj_ref.is_const_qualified
|| out_buffer.members.type.const_qualified)
&& (!in_buffer.members.obj_ref.is_volatile_qualified
@@ -216,7 +212,7 @@ namespace boost {
return;
case get_functor_type_tag:
- out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(F);
out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
return;
@@ -276,12 +272,12 @@ namespace boost {
} else if (op == destroy_functor_tag)
out_buffer.members.func_ptr = 0;
else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
else
out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
}
@@ -308,12 +304,12 @@ namespace boost {
(void)f; // suppress warning about the value of f not being used (MSVC)
f->~Functor();
} else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
out_buffer.members.obj_ptr = in_buffer.data;
else
out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
}
@@ -367,12 +363,12 @@ namespace boost {
delete f;
out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
else
out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
}
@@ -406,7 +402,7 @@ namespace boost {
{
typedef typename get_function_tag<functor_type>::type tag_type;
if (op == get_functor_type_tag) {
- out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(functor_type);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
} else {
@@ -485,12 +481,12 @@ namespace boost {
wrapper_allocator.deallocate(victim,1);
out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ if (*out_buffer.members.type.type == BOOST_CORE_TYPEID(Functor))
out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
else
out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(Functor);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
}
@@ -516,7 +512,7 @@ namespace boost {
{
typedef typename get_function_tag<functor_type>::type tag_type;
if (op == get_functor_type_tag) {
- out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.type = &BOOST_CORE_TYPEID(functor_type);
out_buffer.members.type.const_qualified = false;
out_buffer.members.type.volatile_qualified = false;
} else {
@@ -616,9 +612,9 @@ public:
/** Retrieve the type of the stored function object, or type_id<void>()
if this is empty. */
- const boost::typeindex::type_info& target_type() const
+ const boost::core::typeinfo& target_type() const
{
- if (!vtable) return boost::typeindex::type_id<void>().type_info();
+ if (!vtable) return BOOST_CORE_TYPEID(void);
detail::function::function_buffer type;
get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
@@ -631,7 +627,7 @@ public:
if (!vtable) return 0;
detail::function::function_buffer type_result;
- type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.type = &BOOST_CORE_TYPEID(Functor);
type_result.members.type.const_qualified = is_const<Functor>::value;
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
get_vtable()->manager(functor, type_result,
@@ -645,7 +641,7 @@ public:
if (!vtable) return 0;
detail::function::function_buffer type_result;
- type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.type = &BOOST_CORE_TYPEID(Functor);
type_result.members.type.const_qualified = true;
type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
get_vtable()->manager(functor, type_result,
diff --git a/contrib/restricted/boost/function/include/boost/function/function_template.hpp b/contrib/restricted/boost/function/include/boost/function/function_template.hpp
index dcfc8f0031..2381446412 100644
--- a/contrib/restricted/boost/function/include/boost/function/function_template.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function_template.hpp
@@ -501,8 +501,16 @@ namespace boost {
void clear(function_buffer& functor) const
{
+#if defined(BOOST_GCC) && (__GNUC__ >= 11)
+# pragma GCC diagnostic push
+// False positive in GCC 11/12 for empty function objects
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
if (base.manager)
base.manager(functor, functor, destroy_functor_tag);
+#if defined(BOOST_GCC) && (__GNUC__ >= 11)
+# pragma GCC diagnostic pop
+#endif
}
private:
@@ -906,8 +914,8 @@ namespace boost {
// This warning is technically correct, but we don't want to pay the price for initializing
// just to silence a warning: https://github.com/boostorg/function/issues/27
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-# if (BOOST_GCC >= 120000)
- // GCC 12 emits a different warning: https://github.com/boostorg/function/issues/42
+# if (BOOST_GCC >= 110000)
+ // GCC 11.3, 12 emit a different warning: https://github.com/boostorg/function/issues/42
# pragma GCC diagnostic ignored "-Wuninitialized"
# endif
# endif