mirror of
https://github.com/boostorg/asio.git
synced 2026-02-24 02:12:12 +00:00
Enable separate compilation for any_io_executor.
This commit is contained in:
@@ -88,29 +88,17 @@ public:
|
|||||||
#endif // !defined(GENERATING_DOCUMENTATION)
|
#endif // !defined(GENERATING_DOCUMENTATION)
|
||||||
|
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
any_io_executor() BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor() BOOST_ASIO_NOEXCEPT;
|
||||||
: base_type()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Construct in an empty state. Equivalent effects to default constructor.
|
/// Construct in an empty state. Equivalent effects to default constructor.
|
||||||
any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT;
|
||||||
: base_type(nullptr_t())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Copy constructor.
|
/// Copy constructor.
|
||||||
any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT;
|
||||||
: base_type(static_cast<const base_type&>(e))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
||||||
/// Move constructor.
|
/// Move constructor.
|
||||||
any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT;
|
||||||
: base_type(static_cast<base_type&&>(e))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
||||||
|
|
||||||
/// Construct to point to the same target as another any_executor.
|
/// Construct to point to the same target as another any_executor.
|
||||||
@@ -159,38 +147,23 @@ public:
|
|||||||
#endif // defined(GENERATING_DOCUMENTATION)
|
#endif // defined(GENERATING_DOCUMENTATION)
|
||||||
|
|
||||||
/// Assignment operator.
|
/// Assignment operator.
|
||||||
any_io_executor& operator=(const any_io_executor& e) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor& operator=(
|
||||||
{
|
const any_io_executor& e) BOOST_ASIO_NOEXCEPT;
|
||||||
base_type::operator=(static_cast<const base_type&>(e));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
||||||
/// Move assignment operator.
|
/// Move assignment operator.
|
||||||
any_io_executor& operator=(any_io_executor&& e) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL any_io_executor& operator=(
|
||||||
{
|
any_io_executor&& e) BOOST_ASIO_NOEXCEPT;
|
||||||
base_type::operator=(static_cast<base_type&&>(e));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
|
||||||
|
|
||||||
/// Assignment operator that sets the polymorphic wrapper to the empty state.
|
/// Assignment operator that sets the polymorphic wrapper to the empty state.
|
||||||
any_io_executor& operator=(nullptr_t)
|
BOOST_ASIO_DECL any_io_executor& operator=(nullptr_t);
|
||||||
{
|
|
||||||
base_type::operator=(nullptr_t());
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
~any_io_executor()
|
BOOST_ASIO_DECL ~any_io_executor();
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Swap targets with another polymorphic wrapper.
|
/// Swap targets with another polymorphic wrapper.
|
||||||
void swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT
|
BOOST_ASIO_DECL void swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT;
|
||||||
{
|
|
||||||
static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Obtain a polymorphic wrapper with the specified property.
|
/// Obtain a polymorphic wrapper with the specified property.
|
||||||
/**
|
/**
|
||||||
@@ -231,6 +204,30 @@ public:
|
|||||||
|
|
||||||
#if !defined(GENERATING_DOCUMENTATION)
|
#if !defined(GENERATING_DOCUMENTATION)
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::require(
|
||||||
|
const execution::blocking_t::never_t&, int) const;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::blocking_t::possibly_t&, int) const;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::outstanding_work_t::tracked_t&, int) const;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::outstanding_work_t::untracked_t&, int) const;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::relationship_t::fork_t&, int) const;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
BOOST_ASIO_DECL any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::relationship_t::continuation_t&, int) const;
|
||||||
|
|
||||||
namespace traits {
|
namespace traits {
|
||||||
|
|
||||||
#if !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
|
#if !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
|
||||||
@@ -299,4 +296,8 @@ struct prefer_member<any_io_executor, Prop> :
|
|||||||
|
|
||||||
#include <boost/asio/detail/pop_options.hpp>
|
#include <boost/asio/detail/pop_options.hpp>
|
||||||
|
|
||||||
|
#if defined(BOOST_ASIO_HEADER_ONLY)
|
||||||
|
# include <boost/asio/impl/any_io_executor.ipp>
|
||||||
|
#endif // defined(BOOST_ASIO_HEADER_ONLY)
|
||||||
|
|
||||||
#endif // BOOST_ASIO_ANY_IO_EXECUTOR_HPP
|
#endif // BOOST_ASIO_ANY_IO_EXECUTOR_HPP
|
||||||
|
|||||||
126
include/boost/asio/impl/any_io_executor.ipp
Normal file
126
include/boost/asio/impl/any_io_executor.ipp
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
//
|
||||||
|
// impl/any_io_executor.ipp
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
//
|
||||||
|
// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
||||||
|
//
|
||||||
|
// 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_ASIO_IMPL_ANY_IO_EXECUTOR_IPP
|
||||||
|
#define BOOST_ASIO_IMPL_ANY_IO_EXECUTOR_IPP
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||||
|
# pragma once
|
||||||
|
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||||
|
|
||||||
|
#include <boost/asio/detail/config.hpp>
|
||||||
|
#include <boost/asio/any_io_executor.hpp>
|
||||||
|
|
||||||
|
#include <boost/asio/detail/push_options.hpp>
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace asio {
|
||||||
|
|
||||||
|
any_io_executor::any_io_executor() BOOST_ASIO_NOEXCEPT
|
||||||
|
: base_type()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
any_io_executor::any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT
|
||||||
|
: base_type(nullptr_t())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
any_io_executor::any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT
|
||||||
|
: base_type(static_cast<const base_type&>(e))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(BOOST_ASIO_HAS_MOVE)
|
||||||
|
any_io_executor::any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT
|
||||||
|
: base_type(static_cast<base_type&&>(e))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif // defined(BOOST_ASIO_HAS_MOVE)
|
||||||
|
|
||||||
|
any_io_executor& any_io_executor::operator=(
|
||||||
|
const any_io_executor& e) BOOST_ASIO_NOEXCEPT
|
||||||
|
{
|
||||||
|
base_type::operator=(static_cast<const base_type&>(e));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(BOOST_ASIO_HAS_MOVE)
|
||||||
|
any_io_executor& any_io_executor::operator=(
|
||||||
|
any_io_executor&& e) BOOST_ASIO_NOEXCEPT
|
||||||
|
{
|
||||||
|
base_type::operator=(static_cast<base_type&&>(e));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
#endif // defined(BOOST_ASIO_HAS_MOVE)
|
||||||
|
|
||||||
|
any_io_executor& any_io_executor::operator=(nullptr_t)
|
||||||
|
{
|
||||||
|
base_type::operator=(nullptr_t());
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
any_io_executor::~any_io_executor()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void any_io_executor::swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT
|
||||||
|
{
|
||||||
|
static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::require(
|
||||||
|
const execution::blocking_t::never_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).require(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::blocking_t::possibly_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).prefer(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::outstanding_work_t::tracked_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).prefer(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::outstanding_work_t::untracked_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).prefer(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::relationship_t::fork_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).prefer(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
any_io_executor any_io_executor::prefer(
|
||||||
|
const execution::relationship_t::continuation_t& p, int) const
|
||||||
|
{
|
||||||
|
return static_cast<const base_type&>(*this).prefer(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace asio
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#include <boost/asio/detail/pop_options.hpp>
|
||||||
|
|
||||||
|
#endif // BOOST_ASIO_IMPL_ANY_IO_EXECUTOR_IPP
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
|
# error Do not compile Asio library source with BOOST_ASIO_HEADER_ONLY defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/asio/impl/any_io_executor.ipp>
|
||||||
#include <boost/asio/impl/error.ipp>
|
#include <boost/asio/impl/error.ipp>
|
||||||
#include <boost/asio/impl/execution_context.ipp>
|
#include <boost/asio/impl/execution_context.ipp>
|
||||||
#include <boost/asio/impl/executor.ipp>
|
#include <boost/asio/impl/executor.ipp>
|
||||||
|
|||||||
Reference in New Issue
Block a user