aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2022-08-15 12:32:03 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2022-08-15 12:32:03 +0300
commit6dc81cf3b001f476cba7b0c14212414de8919283 (patch)
tree041d6a10458db27bd20bc0fe108809b8d6f88e5c
parentbb7e76b0f228f9c9b0d19c2d6e92640b57124cd6 (diff)
downloadydb-6dc81cf3b001f476cba7b0c14212414de8919283.tar.gz
Update contrib/restricted/boost/variant to 1.80.0
-rw-r--r--contrib/restricted/boost/variant/README.md12
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/bad_visit.hpp6
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_binary.hpp80
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_delayed.hpp11
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_unary.hpp90
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/config.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/element_index.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/forced_return.hpp22
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/generic_result_type.hpp88
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/has_result_type.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/hash_variant.hpp3
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/make_variant_list.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/move.hpp7
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/std_hash.hpp46
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/detail/visitation_impl.hpp42
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/get.hpp15
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/recursive_variant.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/recursive_wrapper_fwd.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/static_visitor.hpp4
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/variant.hpp257
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/variant_fwd.hpp2
-rw-r--r--contrib/restricted/boost/variant/include/boost/variant/visitor_ptr.hpp29
22 files changed, 219 insertions, 507 deletions
diff --git a/contrib/restricted/boost/variant/README.md b/contrib/restricted/boost/variant/README.md
index 1594a22136..c6810ca00c 100644
--- a/contrib/restricted/boost/variant/README.md
+++ b/contrib/restricted/boost/variant/README.md
@@ -1,16 +1,16 @@
-# [Boost.Variant](http://boost.org/libs/variant)
-Boost.Variant, part of collection of the [Boost C++ Libraries](http://github.com/boostorg). It is a safe, generic, stack-based discriminated union container, offering a simple solution for manipulating an object from a heterogeneous set of types in a uniform manner.
+# [Boost.Variant](https://boost.org/libs/variant)
+Boost.Variant, part of collection of the [Boost C++ Libraries](https://github.com/boostorg). It is a safe, generic, stack-based discriminated union container, offering a simple solution for manipulating an object from a heterogeneous set of types in a uniform manner.
### Test results
@ | Build | Tests coverage | More info
----------------|-------------- | -------------- |-----------
-Develop branch: | [![Build Status](https://travis-ci.org/apolukhin/variant.svg?branch=develop)](https://travis-ci.org/apolukhin/variant) [![Build status](https://ci.appveyor.com/api/projects/status/o5hmsaj53v9vc624/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/variant/branch/develop) | [![Coverage Status](https://coveralls.io/repos/apolukhin/variant/badge.png?branch=develop)](https://coveralls.io/r/apolukhin/variant?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/variant.html)
-Master branch: | [![Build Status](https://travis-ci.org/apolukhin/variant.svg?branch=master)](https://travis-ci.org/apolukhin/variant) [![Build status](https://ci.appveyor.com/api/projects/status/o5hmsaj53v9vc624/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/variant/branch/master) | [![Coverage Status](https://coveralls.io/repos/apolukhin/variant/badge.png?branch=master)](https://coveralls.io/r/apolukhin/variant?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/variant.html)
+Develop branch: | [![CI](https://github.com/boostorg/variant/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/variant/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/bijfdoy7byfgc6e2/branch/develop?svg=true)](https://ci.appveyor.com/project/apolukhin/variant-ykfti/branch/develop) | [![Coverage Status](https://coveralls.io/repos/boostorg/variant/badge.png?branch=develop)](https://coveralls.io/r/apolukhin/variant?branch=develop) | [details...](http://www.boost.org/development/tests/develop/developer/variant.html)
+Master branch: | [![CI](https://github.com/boostorg/variant/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/variant/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/bijfdoy7byfgc6e2/branch/master?svg=true)](https://ci.appveyor.com/project/apolukhin/variant-ykfti/branch/master) | [![Coverage Status](https://coveralls.io/repos/boostorg/variant/badge.png?branch=master)](https://coveralls.io/r/apolukhin/variant?branch=master) | [details...](http://www.boost.org/development/tests/master/developer/variant.html)
-[Open Issues](https://svn.boost.org/trac/boost/query?status=!closed&component=variant)
+[Latest developer documentation](https://www.boost.org/doc/libs/develop/doc/html/variant.html)
### License
-Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt).
+Distributed under the [Boost Software License, Version 1.0](https://boost.org/LICENSE_1_0.txt).
diff --git a/contrib/restricted/boost/variant/include/boost/variant/bad_visit.hpp b/contrib/restricted/boost/variant/include/boost/variant/bad_visit.hpp
index e07657eab5..9396d0866f 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/bad_visit.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/bad_visit.hpp
@@ -13,6 +13,8 @@
#ifndef BOOST_VARIANT_BAD_VISIT_HPP
#define BOOST_VARIANT_BAD_VISIT_HPP
+#include <boost/config.hpp>
+
#include <exception>
namespace boost {
@@ -23,12 +25,12 @@ namespace boost {
// Exception thrown when a visitation attempt via apply_visitor fails due
// to invalid visited subtype or contents.
//
-struct bad_visit
+struct BOOST_SYMBOL_VISIBLE bad_visit
: std::exception
{
public: // std::exception interface
- virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{
return "boost::bad_visit: "
"failed visitation using boost::apply_visitor";
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_binary.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_binary.hpp
index e4abf88d72..dda16ff640 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_binary.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_binary.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003 Eric Friedman
-// Copyright (c) 2014-2017 Antony Polukhin
+// Copyright (c) 2014-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -14,27 +14,18 @@
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/variant/detail/generic_result_type.hpp>
#include <boost/variant/detail/apply_visitor_unary.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include <boost/mpl/not.hpp>
-#include <boost/type_traits/is_const.hpp>
-#endif
-
#if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
# include <boost/variant/detail/has_result_type.hpp>
#endif
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# include <boost/core/enable_if.hpp>
# include <boost/type_traits/is_lvalue_reference.hpp>
# include <boost/type_traits/is_same.hpp>
-# include <boost/move/move.hpp>
-# include <boost/move/utility.hpp>
+# include <boost/move/utility_core.hpp> // for boost::move, boost::forward
#endif
namespace boost {
@@ -75,14 +66,14 @@ public: // visitor interfaces
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Value2>
- typename enable_if_c<MoveSemantics && is_same<Value2, Value2>::value, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
+ typename enable_if_c<MoveSemantics && is_same<Value2, Value2>::value, result_type>::type
operator()(Value2&& value2)
{
return visitor_(::boost::move(value1_), ::boost::forward<Value2>(value2));
}
template <typename Value2>
- typename disable_if_c<MoveSemantics && is_same<Value2, Value2>::value, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
+ typename disable_if_c<MoveSemantics && is_same<Value2, Value2>::value, result_type>::type
operator()(Value2&& value2)
{
return visitor_(value1_, ::boost::forward<Value2>(value2));
@@ -91,7 +82,7 @@ public: // visitor interfaces
#else
template <typename Value2>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
+ result_type
operator()(Value2& value2)
{
return visitor_(value1_, value2);
@@ -129,7 +120,7 @@ public: // visitor interfaces
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Value1>
- typename enable_if_c<MoveSemantics && is_same<Value1, Value1>::value, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
+ typename enable_if_c<MoveSemantics && is_same<Value1, Value1>::value, result_type>::type
operator()(Value1&& value1)
{
apply_visitor_binary_invoke<
@@ -142,7 +133,7 @@ public: // visitor interfaces
}
template <typename Value1>
- typename disable_if_c<MoveSemantics && is_same<Value1, Value1>::value, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
+ typename disable_if_c<MoveSemantics && is_same<Value1, Value1>::value, result_type>::type
operator()(Value1&& value1)
{
apply_visitor_binary_invoke<
@@ -157,7 +148,7 @@ public: // visitor interfaces
#else
template <typename Value1>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
+ result_type
operator()(Value1& value1)
{
apply_visitor_binary_invoke<
@@ -182,28 +173,10 @@ private:
// nonconst-visitor version:
//
-#if !BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-
-# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
- /**/
-
-#else // EDG-based compilers
-
-# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
- typename enable_if< \
- mpl::not_< is_const< V > > \
- , BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
- >::type \
- /**/
-
-#endif // EDG-based compilers workaround
-
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Visitor, typename Visitable1, typename Visitable2>
-inline
- BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
+inline typename Visitor::result_type
apply_visitor( Visitor& visitor, Visitable1&& visitable1, Visitable2&& visitable2)
{
::boost::detail::variant::apply_visitor_binary_unwrap<
@@ -216,8 +189,7 @@ apply_visitor( Visitor& visitor, Visitable1&& visitable1, Visitable2&& visitable
#else
template <typename Visitor, typename Visitable1, typename Visitable2>
-inline
- BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
+inline typename Visitor::result_type
apply_visitor( Visitor& visitor, Visitable1& visitable1, Visitable2& visitable2)
{
::boost::detail::variant::apply_visitor_binary_unwrap<
@@ -229,8 +201,6 @@ apply_visitor( Visitor& visitor, Visitable1& visitable1, Visitable2& visitable2)
#endif
-#undef BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE
-
//
// const-visitor version:
//
@@ -238,10 +208,7 @@ apply_visitor( Visitor& visitor, Visitable1& visitable1, Visitable2& visitable2)
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Visitor, typename Visitable1, typename Visitable2>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+inline typename Visitor::result_type
apply_visitor( const Visitor& visitor , Visitable1&& visitable1 , Visitable2&& visitable2)
{
::boost::detail::variant::apply_visitor_binary_unwrap<
@@ -254,10 +221,7 @@ apply_visitor( const Visitor& visitor , Visitable1&& visitable1 , Visitable2&& v
#else
template <typename Visitor, typename Visitable1, typename Visitable2>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+inline typename Visitor::result_type
apply_visitor( const Visitor& visitor , Visitable1& visitable1 , Visitable2& visitable2)
{
::boost::detail::variant::apply_visitor_binary_unwrap<
@@ -297,13 +261,13 @@ public: // structors
public: // visitor interfaces
template <typename Value2>
- decltype(auto) operator()(Value2&& value2, typename enable_if_c<MoveSemantics && is_same<Value2, Value2>::value>::type* = 0)
+ decltype(auto) operator()(Value2&& value2, typename enable_if_c<MoveSemantics && is_same<Value2, Value2>::value, bool>::type = true)
{
return visitor_(::boost::move(value1_), ::boost::forward<Value2>(value2));
}
template <typename Value2>
- decltype(auto) operator()(Value2&& value2, typename disable_if_c<MoveSemantics && is_same<Value2, Value2>::value>::type* = 0)
+ decltype(auto) operator()(Value2&& value2, typename disable_if_c<MoveSemantics && is_same<Value2, Value2>::value, bool>::type = true)
{
return visitor_(value1_, ::boost::forward<Value2>(value2));
}
@@ -329,7 +293,7 @@ public: // structors
public: // visitor interfaces
template <typename Value1>
- decltype(auto) operator()(Value1&& value1, typename enable_if_c<MoveSemantics && is_same<Value1, Value1>::value>::type* = 0)
+ decltype(auto) operator()(Value1&& value1, typename enable_if_c<MoveSemantics && is_same<Value1, Value1>::value, bool>::type = true)
{
apply_visitor_binary_invoke_cpp14<
Visitor
@@ -341,7 +305,7 @@ public: // visitor interfaces
}
template <typename Value1>
- decltype(auto) operator()(Value1&& value1, typename disable_if_c<MoveSemantics && is_same<Value1, Value1>::value>::type* = 0)
+ decltype(auto) operator()(Value1&& value1, typename disable_if_c<MoveSemantics && is_same<Value1, Value1>::value, bool>::type = true)
{
apply_visitor_binary_invoke_cpp14<
Visitor
@@ -361,8 +325,9 @@ private:
template <typename Visitor, typename Visitable1, typename Visitable2>
inline decltype(auto) apply_visitor(Visitor& visitor, Visitable1&& visitable1, Visitable2&& visitable2,
typename boost::disable_if<
- boost::detail::variant::has_result_type<Visitor>
- >::type* = 0)
+ boost::detail::variant::has_result_type<Visitor>,
+ bool
+ >::type = true)
{
::boost::detail::variant::apply_visitor_binary_unwrap_cpp14<
Visitor, Visitable2, ! ::boost::is_lvalue_reference<Visitable2>::value
@@ -374,8 +339,9 @@ inline decltype(auto) apply_visitor(Visitor& visitor, Visitable1&& visitable1, V
template <typename Visitor, typename Visitable1, typename Visitable2>
inline decltype(auto) apply_visitor(const Visitor& visitor, Visitable1&& visitable1, Visitable2&& visitable2,
typename boost::disable_if<
- boost::detail::variant::has_result_type<Visitor>
- >::type* = 0)
+ boost::detail::variant::has_result_type<Visitor>,
+ bool
+ >::type = true)
{
::boost::detail::variant::apply_visitor_binary_unwrap_cpp14<
const Visitor, Visitable2, ! ::boost::is_lvalue_reference<Visitable2>::value
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_delayed.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_delayed.hpp
index 515a93ef01..0a9006299c 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_delayed.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_delayed.hpp
@@ -13,8 +13,6 @@
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
-#include <boost/variant/detail/generic_result_type.hpp>
-
#include <boost/variant/detail/apply_visitor_unary.hpp>
#include <boost/variant/detail/apply_visitor_binary.hpp>
#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
@@ -63,8 +61,7 @@ public: // structors
public: // N-ary visitor interface
template <typename... Visitables>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(Visitables&... visitables) const
+ result_type operator()(Visitables&... visitables) const
{
return apply_visitor(visitor_, visitables...);
}
@@ -74,8 +71,7 @@ public: // N-ary visitor interface
public: // unary visitor interface
template <typename Visitable>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(Visitable& visitable) const
+ result_type operator()(Visitable& visitable) const
{
return apply_visitor(visitor_, visitable);
}
@@ -83,8 +79,7 @@ public: // unary visitor interface
public: // binary visitor interface
template <typename Visitable1, typename Visitable2>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(Visitable1& visitable1, Visitable2& visitable2) const
+ result_type operator()(Visitable1& visitable1, Visitable2& visitable2) const
{
return apply_visitor(visitor_, visitable1, visitable2);
}
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_unary.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_unary.hpp
index 7e93a51415..6bf5429896 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_unary.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/apply_visitor_unary.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003 Eric Friedman
-// Copyright (c) 2014 Antony Polukhin
+// Copyright (c) 2014-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -14,17 +14,8 @@
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/variant/detail/generic_result_type.hpp>
#include <boost/move/utility.hpp>
-#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include <boost/core/enable_if.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#endif
-
#if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
# include <boost/mpl/distance.hpp>
# include <boost/mpl/advance.hpp>
@@ -32,6 +23,8 @@
# include <boost/mpl/size.hpp>
# include <boost/utility/declval.hpp>
# include <boost/core/enable_if.hpp>
+# include <boost/type_traits/copy_cv_ref.hpp>
+# include <boost/type_traits/remove_reference.hpp>
# include <boost/variant/detail/has_result_type.hpp>
#endif
@@ -47,59 +40,36 @@ namespace boost {
// nonconst-visitor version:
//
-#if !BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-
-# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
- /**/
-
-#else // EDG-based compilers
-
-# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
- typename enable_if< \
- mpl::not_< is_const< V > > \
- , BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
- >::type \
- /**/
-
-#endif // EDG-based compilers workaround
-
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Visitor, typename Visitable>
-inline
- BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
+inline typename Visitor::result_type
apply_visitor(Visitor& visitor, Visitable&& visitable)
{
return ::boost::forward<Visitable>(visitable).apply_visitor(visitor);
}
#else
template <typename Visitor, typename Visitable>
-inline
- BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
+inline typename Visitor::result_type
apply_visitor(Visitor& visitor, Visitable& visitable)
{
return visitable.apply_visitor(visitor);
}
#endif
-#undef BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE
-
//
// const-visitor version:
//
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename Visitor, typename Visitable>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
apply_visitor(const Visitor& visitor, Visitable&& visitable)
{
return ::boost::forward<Visitable>(visitable).apply_visitor(visitor);
}
#else
template <typename Visitor, typename Visitable>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
apply_visitor(const Visitor& visitor, Visitable& visitable)
{
return visitable.apply_visitor(visitor);
@@ -108,6 +78,7 @@ apply_visitor(const Visitor& visitor, Visitable& visitable)
#if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
+#define BOOST_VARIANT_HAS_DECLTYPE_APPLY_VISITOR_RETURN_TYPE
// C++14
namespace detail { namespace variant {
@@ -115,45 +86,33 @@ namespace detail { namespace variant {
// This class serves only metaprogramming purposes. none of its methods must be called at runtime!
template <class Visitor, class Variant>
struct result_multideduce1 {
- typedef typename Variant::types types;
+ typedef typename remove_reference<Variant>::type::types types;
typedef typename boost::mpl::begin<types>::type begin_it;
typedef typename boost::mpl::advance<
begin_it, boost::mpl::int_<boost::mpl::size<types>::type::value - 1>
>::type last_it;
- // For metaprogramming purposes ONLY! Do not use this method (and class) at runtime!
- static Visitor& vis() BOOST_NOEXCEPT {
- // Functions that work with lambdas must be defined in same translation unit.
- // Because of that, we can not use `boost::decval<Visitor&>()` here.
- Visitor&(*f)() = 0; // pointer to function
- return f();
- }
-
- static decltype(auto) deduce_impl(last_it, unsigned /*helper*/) {
- typedef typename boost::mpl::deref<last_it>::type value_t;
- return vis()( boost::declval< value_t& >() );
- }
-
- template <class It>
- static decltype(auto) deduce_impl(It, unsigned helper) {
+ template <class It, class Dummy = void> // avoid explicit specialization in class scope
+ struct deduce_impl {
typedef typename boost::mpl::next<It>::type next_t;
typedef typename boost::mpl::deref<It>::type value_t;
- if (helper == boost::mpl::distance<begin_it, It>::type::value) {
- return deduce_impl(next_t(), ++helper);
- }
+ typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
+ : boost::declval< typename deduce_impl<next_t>::type >()) type;
+ };
- return vis()( boost::declval< value_t& >() );
- }
+ template <class Dummy>
+ struct deduce_impl<last_it, Dummy> {
+ typedef typename boost::mpl::deref<last_it>::type value_t;
+ typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
+ };
- static decltype(auto) deduce() {
- return deduce_impl(begin_it(), 0);
- }
+ typedef typename deduce_impl<begin_it>::type type;
};
template <class Visitor, class Variant>
struct result_wrapper1
{
- typedef decltype(result_multideduce1<Visitor, Variant>::deduce()) result_type;
+ typedef typename result_multideduce1<Visitor, Variant>::type result_type;
Visitor&& visitor_;
explicit result_wrapper1(Visitor&& visitor) BOOST_NOEXCEPT
@@ -171,10 +130,11 @@ struct result_wrapper1
template <typename Visitor, typename Visitable>
inline decltype(auto) apply_visitor(Visitor&& visitor, Visitable&& visitable,
typename boost::disable_if<
- boost::detail::variant::has_result_type<Visitor>
- >::type* = 0)
+ boost::detail::variant::has_result_type<Visitor>,
+ bool
+ >::type = true)
{
- boost::detail::variant::result_wrapper1<Visitor, typename remove_reference<Visitable>::type> cpp14_vis(::boost::forward<Visitor>(visitor));
+ boost::detail::variant::result_wrapper1<Visitor, Visitable> cpp14_vis(::boost::forward<Visitor>(visitor));
return ::boost::forward<Visitable>(visitable).apply_visitor(cpp14_vis);
}
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/config.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/config.hpp
index 70725e2cc8..543de18b59 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/config.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/config.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman
-// Copyright (c) 2016 Antony Polukhin
+// Copyright (c) 2016-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/element_index.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/element_index.hpp
index cc926f6cf8..b8961c82f6 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/element_index.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/element_index.hpp
@@ -3,7 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2014-2015 Antony Polukhin
+// Copyright (c) 2014-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/forced_return.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/forced_return.hpp
index 333393a2ac..b21a532c51 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/forced_return.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/forced_return.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman
-// Copyright (c) 2015-2016 Antony Polukhin
+// Copyright (c) 2015-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -14,9 +14,7 @@
#define BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
#include <boost/config.hpp>
-#include <boost/variant/detail/generic_result_type.hpp>
#include <boost/assert.hpp>
-#include <cstdlib> // std::abort
#ifdef BOOST_MSVC
@@ -26,12 +24,6 @@
namespace boost { namespace detail { namespace variant {
-BOOST_NORETURN inline void forced_return_no_return() { // fixes `must return a value` warnings
- using namespace std;
- abort(); // some implementations have no std::abort
-}
-
-
///////////////////////////////////////////////////////////////////////////////
// (detail) function template forced_return
//
@@ -39,19 +31,15 @@ BOOST_NORETURN inline void forced_return_no_return() { // fixes `must return a v
// compile-time requirement of returning a result value.
//
template <typename T>
-BOOST_NORETURN inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
+BOOST_NORETURN inline T
forced_return()
{
// logical error: should never be here! (see above)
BOOST_ASSERT(false);
- forced_return_no_return();
-
-#ifdef BOOST_NO_NORETURN
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) (*dummy)() = 0;
- return dummy();
-#endif
+ T (*dummy)() = 0;
+ (void)dummy;
+ BOOST_UNREACHABLE_RETURN(dummy());
}
}}} // namespace boost::detail::variant
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/generic_result_type.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/generic_result_type.hpp
deleted file mode 100644
index 8b1289cacc..0000000000
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/generic_result_type.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//-----------------------------------------------------------------------------
-// boost variant/detail/generic_result_type.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2003
-// Eric Friedman
-//
-// 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)
-
-#ifndef BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
-#define BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
-
-#include <boost/config.hpp>
-
-//////////////////////////////////////////////////////////////////////////
-// (workaround) macro BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE
-//
-// On compilers with BOOST_NO_VOID_RETURNS, this macro provides a route
-// to a single syntax for dealing with template functions that may (but
-// not necessarily) return nothing (i.e. void).
-//
-// BOOST_VARIANT_AUX_RETURN_VOID provided for compilers w/ (erroneous?)
-// warnings about non-void functions not returning a value.
-//
-
-#if !defined(BOOST_NO_VOID_RETURNS)
-
-#define BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) \
- T \
- /**/
-
-#define BOOST_VARIANT_AUX_RETURN_VOID \
- /**/
-
-#define BOOST_VARIANT_AUX_RETURN_VOID_TYPE \
- void \
- /**/
-
-#else // defined(BOOST_NO_VOID_RETURNS)
-
-namespace boost {
-namespace detail { namespace variant {
-
-struct fake_return_void
-{
- fake_return_void()
- {
- }
-
- template <typename T>
- fake_return_void(const T&)
- {
- }
-};
-
-template <typename T>
-struct no_void_returns_helper
-{
- typedef T type;
-};
-
-template <>
-struct no_void_returns_helper<void>
-{
- typedef fake_return_void type;
-};
-
-}} // namespace detail::variant
-} // namespace boost
-
-#define BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) \
- BOOST_DEDUCED_TYPENAME \
- ::boost::detail::variant::no_void_returns_helper< T >::type \
- /**/
-
-#define BOOST_VARIANT_AUX_RETURN_VOID \
- return ::boost::detail::variant::fake_return_void() \
- /**/
-
-#define BOOST_VARIANT_AUX_RETURN_VOID_TYPE \
- ::boost::detail::variant::fake_return_void
-
-#endif // BOOST_NO_VOID_RETURNS workaround
-
-#endif // BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/has_result_type.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/has_result_type.hpp
index 80cd56ab11..d6c3815fd6 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/has_result_type.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/has_result_type.hpp
@@ -3,7 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2014-2015 Antony Polukhin
+// Copyright (c) 2014-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/hash_variant.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/hash_variant.hpp
index 958662ec69..9ad6ff8557 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/hash_variant.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/hash_variant.hpp
@@ -3,8 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2011
-// Antony Polukhin
+// Copyright (c) 2011-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/make_variant_list.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/make_variant_list.hpp
index b7a0feffd0..757af7337e 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/make_variant_list.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/make_variant_list.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
-// Copyright (c) 2013 Antony Polukhin
+// Copyright (c) 2013-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/move.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/move.hpp
index 8900055b75..9fa276f531 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/move.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/move.hpp
@@ -5,7 +5,7 @@
//
// Copyright (c) 2002-2003 Eric Friedman
// Copyright (c) 2002 by Andrei Alexandrescu
-// Copyright (c) 2013-2014 Antony Polukhin
+// Copyright (c) 2013-2022 Antony Polukhin
//
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
@@ -20,12 +20,9 @@
#ifndef BOOST_VARIANT_DETAIL_MOVE_HPP
#define BOOST_VARIANT_DETAIL_MOVE_HPP
-#include <iterator> // for iterator_traits
-#include <new> // for placement new
-
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#include <boost/move/move.hpp>
+#include <boost/move/utility_core.hpp> // for boost::move
#include <boost/move/adl_move_swap.hpp>
namespace boost { namespace detail { namespace variant {
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/std_hash.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/std_hash.hpp
new file mode 100644
index 0000000000..3ce6187ae7
--- /dev/null
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/std_hash.hpp
@@ -0,0 +1,46 @@
+//-----------------------------------------------------------------------------
+// boost variant/detail/std_hash.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2018-2022 Antony Polukhin
+//
+// 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)
+
+
+#ifndef BOOST_VARIANT_DETAIL_STD_HASH_HPP
+#define BOOST_VARIANT_DETAIL_STD_HASH_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/hash_variant.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+// macro BOOST_VARIANT_DO_NOT_SPECIALIZE_STD_HASH
+//
+// Define this macro if you do not wish to have a std::hash specialization for
+// boost::variant.
+
+#if !defined(BOOST_VARIANT_DO_NOT_SPECIALIZE_STD_HASH) && !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
+
+#include <functional> // for std::hash
+
+namespace std {
+ template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
+ struct hash<boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) > > {
+ std::size_t operator()(const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >& val) const {
+ return ::boost::hash_value(val);
+ }
+ };
+}
+
+#endif // #if !defined(BOOST_VARIANT_DO_NOT_SPECIALIZE_STD_HASH) && !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
+
+#endif // BOOST_VARIANT_DETAIL_STD_HASH_HPP
+
diff --git a/contrib/restricted/boost/variant/include/boost/variant/detail/visitation_impl.hpp b/contrib/restricted/boost/variant/include/boost/variant/detail/visitation_impl.hpp
index d741a4ab29..c3d91b8167 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/detail/visitation_impl.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/detail/visitation_impl.hpp
@@ -18,7 +18,6 @@
#include <boost/variant/detail/backup_holder.hpp>
#include <boost/variant/detail/cast_storage.hpp>
#include <boost/variant/detail/forced_return.hpp>
-#include <boost/variant/detail/generic_result_type.hpp>
#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
#include <boost/mpl/eval_if.hpp>
@@ -35,9 +34,9 @@
#include <boost/type_traits/has_nothrow_copy.hpp>
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning (push)
-# pragma warning (disable : 4702) //unreachable code
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning (push)
+# pragma warning (disable : 4702) //unreachable code
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -59,6 +58,13 @@
#endif
+// Define a compiler generic null pointer value
+#if defined(BOOST_NO_CXX11_NULLPTR)
+#define BOOST_VARIANT_NULL 0
+#else
+#define BOOST_VARIANT_NULL nullptr
+#endif
+
namespace boost {
namespace detail { namespace variant {
@@ -102,8 +108,7 @@ struct visitation_impl_step< LastIter,LastIter >
//
template <typename Visitor, typename VoidPtrCV, typename T>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
visitation_impl_invoke_impl(
int, Visitor& visitor, VoidPtrCV storage, T*
, mpl::true_// never_uses_backup
@@ -115,8 +120,7 @@ visitation_impl_invoke_impl(
}
template <typename Visitor, typename VoidPtrCV, typename T>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
visitation_impl_invoke_impl(
int internal_which, Visitor& visitor, VoidPtrCV storage, T*
, mpl::false_// never_uses_backup
@@ -137,8 +141,7 @@ visitation_impl_invoke_impl(
}
template <typename Visitor, typename VoidPtrCV, typename T, typename NoBackupFlag>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
visitation_impl_invoke(
int internal_which, Visitor& visitor, VoidPtrCV storage, T* t
, NoBackupFlag
@@ -158,8 +161,7 @@ visitation_impl_invoke(
}
template <typename Visitor, typename VoidPtrCV, typename NBF>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
visitation_impl_invoke(int, Visitor&, VoidPtrCV, apply_visitor_unrolled*, NBF, long)
{
// should never be here at runtime!
@@ -178,12 +180,11 @@ template <
, typename Visitor, typename VPCV
, typename NBF
>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+inline typename Visitor::result_type
visitation_impl(
int, int, Visitor&, VPCV
, mpl::true_ // is_apply_visitor_unrolled
- , NBF, W* = 0, S* = 0
+ , NBF, W* = BOOST_VARIANT_NULL, S* = BOOST_VARIANT_NULL
)
{
// should never be here at runtime!
@@ -196,14 +197,13 @@ template <
, typename Visitor, typename VoidPtrCV
, typename NoBackupFlag
>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
+BOOST_FORCEINLINE typename Visitor::result_type
visitation_impl(
const int internal_which, const int logical_which
, Visitor& visitor, VoidPtrCV storage
, mpl::false_ // is_apply_visitor_unrolled
, NoBackupFlag no_backup_flag
- , Which* = 0, step0* = 0
+ , Which* = BOOST_VARIANT_NULL, step0* = BOOST_VARIANT_NULL
)
{
// Typedef apply_visitor_unrolled steps and associated types...
@@ -270,8 +270,8 @@ visitation_impl(
}} // namespace detail::variant
} // namespace boost
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-# pragma warning(pop)
-#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(pop)
+#endif
#endif // BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
diff --git a/contrib/restricted/boost/variant/include/boost/variant/get.hpp b/contrib/restricted/boost/variant/include/boost/variant/get.hpp
index abce6c4664..369370cd7a 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/get.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/get.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman, Itay Maman
-// Copyright (c) 2014 Antony Polukhin
+// Copyright (c) 2014-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -44,7 +44,7 @@ class BOOST_SYMBOL_VISIBLE bad_get
{
public: // std::exception implementation
- virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{
return "boost::bad_get: "
"failed value get using boost::get";
@@ -99,11 +99,16 @@ public: // visitor interfaces
}} // namespace detail::variant
#ifndef BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE
-# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
+# if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x0551))
# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t)
# else
-# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
- , t* = 0
+# if defined(BOOST_NO_CXX11_NULLPTR)
+# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
+ , t* = 0
+# else
+# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
+ , t* = nullptr
+# endif
# endif
#endif
diff --git a/contrib/restricted/boost/variant/include/boost/variant/recursive_variant.hpp b/contrib/restricted/boost/variant/include/boost/variant/recursive_variant.hpp
index afba0be640..a79fd79417 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/recursive_variant.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/recursive_variant.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman
-// Copyright (c) 2013 Antony Polukhin
+// Copyright (c) 2013-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/recursive_wrapper_fwd.hpp b/contrib/restricted/boost/variant/include/boost/variant/recursive_wrapper_fwd.hpp
index c40399f289..245d082ada 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/recursive_wrapper_fwd.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/recursive_wrapper_fwd.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002 Eric Friedman, Itay Maman
-// Copyright (c) 2016-2017 Antony Polukhin
+// Copyright (c) 2016-2022 Antony Polukhin
//
// Portions Copyright (C) 2002 David Abrahams
//
diff --git a/contrib/restricted/boost/variant/include/boost/variant/static_visitor.hpp b/contrib/restricted/boost/variant/include/boost/variant/static_visitor.hpp
index d1fc47e272..ee40fecf15 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/static_visitor.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/static_visitor.hpp
@@ -50,10 +50,8 @@ public: // typedefs
protected: // for use as base class only
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
static_visitor() = default;
- ~static_visitor() = default;
#else
static_visitor() BOOST_NOEXCEPT { }
- ~static_visitor() BOOST_NOEXCEPT { }
#endif
};
@@ -84,7 +82,7 @@ struct is_static_visitor_impl
} // namespace detail
template< typename T > struct is_static_visitor
- : public ::boost::integral_constant<bool,(::boost::detail::is_static_visitor_impl<T>::value)>
+ : public ::boost::integral_constant<bool,(::boost::detail::is_static_visitor_impl<T>::value)>
{
public:
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_static_visitor,(T))
diff --git a/contrib/restricted/boost/variant/include/boost/variant/variant.hpp b/contrib/restricted/boost/variant/include/boost/variant/variant.hpp
index d33a23e477..6ba674a27e 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/variant.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/variant.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
-// Copyright (c) 2012-2016 Antony Polukhin
+// Copyright (c) 2012-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -32,18 +32,17 @@
#include <boost/variant/detail/over_sequence.hpp>
#include <boost/variant/detail/visitation_impl.hpp>
#include <boost/variant/detail/hash_variant.hpp>
+#include <boost/variant/detail/std_hash.hpp>
-#include <boost/variant/detail/generic_result_type.hpp>
#include <boost/variant/detail/move.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
#include <boost/detail/reference_content.hpp>
-#include <boost/aligned_storage.hpp>
#include <boost/blank.hpp>
#include <boost/integer/common_factor_ct.hpp>
#include <boost/static_assert.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repeat.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
#include <boost/type_traits/alignment_of.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/has_nothrow_constructor.hpp>
@@ -55,8 +54,9 @@
#include <boost/type_traits/is_rvalue_reference.hpp>
#include <boost/type_traits/is_constructible.hpp>
#include <boost/type_traits/add_lvalue_reference.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/utility/declval.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/variant/recursive_wrapper_fwd.hpp>
#include <boost/variant/static_visitor.hpp>
@@ -130,7 +130,7 @@ private: // helpers, for metafunction result (below)
typedef typename mpl::transform1<Sequence, F>::type transformed_;
typedef typename mpl::max_element<transformed_
-
+
>::type max_it;
public: // metafunction result
@@ -347,7 +347,7 @@ private: // helpers, for metafunction result (below)
types, mpl::sizeof_<mpl::_1>
>::type max_size;
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
+#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x0551))
typedef typename mpl::fold<
types
@@ -381,17 +381,14 @@ struct destroyer
public: // visitor interfaces
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(T& operand, int) const BOOST_NOEXCEPT
+ void internal_visit(T& operand, int) const BOOST_NOEXCEPT
{
operand.~T(); // must be noexcept
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) || \
+#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x0551)) || \
BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
(void)operand; // suppresses warnings
#endif
-
- BOOST_VARIANT_AUX_RETURN_VOID;
}
};
@@ -445,27 +442,21 @@ public: // structors
public: // internal visitor interface
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
+ void internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
{
new(storage_) T( operand.get() );
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
+ void internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
{
new(storage_) T( operand.get() );
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const T& operand, int) const
+ void internal_visit(const T& operand, int) const
{
new(storage_) T(operand);
- BOOST_VARIANT_AUX_RETURN_VOID;
}
};
@@ -493,19 +484,15 @@ public: // structors
public: // internal visitor interface
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
+ void internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
{
new(storage_) T( ::boost::detail::variant::move(operand.get()) );
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(T& operand, int) const BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(T(boost::declval<T>())))
+ void internal_visit(T& operand, int) const BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(T(boost::declval<T>())))
{
new(storage_) T(::boost::detail::variant::move(operand));
- BOOST_VARIANT_AUX_RETURN_VOID;
}
};
#endif
@@ -533,26 +520,21 @@ public: // structors
public: // internal visitor interfaces
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(backup_holder<T>& lhs_content, long) const
+ void internal_visit(backup_holder<T>& lhs_content, long) const
{
lhs_content.get()
= static_cast< const backup_holder<T>* >(rhs_storage_)->get();
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const backup_holder<T>& lhs_content, long) const
+ void internal_visit(const backup_holder<T>& lhs_content, long) const
{
lhs_content.get()
= static_cast< const backup_holder<T>* >(rhs_storage_)->get();
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(T& lhs_content, int) const
+ void internal_visit(T& lhs_content, int) const
{
// NOTE TO USER :
// Compile error here indicates one of variant's bounded types does
@@ -562,7 +544,6 @@ public: // internal visitor interfaces
// Hint: Are any of the bounded types const-qualified or references?
//
lhs_content = *static_cast< const T* >(rhs_storage_);
- BOOST_VARIANT_AUX_RETURN_VOID;
}
};
@@ -590,26 +571,21 @@ public: // structors
public: // internal visitor interfaces
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(backup_holder<T>& lhs_content, long) const
+ void internal_visit(backup_holder<T>& lhs_content, long) const
{
lhs_content.get()
= ::boost::detail::variant::move(static_cast<backup_holder<T>* >(rhs_storage_)->get());
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const backup_holder<T>& lhs_content, long) const
+ void internal_visit(const backup_holder<T>& lhs_content, long) const
{
lhs_content.get()
= ::boost::detail::variant::move(static_cast<backup_holder<T>* >(rhs_storage_)->get());
- BOOST_VARIANT_AUX_RETURN_VOID;
}
template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(T& lhs_content, int) const
+ void internal_visit(T& lhs_content, int) const
{
// NOTE TO USER :
// Compile error here indicates one of variant's bounded types does
@@ -619,7 +595,6 @@ public: // internal visitor interfaces
// Hint: Are any of the bounded types const-qualified or references?
//
lhs_content = ::boost::detail::variant::move(*static_cast<T* >(rhs_storage_));
- BOOST_VARIANT_AUX_RETURN_VOID;
}
};
@@ -866,15 +841,12 @@ private: // helpers, for visitor interface (below)
public: // visitor interface
template <typename LhsT>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(LhsT& lhs_content, int)
+ void internal_visit(LhsT& lhs_content, int)
{
typedef typename is_nothrow_move_constructible<LhsT>::type
nothrow_move;
backup_assign_impl( lhs_content, nothrow_move(), 1L);
-
- BOOST_VARIANT_AUX_RETURN_VOID;
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
@@ -1038,8 +1010,6 @@ public: // structors
{
}
-#if !defined(BOOST_NO_VOID_RETURNS)
-
public: // internal visitor interfaces
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
@@ -1048,7 +1018,7 @@ public: // internal visitor interfaces
template <typename T>
typename enable_if_c<MoveSemantics && is_same<T, T>::value, result_type>::type internal_visit(T&& operand, int)
{
- return visitor_(::boost::move<T>(operand));
+ return visitor_(::boost::move(operand));
}
//using workaround with is_same<T, T> to prenvent compilation error, because we need to use T in enable_if to make SFINAE work
@@ -1066,7 +1036,7 @@ public: // internal visitor interfaces
return visitor_(operand);
}
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
+# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x0564))
template <typename T>
result_type internal_visit(const T& operand, int)
{
@@ -1076,119 +1046,40 @@ public: // internal visitor interfaces
#endif //RVALUE REFERENCES
-#else // defined(BOOST_NO_VOID_RETURNS)
-
-private: // helpers, for internal visitor interfaces (below)
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
- //using workaround with is_same<T, T> to prenvent compilation error, because we need to use T in enable_if to make SFINAE work
- template <typename T>
- typename enable_if<mpl::and_<MoveSemantics && is_same<T, T>::value>, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
- visit_impl(T&& operand, mpl::false_)
- {
- return visitor_(::boost::move(operand));
- }
-
- //using workaround with is_same<T, T> to prenvent compilation error, because we need to use T in enable_if to make SFINAE work
- template <typename T>
- typename enable_if_c<MoveSemantics && is_same<T, T>::value, BOOST_VARIANT_AUX_RETURN_VOID_TYPE>::type
- visit_impl(T&& operand, mpl::true_)
- {
- visitor_(::boost::move(operand));
- BOOST_VARIANT_AUX_RETURN_VOID;
- }
-
- //using workaround with is_same<T, T> to prenvent compilation error, because we need to use T in enable_if to make SFINAE work
- template <typename T>
- typename disable_if_c<MoveSemantics && is_same<T, T>::value, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)>::type
- visit_impl(T&& operand, mpl::false_)
- {
- return visitor_(operand);
- }
-
- //using workaround with is_same<T, T> to prenvent compilation error, because we need to use T in enable_if to make SFINAE work
- template <typename T>
- typename disable_if<MoveSemantics && is_same<T, T>::value, BOOST_VARIANT_AUX_RETURN_VOID_TYPE>::type
- visit_impl(T&& operand, mpl::true_)
- {
- visitor_(operand);
- BOOST_VARIANT_AUX_RETURN_VOID;
- }
-
-#else
-
- template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- visit_impl(T& operand, mpl::false_)
- {
- return visitor_(operand);
- }
-
- template <typename T>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- visit_impl(T& operand, mpl::true_)
- {
- visitor_(operand);
- BOOST_VARIANT_AUX_RETURN_VOID;
- }
-
-#endif //RVALUE_REFERENCES
-
-public: // internal visitor interfaces
-
- template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(T& operand, int)
- {
- typedef typename is_same<result_type, void>::type
- has_void_result_type;
-
- return visit_impl(operand, has_void_result_type());
- }
-
-#endif // BOOST_NO_VOID_RETURNS) workaround
-
public: // internal visitor interfaces, cont.
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(boost::recursive_wrapper<T>& operand, long)
+ result_type internal_visit(boost::recursive_wrapper<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(const boost::recursive_wrapper<T>& operand, long)
+ result_type internal_visit(const boost::recursive_wrapper<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(boost::detail::reference_content<T>& operand, long)
+ result_type internal_visit(boost::detail::reference_content<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(const boost::detail::reference_content<T>& operand, long)
+ result_type internal_visit(const boost::detail::reference_content<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(boost::detail::variant::backup_holder<T>& operand, long)
+ result_type internal_visit(boost::detail::variant::backup_holder<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
template <typename T>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- internal_visit(const boost::detail::variant::backup_holder<T>& operand, long)
+ result_type internal_visit(const boost::detail::variant::backup_holder<T>& operand, long)
{
return internal_visit( operand.get(), 1L );
}
@@ -1481,15 +1372,15 @@ public: // structors
destroy_content();
}
- variant()
+ variant()
#if !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
BOOST_NOEXCEPT_IF(boost::has_nothrow_constructor<internal_T0>::value)
#endif
{
#ifdef _MSC_VER
#pragma warning( push )
-// behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
-#pragma warning( disable : 4345 )
+// behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
+#pragma warning( disable : 4345 )
#endif
// NOTE TO USER :
// Compile error from here indicates that the first bound
@@ -1525,14 +1416,14 @@ private: // helpers, for structors, cont. (below)
int internal_visit(T& operand, int) const
{
// NOTE TO USER :
- // Compile error here indicates one of the source variant's types
+ // Compile error here indicates one of the source variant's types
// cannot be unambiguously converted to the destination variant's
// types (or that no conversion exists).
//
return initializer::initialize(storage_, operand);
}
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
+# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x0564))
template <typename T>
result_type internal_visit(const T& operand, int) const
{
@@ -1601,7 +1492,7 @@ private: // helpers, for structors, cont. (below)
int internal_visit(T& operand, int) const
{
// NOTE TO USER :
- // Compile error here indicates one of the source variant's types
+ // Compile error here indicates one of the source variant's types
// cannot be unambiguously converted to the destination variant's
// types (or that no conversion exists).
//
@@ -1648,7 +1539,7 @@ private: // helpers, for structors, cont. (below)
friend class convert_move_into;
#endif
-private: // helpers, for structors, below
+private: // helpers, for structors, below
template <typename T>
void convert_construct(
@@ -1658,7 +1549,7 @@ private: // helpers, for structors, below
)
{
// NOTE TO USER :
- // Compile error here indicates that the given type is not
+ // Compile error here indicates that the given type is not
// unambiguously convertible to one of the variant's types
// (or that no conversion exists).
//
@@ -1679,7 +1570,7 @@ private: // helpers, for structors, below
)
{
// NOTE TO USER :
- // Compile error here indicates that the given type is not
+ // Compile error here indicates that the given type is not
// unambiguously convertible to one of the variant's types
// (or that no conversion exists).
//
@@ -1797,7 +1688,7 @@ private: // helpers, for structors, below
, long
)
{
- convert_construct_variant(operand);
+ convert_construct_variant(operand);
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
@@ -1810,7 +1701,7 @@ private: // helpers, for structors, below
, long
)
{
- convert_construct_variant( detail::variant::move(operand) );
+ convert_construct_variant( detail::variant::move(operand) );
}
#endif
@@ -1822,8 +1713,9 @@ public: // structors, cont.
mpl::and_<
mpl::not_< boost::is_same<T, variant> >,
boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
- >,
- boost::is_same<T, boost::recursive_variant_> > >::type* = 0)
+ >,
+ boost::is_same<T, boost::recursive_variant_> >,
+ bool >::type = true)
{
convert_construct(operand, 1L);
}
@@ -1837,7 +1729,8 @@ public: // structors, cont.
mpl::not_< boost::is_same<T, variant> >,
boost::detail::variant::is_variant_constructible_from<T&, internal_types>
>,
- boost::is_same<T, boost::recursive_variant_> > >::type* = 0
+ boost::is_same<T, boost::recursive_variant_> >,
+ bool >::type = true
)
{
convert_construct(operand, 1L);
@@ -1853,7 +1746,8 @@ public: // structors, cont.
mpl::not_< boost::is_same<T, variant> >,
boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
>,
- boost::is_same<T, boost::recursive_variant_> > >::type* = 0)
+ boost::is_same<T, boost::recursive_variant_> >,
+ bool >::type = true)
{
convert_construct( detail::variant::move(operand), 1L);
}
@@ -2013,8 +1907,7 @@ private: // helpers, for modifiers (below)
public: // internal visitor interfaces
template <typename RhsT>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(const RhsT& rhs_content, int) const
+ void internal_visit(const RhsT& rhs_content, int) const
{
typedef typename has_nothrow_copy<RhsT>::type
nothrow_copy;
@@ -2029,8 +1922,6 @@ private: // helpers, for modifiers (below)
, nothrow_move_constructor()
, has_fallback_type_()
);
-
- BOOST_VARIANT_AUX_RETURN_VOID;
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
@@ -2039,9 +1930,9 @@ private: // helpers, for modifiers (below)
assigner& operator= (assigner const&);
#endif
};
-
+
friend class assigner;
-
+
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
// class move_assigner
//
@@ -2060,7 +1951,7 @@ private: // helpers, for modifiers (below)
}
private: // helpers, for internal visitor interface (below)
-
+
template <typename RhsT, typename B2>
void assign_impl(
RhsT& rhs_content
@@ -2120,7 +2011,7 @@ private: // helpers, for modifiers (below)
// In the event of success, indicate new content type:
assigner::lhs_.indicate_which(assigner::rhs_which_); // nothrow
}
-
+
template <typename RhsT>
void assign_impl(
RhsT& rhs_content
@@ -2135,8 +2026,7 @@ private: // helpers, for modifiers (below)
public: // internal visitor interfaces
template <typename RhsT>
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- internal_visit(RhsT& rhs_content, int) const
+ void internal_visit(RhsT& rhs_content, int) const
{
typedef typename is_nothrow_move_constructible<RhsT>::type
nothrow_move_constructor;
@@ -2151,8 +2041,6 @@ private: // helpers, for modifiers (below)
, nothrow_move_constructor()
, has_fallback_type_()
);
-
- BOOST_VARIANT_AUX_RETURN_VOID;
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
@@ -2178,7 +2066,7 @@ private: // helpers, for modifiers (below)
{
// Otherwise, perform general (copy-based) variant assignment:
assigner visitor(*this, rhs.which());
- rhs.internal_apply_visitor(visitor);
+ rhs.internal_apply_visitor(visitor);
}
}
@@ -2196,7 +2084,7 @@ private: // helpers, for modifiers (below)
{
// Otherwise, perform general (move-based) variant assignment:
move_assigner visitor(*this, rhs.which());
- rhs.internal_apply_visitor(visitor);
+ rhs.internal_apply_visitor(visitor);
}
}
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
@@ -2252,7 +2140,7 @@ public: // modifiers
boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
>,
variant&
- >::type operator=(T&& rhs)
+ >::type operator=(T&& rhs)
{
move_assign( detail::variant::move(rhs) );
return *this;
@@ -2280,7 +2168,7 @@ public: // modifiers
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- variant& operator=(variant&& rhs)
+ variant& operator=(variant&& rhs)
#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6) || defined(__clang__)
BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value && variant_move_noexcept_assignable::type::value)
#endif
@@ -2430,10 +2318,7 @@ public:
#endif// !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
template <typename Visitor, typename VoidPtrCV>
- static
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ BOOST_FORCEINLINE static typename Visitor::result_type
internal_apply_visitor_impl(
int internal_which
, int logical_which
@@ -2458,9 +2343,7 @@ public:
}
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ BOOST_FORCEINLINE typename Visitor::result_type
internal_apply_visitor(Visitor& visitor)
{
return internal_apply_visitor_impl(
@@ -2469,9 +2352,7 @@ public:
}
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ BOOST_FORCEINLINE typename Visitor::result_type
internal_apply_visitor(Visitor& visitor) const
{
return internal_apply_visitor_impl(
@@ -2484,9 +2365,7 @@ public: // visitation support
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ typename Visitor::result_type
apply_visitor(Visitor& visitor) &&
{
detail::variant::invoke_visitor<Visitor, true> invoker(visitor);
@@ -2494,9 +2373,7 @@ public: // visitation support
}
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ typename Visitor::result_type
apply_visitor(Visitor& visitor) const&&
{
detail::variant::invoke_visitor<Visitor, true> invoker(visitor);
@@ -2506,9 +2383,7 @@ public: // visitation support
#endif
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ typename Visitor::result_type
apply_visitor(Visitor& visitor)
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
&
@@ -2519,9 +2394,7 @@ public: // visitation support
}
template <typename Visitor>
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
- typename Visitor::result_type
- )
+ typename Visitor::result_type
apply_visitor(Visitor& visitor) const
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
&
diff --git a/contrib/restricted/boost/variant/include/boost/variant/variant_fwd.hpp b/contrib/restricted/boost/variant/include/boost/variant/variant_fwd.hpp
index b533f76668..ff93f12f0a 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/variant_fwd.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/variant_fwd.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman, Itay Maman
-// Copyright (c) 2013-2016 Antony Polukhin
+// Copyright (c) 2013-2022 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/contrib/restricted/boost/variant/include/boost/variant/visitor_ptr.hpp b/contrib/restricted/boost/variant/include/boost/variant/visitor_ptr.hpp
index 61bc8dfc5f..00578413fa 100644
--- a/contrib/restricted/boost/variant/include/boost/variant/visitor_ptr.hpp
+++ b/contrib/restricted/boost/variant/include/boost/variant/visitor_ptr.hpp
@@ -68,8 +68,6 @@ public: // static visitor interfaces
boost::throw_exception(bad_visit());
}
-#if !defined(BOOST_NO_VOID_RETURNS)
-
public: // static visitor interfaces, cont.
result_type operator()(argument_fwd_type operand) const
@@ -77,33 +75,6 @@ public: // static visitor interfaces, cont.
return visitor_(operand);
}
-#else // defined(BOOST_NO_VOID_RETURNS)
-
-private: // helpers, for static visitor interfaces (below)
-
- result_type execute_impl(argument_fwd_type operand, mpl::false_) const
- {
- return visitor_(operand);
- }
-
- BOOST_VARIANT_AUX_RETURN_VOID_TYPE
- execute_impl(argument_fwd_type operand, mpl::true_) const
- {
- visitor_(operand);
- BOOST_VARIANT_AUX_RETURN_VOID;
- }
-
-public: // static visitor interfaces, cont.
-
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(argument_fwd_type operand) const
- {
- typedef typename is_void<result_type>::type has_void_result;
- return execute_impl(operand, has_void_result());
- }
-
-#endif // BOOST_NO_VOID_RETURNS workaround
-
};
template <typename R, typename T>