mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2025-12-30 03:04:45 +01:00
Update boost to 1.71 and add asio
This commit is contained in:
parent
0b920df1c9
commit
43274a0449
1233 changed files with 231689 additions and 5532 deletions
|
|
@ -14,10 +14,9 @@
|
|||
#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
|
||||
|
||||
#include <boost/detail/reference_content.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/conditional.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
|
@ -96,13 +95,13 @@ class optional_base : public optional_tag
|
|||
|
||||
typedef T value_type ;
|
||||
|
||||
typedef mpl::true_ is_reference_tag ;
|
||||
typedef mpl::false_ is_not_reference_tag ;
|
||||
typedef true_type is_reference_tag ;
|
||||
typedef false_type is_not_reference_tag ;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
|
||||
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
|
||||
typedef BOOST_DEDUCED_TYPENAME conditional<is_reference_predicate::value,types_when_ref,types_when_not_ref>::type types ;
|
||||
|
||||
protected:
|
||||
typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
|
||||
|
|
@ -333,7 +332,7 @@ class optional_base : public optional_tag
|
|||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
|
|
@ -422,7 +421,7 @@ class optional_base : public optional_tag
|
|||
template<class Expr>
|
||||
void construct ( Expr&& factory, in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||
m_initialized = true ;
|
||||
}
|
||||
|
|
@ -431,7 +430,7 @@ class optional_base : public optional_tag
|
|||
template<class Expr>
|
||||
void construct ( Expr&& factory, typed_in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
factory.apply(m_storage.address()) ;
|
||||
m_initialized = true ;
|
||||
}
|
||||
|
|
@ -456,7 +455,7 @@ class optional_base : public optional_tag
|
|||
template<class Expr>
|
||||
void construct ( Expr const& factory, in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
||||
m_initialized = true ;
|
||||
}
|
||||
|
|
@ -465,7 +464,7 @@ class optional_base : public optional_tag
|
|||
template<class Expr>
|
||||
void construct ( Expr const& factory, typed_in_place_factory_base const* )
|
||||
{
|
||||
BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
|
||||
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
||||
factory.apply(m_storage.address()) ;
|
||||
m_initialized = true ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class tc_optional_base : public optional_tag
|
|||
:
|
||||
m_initialized(false) {}
|
||||
|
||||
tc_optional_base ( argument_type val )
|
||||
tc_optional_base ( init_value_tag, argument_type val )
|
||||
:
|
||||
m_initialized(true), m_storage(val) {}
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ class tc_optional_base : public optional_tag
|
|||
// Assigns from another optional<T> (deep-copies the rhs value)
|
||||
void assign ( tc_optional_base const& rhs )
|
||||
{
|
||||
this->operator=(rhs);
|
||||
*this = rhs;
|
||||
}
|
||||
|
||||
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
|
||||
|
|
@ -127,7 +127,7 @@ class tc_optional_base : public optional_tag
|
|||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ using optional_ns::in_place_init_if;
|
|||
|
||||
namespace optional_detail {
|
||||
|
||||
struct optional_tag {} ;
|
||||
struct init_value_tag {};
|
||||
|
||||
struct optional_tag {};
|
||||
|
||||
|
||||
template<class T>
|
||||
|
|
@ -147,7 +149,7 @@ class optional_base : public optional_tag
|
|||
|
||||
// Creates an optional<T> initialized with 'val'.
|
||||
// Can throw if T::T(T const&) does
|
||||
optional_base ( argument_type val )
|
||||
optional_base ( init_value_tag, argument_type val )
|
||||
:
|
||||
m_initialized(false)
|
||||
{
|
||||
|
|
@ -157,7 +159,7 @@ class optional_base : public optional_tag
|
|||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
// move-construct an optional<T> initialized from an rvalue-ref to 'val'.
|
||||
// Can throw if T::T(T&&) does
|
||||
optional_base ( rval_reference_type val )
|
||||
optional_base ( init_value_tag, rval_reference_type val )
|
||||
:
|
||||
m_initialized(false)
|
||||
{
|
||||
|
|
@ -378,7 +380,7 @@ class optional_base : public optional_tag
|
|||
|
||||
public :
|
||||
|
||||
// **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// Destroys the current value, if any, leaving this UNINITIALIZED
|
||||
// No-throw (assuming T::~T() doesn't)
|
||||
void reset() BOOST_NOEXCEPT { destroy(); }
|
||||
|
||||
|
|
@ -870,12 +872,12 @@ class optional
|
|||
|
||||
// Creates an optional<T> initialized with 'val'.
|
||||
// Can throw if T::T(T const&) does
|
||||
optional ( argument_type val ) : base(val) {}
|
||||
optional ( argument_type val ) : base(optional_detail::init_value_tag(), val) {}
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
// Creates an optional<T> initialized with 'move(val)'.
|
||||
// Can throw if T::T(T &&) does
|
||||
optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
|
||||
optional ( rval_reference_type val ) : base(optional_detail::init_value_tag(), boost::forward<T>(val))
|
||||
{}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue