mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-04 13:44:28 +01:00
externals: Update boost to 1.72 and add Boost Context
This commit is contained in:
parent
5e8300b76a
commit
77abe07b3b
618 changed files with 96299 additions and 14263 deletions
|
|
@ -314,6 +314,42 @@
|
|||
# endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
|
||||
#endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
|
||||
|
||||
// Support return type deduction on compilers known to allow it.
|
||||
#if !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
|
||||
# if !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
|
||||
# if defined(__clang__)
|
||||
# if __has_feature(__cxx_return_type_deduction__)
|
||||
# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
|
||||
# endif // __has_feature(__cxx_alias_templates__)
|
||||
# elif (__cplusplus >= 201402)
|
||||
# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
|
||||
# elif defined(__cpp_return_type_deduction)
|
||||
# if (__cpp_return_type_deduction >= 201304)
|
||||
# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
|
||||
# endif // (__cpp_return_type_deduction >= 201304)
|
||||
# endif // defined(__cpp_return_type_deduction)
|
||||
# endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
|
||||
#endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
|
||||
|
||||
// Support default function template arguments on compilers known to allow it.
|
||||
#if !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
|
||||
# if !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
|
||||
# if (__cplusplus >= 201103)
|
||||
# define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
|
||||
# endif // (__cplusplus >= 201103)
|
||||
# endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
|
||||
#endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
|
||||
|
||||
// Support concepts on compilers known to allow them.
|
||||
#if !defined(BOOST_ASIO_HAS_CONCEPTS)
|
||||
# if !defined(BOOST_ASIO_DISABLE_CONCEPTS)
|
||||
# if __cpp_concepts
|
||||
# define BOOST_ASIO_HAS_CONCEPTS 1
|
||||
# define BOOST_ASIO_CONCEPT concept bool
|
||||
# endif // __cpp_concepts
|
||||
# endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS)
|
||||
#endif // !defined(BOOST_ASIO_HAS_CONCEPTS)
|
||||
|
||||
// Standard library support for system errors.
|
||||
# if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
|
||||
# if defined(__clang__)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ void reactive_socket_service_base::construct(
|
|||
void reactive_socket_service_base::base_move_construct(
|
||||
reactive_socket_service_base::base_implementation_type& impl,
|
||||
reactive_socket_service_base::base_implementation_type& other_impl)
|
||||
BOOST_ASIO_NOEXCEPT
|
||||
{
|
||||
impl.socket_ = other_impl.socket_;
|
||||
other_impl.socket_ = invalid_socket;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ boost::system::error_code win_iocp_serial_port_service::open(
|
|||
dcb.fBinary = TRUE; // Win32 only supports binary mode.
|
||||
dcb.fNull = FALSE; // Do not ignore NULL characters.
|
||||
dcb.fAbortOnError = FALSE; // Ignore serial framing errors.
|
||||
dcb.BaudRate = 0; // 0 baud by default
|
||||
dcb.BaudRate = CBR_9600; // 9600 baud by default
|
||||
dcb.ByteSize = 8; // 8 bit bytes
|
||||
dcb.fOutxCtsFlow = FALSE; // No flow control
|
||||
dcb.fOutxDsrFlow = FALSE;
|
||||
|
|
@ -92,7 +92,7 @@ boost::system::error_code win_iocp_serial_port_service::open(
|
|||
dcb.fDsrSensitivity = FALSE;
|
||||
dcb.fOutX = FALSE;
|
||||
dcb.fInX = FALSE;
|
||||
dcb.fRtsControl = DTR_CONTROL_DISABLE;
|
||||
dcb.fRtsControl = RTS_CONTROL_DISABLE;
|
||||
dcb.fParity = FALSE; // No parity
|
||||
dcb.Parity = NOPARITY;
|
||||
dcb.StopBits = ONESTOPBIT; // One stop bit
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ void win_iocp_socket_service_base::construct(
|
|||
void win_iocp_socket_service_base::base_move_construct(
|
||||
win_iocp_socket_service_base::base_implementation_type& impl,
|
||||
win_iocp_socket_service_base::base_implementation_type& other_impl)
|
||||
BOOST_ASIO_NOEXCEPT
|
||||
{
|
||||
impl.socket_ = other_impl.socket_;
|
||||
other_impl.socket_ = invalid_socket;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
|
||||
// Move-construct a new socket implementation.
|
||||
void move_construct(implementation_type& impl,
|
||||
implementation_type& other_impl)
|
||||
implementation_type& other_impl) BOOST_ASIO_NOEXCEPT
|
||||
{
|
||||
this->base_move_construct(impl, other_impl);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
|
||||
// Move-construct a new socket implementation.
|
||||
BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
|
||||
base_implementation_type& other_impl);
|
||||
base_implementation_type& other_impl) BOOST_ASIO_NOEXCEPT;
|
||||
|
||||
// Move-assign from another socket implementation.
|
||||
BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/remove_pointer.hpp>
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
# include <boost/utility/declval.hpp>
|
||||
# include <boost/utility/enable_if.hpp>
|
||||
# include <boost/utility/result_of.hpp>
|
||||
#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
|
||||
|
|
@ -43,6 +44,7 @@ namespace asio {
|
|||
using std::add_const;
|
||||
using std::conditional;
|
||||
using std::decay;
|
||||
using std::declval;
|
||||
using std::enable_if;
|
||||
using std::false_type;
|
||||
using std::integral_constant;
|
||||
|
|
@ -68,6 +70,7 @@ template <bool Condition, typename Type = void>
|
|||
struct enable_if : boost::enable_if_c<Condition, Type> {};
|
||||
using boost::conditional;
|
||||
using boost::decay;
|
||||
using boost::declval;
|
||||
using boost::false_type;
|
||||
using boost::integral_constant;
|
||||
using boost::is_base_of;
|
||||
|
|
|
|||
|
|
@ -108,6 +108,24 @@
|
|||
BOOST_ASIO_MOVE_CAST(T3)(x3), BOOST_ASIO_MOVE_CAST(T4)(x4), \
|
||||
BOOST_ASIO_MOVE_CAST(T5)(x5)
|
||||
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL(n) \
|
||||
BOOST_ASIO_VARIADIC_MOVE_DECLVAL_##n
|
||||
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL_1 \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T1)>()
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL_2 \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T1)>(), declval<BOOST_ASIO_MOVE_ARG(T2)>()
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL_3 \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T1)>(), declval<BOOST_ASIO_MOVE_ARG(T2)>(), \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T3)>()
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL_4 \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T1)>(), declval<BOOST_ASIO_MOVE_ARG(T2)>(), \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T3)>(), declval<BOOST_ASIO_MOVE_ARG(T4)>()
|
||||
# define BOOST_ASIO_VARIADIC_MOVE_DECLVAL_5 \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T1)>(), declval<BOOST_ASIO_MOVE_ARG(T2)>(), \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T3)>(), declval<BOOST_ASIO_MOVE_ARG(T4)>(), \
|
||||
declval<BOOST_ASIO_MOVE_ARG(T5)>()
|
||||
|
||||
# define BOOST_ASIO_VARIADIC_DECAY(n) \
|
||||
BOOST_ASIO_VARIADIC_DECAY_##n
|
||||
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ public:
|
|||
if (ec == boost::asio::error::connection_aborted
|
||||
&& !o->enable_connection_aborted_)
|
||||
{
|
||||
handler_work<Handler, IoExecutor>::start(o->handler_, o->io_executor_);
|
||||
o->reset();
|
||||
o->socket_service_.restart_accept_op(o->socket_,
|
||||
o->new_socket_, o->protocol_.family(),
|
||||
|
|
@ -229,6 +230,7 @@ public:
|
|||
if (ec == boost::asio::error::connection_aborted
|
||||
&& !o->enable_connection_aborted_)
|
||||
{
|
||||
handler_work<Handler, IoExecutor>::start(o->handler_, o->io_executor_);
|
||||
o->reset();
|
||||
o->socket_service_.restart_accept_op(o->socket_,
|
||||
o->new_socket_, o->protocol_.family(),
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public:
|
|||
|
||||
// Move-construct a new socket implementation.
|
||||
void move_construct(implementation_type& impl,
|
||||
implementation_type& other_impl)
|
||||
implementation_type& other_impl) BOOST_ASIO_NOEXCEPT
|
||||
{
|
||||
this->base_move_construct(impl, other_impl);
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
// Move-construct a new socket implementation.
|
||||
BOOST_ASIO_DECL void base_move_construct(base_implementation_type& impl,
|
||||
base_implementation_type& other_impl);
|
||||
base_implementation_type& other_impl) BOOST_ASIO_NOEXCEPT;
|
||||
|
||||
// Move-assign from another socket implementation.
|
||||
BOOST_ASIO_DECL void base_move_assign(base_implementation_type& impl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue