mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-05 05:58:13 +01:00
Update to boost v1.64.0
This commit is contained in:
parent
46a3f6dccf
commit
155d20ab3c
53 changed files with 573 additions and 243 deletions
|
|
@ -3,7 +3,7 @@
|
|||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2013-2015 Antony Polukhin
|
||||
// Copyright (c) 2013-2017 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
|
@ -113,13 +113,15 @@ public: // visitor interfaces
|
|||
template <typename U>
|
||||
pointer operator()(U& operand) const BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename boost::remove_reference<Base>::type base_t;
|
||||
typedef boost::integral_constant<
|
||||
bool,
|
||||
boost::mpl::or_<
|
||||
boost::is_base_of<Base, U>,
|
||||
boost::is_same<Base, U>,
|
||||
boost::is_same<typename boost::remove_cv<Base>::type, U >
|
||||
>::value
|
||||
(
|
||||
boost::is_base_of<base_t, U>::value &&
|
||||
(boost::is_const<base_t>::value || !boost::is_const<U>::value)
|
||||
)
|
||||
|| boost::is_same<base_t, U>::value
|
||||
|| boost::is_same<typename boost::remove_cv<base_t>::type, U >::value
|
||||
> tag_t;
|
||||
|
||||
return this_type::get(operand, tag_t());
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2016 Antony Polukhin
|
||||
// Copyright (c) 2016-2017 Antony Polukhin
|
||||
//
|
||||
// Portions Copyright (C) 2002 David Abrahams
|
||||
//
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_constructible.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
|
@ -65,6 +66,9 @@ template <class T, class U> struct is_constructible<recursive_wrapper<T>, const
|
|||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U>& > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U>& > : boost::false_type{};
|
||||
|
||||
// recursive_wrapper is not nothrow move constructible, because it's constructor does dynamic memory allocation.
|
||||
// This specialisation is required to workaround GCC6 issue: https://svn.boost.org/trac/boost/ticket/12680
|
||||
template <class T> struct is_nothrow_move_constructible<recursive_wrapper<T> > : boost::false_type{};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_recursive_wrapper (modeled on code by David Abrahams)
|
||||
|
|
|
|||
|
|
@ -1756,10 +1756,12 @@ public: // structors, cont.
|
|||
|
||||
template <typename T>
|
||||
variant(const T& operand,
|
||||
typename boost::enable_if<mpl::and_<
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
|
||||
> >::type* = 0)
|
||||
typename boost::enable_if<mpl::or_<
|
||||
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)
|
||||
{
|
||||
convert_construct(operand, 1L);
|
||||
}
|
||||
|
|
@ -1767,11 +1769,13 @@ public: // structors, cont.
|
|||
template <typename T>
|
||||
variant(
|
||||
T& operand
|
||||
, typename boost::enable_if<mpl::and_<
|
||||
mpl::not_< is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&, internal_types>
|
||||
> >::type* = 0
|
||||
, typename boost::enable_if<mpl::or_<
|
||||
mpl::and_<
|
||||
mpl::not_< is_const<T> >,
|
||||
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
|
||||
)
|
||||
{
|
||||
convert_construct(operand, 1L);
|
||||
|
|
@ -1780,12 +1784,14 @@ public: // structors, cont.
|
|||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T>
|
||||
variant(T&& operand,
|
||||
typename boost::enable_if<mpl::and_<
|
||||
boost::is_rvalue_reference<T&&>,
|
||||
mpl::not_< boost::is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
|
||||
> >::type* = 0)
|
||||
typename boost::enable_if<mpl::or_<
|
||||
mpl::and_<
|
||||
boost::is_rvalue_reference<T&&>,
|
||||
mpl::not_< boost::is_const<T> >,
|
||||
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)
|
||||
{
|
||||
convert_construct( detail::variant::move(operand), 1L);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
GCC before 4.0 had no variadic tempaltes;
|
||||
GCC 4.6 has incomplete implementation of variadic templates.
|
||||
|
||||
MSVC2013 has variadic templates, but they have issues.
|
||||
MSVC2015 Update 1 has variadic templates, but they have issues.
|
||||
|
||||
NOTE: Clang compiler defines __GNUC__
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue