aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-08-12 11:12:40 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-08-12 11:24:52 +0300
commit00a132e24c5a4eded564dc67fe89d90f687491dc (patch)
tree64e78aae0f3aaf9362a6884c18eb91054df7bcfc /contrib
parent67092572fe38e11cdfbe8c66fe5ab30ffe9a4264 (diff)
downloadydb-00a132e24c5a4eded564dc67fe89d90f687491dc.tar.gz
Fix reimport of certain boost projects
0c08c54d59f214854ecd6e5c51ad41c6ebf6986d
Diffstat (limited to 'contrib')
-rw-r--r--contrib/restricted/boost/bimap/include/boost/bimap/container_adaptor/detail/identity_converters.hpp3
-rw-r--r--contrib/restricted/boost/core/include/boost/core/allocator_access.hpp26
-rw-r--r--contrib/restricted/boost/math/include/boost/math/ccmath/detail/config.hpp2
-rw-r--r--contrib/restricted/boost/math/include/boost/math/tools/config.hpp2
-rw-r--r--contrib/restricted/boost/math/include/boost/math/tools/promotion.hpp2
-rw-r--r--contrib/restricted/boost/math/include/boost/math/tools/roots.hpp32
-rw-r--r--contrib/restricted/boost/variant2/include/boost/variant2/variant.hpp10
7 files changed, 51 insertions, 26 deletions
diff --git a/contrib/restricted/boost/bimap/include/boost/bimap/container_adaptor/detail/identity_converters.hpp b/contrib/restricted/boost/bimap/include/boost/bimap/container_adaptor/detail/identity_converters.hpp
index 4f79cfc167..f99d4a8799 100644
--- a/contrib/restricted/boost/bimap/include/boost/bimap/container_adaptor/detail/identity_converters.hpp
+++ b/contrib/restricted/boost/bimap/include/boost/bimap/container_adaptor/detail/identity_converters.hpp
@@ -1,6 +1,7 @@
// Boost.Bimap
//
// Copyright (c) 2006-2007 Matias Capeletto
+// Copyright (c) 2024 Joaquin M Lopez Munoz
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -166,7 +167,7 @@ struct key_to_base_identity
#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
template< class Key >
-struct key_to_base_identity< Key, Key >
+struct key_to_base_identity< Key, const Key >
{
// As default accept any type as key in order to allow container
// adaptors to work with compatible key types
diff --git a/contrib/restricted/boost/core/include/boost/core/allocator_access.hpp b/contrib/restricted/boost/core/include/boost/core/allocator_access.hpp
index 8e33ebb047..0f0ed325b3 100644
--- a/contrib/restricted/boost/core/include/boost/core/allocator_access.hpp
+++ b/contrib/restricted/boost/core/include/boost/core/allocator_access.hpp
@@ -43,9 +43,17 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
#if defined(_STL_DISABLE_DEPRECATED_WARNING)
_STL_DISABLE_DEPRECATED_WARNING
#endif
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4996)
+#if defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wdeprecated-declarations")
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+# endif
+#elif defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning(disable: 4996)
+#elif defined(BOOST_GCC) && BOOST_GCC >= 40600
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace boost {
@@ -807,9 +815,15 @@ using allocator_rebind_t = typename allocator_rebind<A, T>::type;
} /* boost */
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
+#if defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wdeprecated-declarations")
+# pragma clang diagnostic pop
+# endif
+#elif defined(_MSC_VER)
+# pragma warning(pop)
+#elif defined(BOOST_GCC) && BOOST_GCC >= 40600
+# pragma GCC diagnostic pop
+#endif
#if defined(_STL_RESTORE_DEPRECATED_WARNING)
_STL_RESTORE_DEPRECATED_WARNING
#endif
diff --git a/contrib/restricted/boost/math/include/boost/math/ccmath/detail/config.hpp b/contrib/restricted/boost/math/include/boost/math/ccmath/detail/config.hpp
index e076366ca1..097d69a16b 100644
--- a/contrib/restricted/boost/math/include/boost/math/ccmath/detail/config.hpp
+++ b/contrib/restricted/boost/math/include/boost/math/ccmath/detail/config.hpp
@@ -43,7 +43,7 @@
//
// Don't check here for msvc as they didn't get std lib configuration macros at the same time as C++17 <type_traits>
//
-#if (__cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH)
+#if (defined(__cpp_lib_bool_constant) && __cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH)
# define BOOST_MATH_NO_CCMATH
#endif
#endif
diff --git a/contrib/restricted/boost/math/include/boost/math/tools/config.hpp b/contrib/restricted/boost/math/include/boost/math/tools/config.hpp
index 110edc06b7..33c8c735a5 100644
--- a/contrib/restricted/boost/math/include/boost/math/tools/config.hpp
+++ b/contrib/restricted/boost/math/include/boost/math/tools/config.hpp
@@ -197,7 +197,7 @@
#endif
// C++23
-#if __cplusplus > 202002L || _MSVC_LANG > 202002L
+#if __cplusplus > 202002L || (defined(_MSVC_LANG) &&_MSVC_LANG > 202002L)
# if __GNUC__ >= 13
// libstdc++3 only defines to/from_chars for std::float128_t when one of these defines are set
// otherwise we're right out of luck...
diff --git a/contrib/restricted/boost/math/include/boost/math/tools/promotion.hpp b/contrib/restricted/boost/math/include/boost/math/tools/promotion.hpp
index 263f3a6205..2c2d55b401 100644
--- a/contrib/restricted/boost/math/include/boost/math/tools/promotion.hpp
+++ b/contrib/restricted/boost/math/include/boost/math/tools/promotion.hpp
@@ -27,7 +27,7 @@
#include <type_traits>
#if defined __has_include
-# if __cplusplus > 202002L || _MSVC_LANG > 202002L
+# if __cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L)
# if __has_include (<stdfloat>)
# error #include <stdfloat>
# endif
diff --git a/contrib/restricted/boost/math/include/boost/math/tools/roots.hpp b/contrib/restricted/boost/math/include/boost/math/tools/roots.hpp
index 25b77529e7..97e67fae95 100644
--- a/contrib/restricted/boost/math/include/boost/math/tools/roots.hpp
+++ b/contrib/restricted/boost/math/include/boost/math/tools/roots.hpp
@@ -790,35 +790,35 @@ inline T schroeder_iterate(F f, T guess, T min, T max, int digits) noexcept(poli
* so this default should recover full precision even in this somewhat pathological case.
* For isolated roots, the problem is so rapidly convergent that this doesn't matter at all.
*/
-template<class Complex, class F>
-Complex complex_newton(F g, Complex guess, int max_iterations = std::numeric_limits<typename Complex::value_type>::digits)
+template<class ComplexType, class F>
+ComplexType complex_newton(F g, ComplexType guess, int max_iterations = std::numeric_limits<typename ComplexType::value_type>::digits)
{
- typedef typename Complex::value_type Real;
+ typedef typename ComplexType::value_type Real;
using std::norm;
using std::abs;
using std::max;
// z0, z1, and z2 cannot be the same, in case we immediately need to resort to Muller's Method:
- Complex z0 = guess + Complex(1, 0);
- Complex z1 = guess + Complex(0, 1);
- Complex z2 = guess;
+ ComplexType z0 = guess + ComplexType(1, 0);
+ ComplexType z1 = guess + ComplexType(0, 1);
+ ComplexType z2 = guess;
do {
auto pair = g(z2);
if (norm(pair.second) == 0)
{
// Muller's method. Notation follows Numerical Recipes, 9.5.2:
- Complex q = (z2 - z1) / (z1 - z0);
+ ComplexType q = (z2 - z1) / (z1 - z0);
auto P0 = g(z0);
auto P1 = g(z1);
- Complex qp1 = static_cast<Complex>(1) + q;
- Complex A = q * (pair.first - qp1 * P1.first + q * P0.first);
-
- Complex B = (static_cast<Complex>(2) * q + static_cast<Complex>(1)) * pair.first - qp1 * qp1 * P1.first + q * q * P0.first;
- Complex C = qp1 * pair.first;
- Complex rad = sqrt(B * B - static_cast<Complex>(4) * A * C);
- Complex denom1 = B + rad;
- Complex denom2 = B - rad;
- Complex correction = (z1 - z2) * static_cast<Complex>(2) * C;
+ ComplexType qp1 = static_cast<ComplexType>(1) + q;
+ ComplexType A = q * (pair.first - qp1 * P1.first + q * P0.first);
+
+ ComplexType B = (static_cast<ComplexType>(2) * q + static_cast<ComplexType>(1)) * pair.first - qp1 * qp1 * P1.first + q * q * P0.first;
+ ComplexType C = qp1 * pair.first;
+ ComplexType rad = sqrt(B * B - static_cast<ComplexType>(4) * A * C);
+ ComplexType denom1 = B + rad;
+ ComplexType denom2 = B - rad;
+ ComplexType correction = (z1 - z2) * static_cast<ComplexType>(2) * C;
if (norm(denom1) > norm(denom2))
{
correction /= denom1;
diff --git a/contrib/restricted/boost/variant2/include/boost/variant2/variant.hpp b/contrib/restricted/boost/variant2/include/boost/variant2/variant.hpp
index aec8966249..1668436cb1 100644
--- a/contrib/restricted/boost/variant2/include/boost/variant2/variant.hpp
+++ b/contrib/restricted/boost/variant2/include/boost/variant2/variant.hpp
@@ -1634,7 +1634,17 @@ public:
template<class U,
class Ud = typename std::decay<U>::type,
class E1 = typename std::enable_if< !std::is_same<Ud, variant>::value && !std::is_base_of<variant, Ud>::value && !detail::is_in_place_index<Ud>::value && !detail::is_in_place_type<Ud>::value >::type,
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1940)
+
+ class V = mp11::mp_apply_q< mp11::mp_bind_front<detail::resolve_overload_type, U&&>, variant >,
+
+#else
+
class V = detail::resolve_overload_type<U&&, T...>,
+
+#endif
+
class E2 = typename std::enable_if<std::is_constructible<V, U&&>::value>::type
>
constexpr variant( U&& u )