aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-08-18 13:19:06 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-08-18 13:28:29 +0300
commit011ad97e2ee2cd0b5bb4caa136ebf20f14f8fb24 (patch)
tree4ebcc5037e2d2c76136c43137486e61cbcc6f59d
parent9fa2d3ff8a63d1a1274843de162afed2b3873942 (diff)
downloadydb-011ad97e2ee2cd0b5bb4caa136ebf20f14f8fb24.tar.gz
Update contrib/restricted/boost/core to 1.86.0
98ee76d1268e751829c6d2a35c98639b357de198
-rw-r--r--contrib/restricted/boost/core/include/boost/core/empty_value.hpp58
-rw-r--r--contrib/restricted/boost/core/include/boost/core/type_name.hpp9
-rw-r--r--contrib/restricted/boost/core/ya.make4
3 files changed, 62 insertions, 9 deletions
diff --git a/contrib/restricted/boost/core/include/boost/core/empty_value.hpp b/contrib/restricted/boost/core/include/boost/core/empty_value.hpp
index d8ffa30b4b..5eeee51f9d 100644
--- a/contrib/restricted/boost/core/include/boost/core/empty_value.hpp
+++ b/contrib/restricted/boost/core/include/boost/core/empty_value.hpp
@@ -95,9 +95,57 @@ private:
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#if defined(BOOST_MSVC)
+/*
+This is a workaround to an MSVC bug when T is a nested class:
+https://developercommunity.visualstudio.com/t/Compiler-bug:-Incorrect-C2247-and-C2248/10690025
+*/
+namespace detail {
+
+template<class T>
+class empty_value_base
+ : public T {
+public:
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+ empty_value_base() = default;
+#else
+ BOOST_CONSTEXPR empty_value_base() { }
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<class U, class... Args>
+ BOOST_CONSTEXPR empty_value_base(U&& value, Args&&... args)
+ : T(std::forward<U>(value), std::forward<Args>(args)...) { }
+#else
+ template<class U>
+ BOOST_CONSTEXPR empty_value_base(U&& value)
+ : T(std::forward<U>(value)) { }
+#endif
+#else
+ template<class U>
+ BOOST_CONSTEXPR empty_value_base(const U& value)
+ : T(value) { }
+
+ template<class U>
+ BOOST_CONSTEXPR empty_value_base(U& value)
+ : T(value) { }
+#endif
+};
+
+} /* detail */
+#endif
+
template<class T, unsigned N>
class empty_value<T, N, true>
+#if defined(BOOST_MSVC)
+ : detail::empty_value_base<T> {
+ typedef detail::empty_value_base<T> empty_base_;
+#else
: T {
+ typedef T empty_base_;
+#endif
+
public:
typedef T type;
@@ -108,26 +156,26 @@ public:
#endif
BOOST_CONSTEXPR empty_value(boost::empty_init_t)
- : T() { }
+ : empty_base_() { }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
BOOST_CONSTEXPR empty_value(boost::empty_init_t, U&& value, Args&&... args)
- : T(std::forward<U>(value), std::forward<Args>(args)...) { }
+ : empty_base_(std::forward<U>(value), std::forward<Args>(args)...) { }
#else
template<class U>
BOOST_CONSTEXPR empty_value(boost::empty_init_t, U&& value)
- : T(std::forward<U>(value)) { }
+ : empty_base_(std::forward<U>(value)) { }
#endif
#else
template<class U>
BOOST_CONSTEXPR empty_value(boost::empty_init_t, const U& value)
- : T(value) { }
+ : empty_base_(value) { }
template<class U>
BOOST_CONSTEXPR empty_value(boost::empty_init_t, U& value)
- : T(value) { }
+ : empty_base_(value) { }
#endif
BOOST_CONSTEXPR const T& get() const BOOST_NOEXCEPT {
diff --git a/contrib/restricted/boost/core/include/boost/core/type_name.hpp b/contrib/restricted/boost/core/include/boost/core/type_name.hpp
index 773b5f681d..81e00c2031 100644
--- a/contrib/restricted/boost/core/include/boost/core/type_name.hpp
+++ b/contrib/restricted/boost/core/include/boost/core/type_name.hpp
@@ -103,7 +103,8 @@ inline std::string fix_typeid_name( char const* n )
}
// class types can be incomplete
-template<class T> std::string typeid_name_impl( int T::* )
+// but also abstract (T[1] doesn't form)
+template<class T> std::string typeid_name_impl( int T::*, T(*)[1] )
{
std::string r = fix_typeid_name( typeid(T[1]).name() );
return r.substr( 0, r.size() - 4 ); // remove ' [1]' suffix
@@ -116,7 +117,7 @@ template<class T> std::string typeid_name_impl( ... )
template<class T> std::string typeid_name()
{
- return typeid_name_impl<T>( 0 );
+ return typeid_name_impl<T>( 0, 0 );
}
// template names
@@ -345,6 +346,8 @@ template<> struct tn_holder<boost::uint128_type>
#endif
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+
template<> struct tn_holder<wchar_t>
{
static std::string type_name( std::string const& suffix )
@@ -353,6 +356,8 @@ template<> struct tn_holder<wchar_t>
}
};
+#endif
+
#if !defined(BOOST_NO_CXX11_CHAR16_T)
template<> struct tn_holder<char16_t>
diff --git a/contrib/restricted/boost/core/ya.make b/contrib/restricted/boost/core/ya.make
index 2852b74662..7097490e61 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.85.0)
+VERSION(1.86.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.85.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/core/archive/boost-1.86.0.tar.gz)
PEERDIR(
contrib/restricted/boost/assert