Browse Source

Update contrib/restricted/boost/core to 1.86.0
98ee76d1268e751829c6d2a35c98639b357de198

robot-contrib 6 months ago
parent
commit
011ad97e2e

+ 53 - 5
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 {

+ 7 - 2
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>

+ 2 - 2
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