update boost
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_VARIANT_BAD_VISIT_HPP
|
||||
#define BOOST_VARIANT_BAD_VISIT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace boost {
|
||||
@@ -28,7 +30,7 @@ struct BOOST_SYMBOL_VISIBLE bad_visit
|
||||
{
|
||||
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";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman
|
||||
// Copyright (c) 2014-2019 Antony Polukhin
|
||||
// Copyright (c) 2014-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -25,8 +25,7 @@
|
||||
# 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 {
|
||||
@@ -262,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));
|
||||
}
|
||||
@@ -294,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
|
||||
@@ -306,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
|
||||
@@ -326,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
|
||||
@@ -339,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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman
|
||||
// Copyright (c) 2014-2019 Antony Polukhin
|
||||
// Copyright (c) 2014-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -23,6 +23,7 @@
|
||||
# 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
|
||||
@@ -85,7 +86,7 @@ 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>
|
||||
@@ -95,14 +96,14 @@ struct result_multideduce1 {
|
||||
struct deduce_impl {
|
||||
typedef typename boost::mpl::next<It>::type next_t;
|
||||
typedef typename boost::mpl::deref<It>::type value_t;
|
||||
typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() )
|
||||
typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
|
||||
: boost::declval< typename deduce_impl<next_t>::type >()) type;
|
||||
};
|
||||
|
||||
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< value_t >() )) type;
|
||||
typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
|
||||
};
|
||||
|
||||
typedef typename deduce_impl<begin_it>::type type;
|
||||
@@ -129,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman
|
||||
// Copyright (c) 2016-2019 Antony Polukhin
|
||||
// Copyright (c) 2016-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -16,4 +16,22 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
||||
defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
|
||||
defined(BOOST_NO_CXX11_CONSTEXPR) || \
|
||||
defined(BOOST_NO_CXX11_NULLPTR) || \
|
||||
defined(BOOST_NO_CXX11_NOEXCEPT) || \
|
||||
defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
|
||||
defined(BOOST_NO_CXX11_FINAL) || \
|
||||
defined(BOOST_NO_CXX11_ALIGNOF) || \
|
||||
defined(BOOST_NO_CXX11_STATIC_ASSERT) || \
|
||||
defined(BOOST_NO_CXX11_SMART_PTR) || \
|
||||
defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || \
|
||||
defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
|
||||
BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Variant 1.82 and will be removed in Boost.Variant 1.84.")
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2014-2019 Antony Polukhin
|
||||
// Copyright (c) 2014-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman
|
||||
// Copyright (c) 2015-2019 Antony Polukhin
|
||||
// Copyright (c) 2015-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstdlib> // std::abort
|
||||
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@@ -25,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
|
||||
//
|
||||
@@ -44,12 +37,9 @@ forced_return()
|
||||
// logical error: should never be here! (see above)
|
||||
BOOST_ASSERT(false);
|
||||
|
||||
forced_return_no_return();
|
||||
|
||||
#ifdef BOOST_NO_NORETURN
|
||||
T (*dummy)() = 0;
|
||||
return dummy();
|
||||
#endif
|
||||
(void)dummy;
|
||||
BOOST_UNREACHABLE_RETURN(dummy());
|
||||
}
|
||||
|
||||
}}} // namespace boost::detail::variant
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2014-2019 Antony Polukhin
|
||||
// Copyright (c) 2014-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2011-2019 Antony Polukhin
|
||||
// Copyright (c) 2011-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2013-2019 Antony Polukhin
|
||||
// Copyright (c) 2013-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman
|
||||
// Copyright (c) 2002 by Andrei Alexandrescu
|
||||
// Copyright (c) 2013-2019 Antony Polukhin
|
||||
// Copyright (c) 2013-2023 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 {
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/variant/detail/multivisitors_cpp14_based.hpp>
|
||||
#include <tuple>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
@@ -106,8 +106,9 @@ namespace detail { namespace variant {
|
||||
template <class Visitor, class T1, class T2, class T3, class... TN>
|
||||
inline decltype(auto) apply_visitor(const Visitor& visitor, T1&& v1, T2&& v2, T3&& v3, TN&&... vn,
|
||||
typename boost::disable_if<
|
||||
boost::detail::variant::has_result_type<Visitor>
|
||||
>::type* = 0)
|
||||
boost::detail::variant::has_result_type<Visitor>,
|
||||
bool
|
||||
>::type = true)
|
||||
{
|
||||
return boost::apply_visitor(
|
||||
::boost::detail::variant::make_one_by_one_visitor_and_value_referer_cpp14(
|
||||
@@ -122,13 +123,14 @@ namespace detail { namespace variant {
|
||||
::boost::forward<T1>(v1)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class Visitor, class T1, class T2, class T3, class... TN>
|
||||
inline decltype(auto) apply_visitor(Visitor& visitor, T1&& v1, T2&& v2, T3&& v3, TN&&... vn,
|
||||
typename boost::disable_if<
|
||||
boost::detail::variant::has_result_type<Visitor>
|
||||
>::type* = 0)
|
||||
boost::detail::variant::has_result_type<Visitor>,
|
||||
bool
|
||||
>::type = true)
|
||||
{
|
||||
return ::boost::apply_visitor(
|
||||
::boost::detail::variant::make_one_by_one_visitor_and_value_referer_cpp14(
|
||||
|
||||
46
linx64/include/boost/variant/detail/std_hash.hpp
Normal file
46
linx64/include/boost/variant/detail/std_hash.hpp
Normal file
@@ -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-2023 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
|
||||
|
||||
@@ -34,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
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -58,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 {
|
||||
|
||||
@@ -177,7 +184,7 @@ 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!
|
||||
@@ -190,13 +197,13 @@ template <
|
||||
, typename Visitor, typename VoidPtrCV
|
||||
, typename NoBackupFlag
|
||||
>
|
||||
inline 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...
|
||||
@@ -263,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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2014-2019 Antony Polukhin
|
||||
// Copyright (c) 2014-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -16,10 +16,10 @@
|
||||
#include <exception>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/utility/addressof.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
#include <boost/variant/detail/element_index.hpp>
|
||||
#include <boost/variant/detail/move.hpp>
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// See http://www.boost.org for most recent version, including documentation.
|
||||
//
|
||||
// Copyright (c) 2013-2019 Antony Polukhin.
|
||||
// Copyright (c) 2013-2023 Antony Polukhin.
|
||||
//
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2013-2019 Antony Polukhin
|
||||
// Copyright (c) 2013-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -15,10 +15,10 @@
|
||||
#include <exception>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/utility/addressof.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
#include <boost/variant/get.hpp>
|
||||
|
||||
@@ -132,11 +132,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
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman
|
||||
// Copyright (c) 2013-2019 Antony Polukhin
|
||||
// Copyright (c) 2013-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <boost/variant/recursive_wrapper_fwd.hpp>
|
||||
#include <boost/variant/detail/move.hpp>
|
||||
#include <boost/checked_delete.hpp>
|
||||
#include <boost/core/checked_delete.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2016-2019 Antony Polukhin
|
||||
// Copyright (c) 2016-2023 Antony Polukhin
|
||||
//
|
||||
// Portions Copyright (C) 2002 David Abrahams
|
||||
//
|
||||
|
||||
@@ -82,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))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2012-2019 Antony Polukhin
|
||||
// Copyright (c) 2012-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -32,17 +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/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>
|
||||
@@ -54,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>
|
||||
|
||||
@@ -129,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
|
||||
@@ -346,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
|
||||
@@ -384,7 +385,7 @@ public: // visitor interfaces
|
||||
{
|
||||
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
|
||||
@@ -1017,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
|
||||
@@ -1035,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)
|
||||
{
|
||||
@@ -1371,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
|
||||
@@ -1415,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
|
||||
{
|
||||
@@ -1491,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).
|
||||
//
|
||||
@@ -1538,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(
|
||||
@@ -1548,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).
|
||||
//
|
||||
@@ -1569,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).
|
||||
//
|
||||
@@ -1687,7 +1688,7 @@ private: // helpers, for structors, below
|
||||
, long
|
||||
)
|
||||
{
|
||||
convert_construct_variant(operand);
|
||||
convert_construct_variant(operand);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
@@ -1700,7 +1701,7 @@ private: // helpers, for structors, below
|
||||
, long
|
||||
)
|
||||
{
|
||||
convert_construct_variant( detail::variant::move(operand) );
|
||||
convert_construct_variant( detail::variant::move(operand) );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1712,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);
|
||||
}
|
||||
@@ -1727,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);
|
||||
@@ -1743,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);
|
||||
}
|
||||
@@ -1926,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
|
||||
//
|
||||
@@ -1947,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
|
||||
@@ -2007,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
|
||||
@@ -2062,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2080,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
|
||||
@@ -2127,7 +2131,8 @@ private: // helpers, for modifiers (below)
|
||||
|
||||
public: // modifiers
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
|
||||
(!BOOST_WORKAROUND(BOOST_CLANG_VERSION, BOOST_TESTED_AT(150000)) || BOOST_CXX_VERSION <= 202002L)
|
||||
template <class T>
|
||||
typename boost::enable_if<
|
||||
boost::mpl::and_<
|
||||
@@ -2136,7 +2141,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;
|
||||
@@ -2164,7 +2169,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
|
||||
@@ -2314,7 +2319,7 @@ public:
|
||||
#endif// !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
||||
|
||||
template <typename Visitor, typename VoidPtrCV>
|
||||
static typename Visitor::result_type
|
||||
BOOST_FORCEINLINE static typename Visitor::result_type
|
||||
internal_apply_visitor_impl(
|
||||
int internal_which
|
||||
, int logical_which
|
||||
@@ -2339,7 +2344,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename Visitor>
|
||||
typename Visitor::result_type
|
||||
BOOST_FORCEINLINE typename Visitor::result_type
|
||||
internal_apply_visitor(Visitor& visitor)
|
||||
{
|
||||
return internal_apply_visitor_impl(
|
||||
@@ -2348,7 +2353,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename Visitor>
|
||||
typename Visitor::result_type
|
||||
BOOST_FORCEINLINE typename Visitor::result_type
|
||||
internal_apply_visitor(Visitor& visitor) const
|
||||
{
|
||||
return internal_apply_visitor_impl(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2013-2019 Antony Polukhin
|
||||
// Copyright (c) 2013-2023 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
Reference in New Issue
Block a user