]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/impl/any_io_executor.ipp
bump version to 19.2.0-pve1
[ceph.git] / ceph / src / boost / boost / asio / impl / any_io_executor.ipp
CommitLineData
1e59de90
TL
1//
2// impl/any_io_executor.ipp
3// ~~~~~~~~~~~~~~~~~~~~~~~~
4//
f51cf556 5// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
1e59de90
TL
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#ifndef BOOST_ASIO_IMPL_ANY_IO_EXECUTOR_IPP
12#define BOOST_ASIO_IMPL_ANY_IO_EXECUTOR_IPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#include <boost/asio/detail/config.hpp>
19
20#if !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
21
22#include <boost/asio/any_io_executor.hpp>
23
24#include <boost/asio/detail/push_options.hpp>
25
26namespace boost {
27namespace asio {
28
29any_io_executor::any_io_executor() BOOST_ASIO_NOEXCEPT
30 : base_type()
31{
32}
33
34any_io_executor::any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT
35 : base_type(nullptr_t())
36{
37}
38
39any_io_executor::any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT
40 : base_type(static_cast<const base_type&>(e))
41{
42}
43
f51cf556
TL
44any_io_executor::any_io_executor(std::nothrow_t,
45 const any_io_executor& e) BOOST_ASIO_NOEXCEPT
46 : base_type(static_cast<const base_type&>(e))
47{
48}
49
1e59de90
TL
50#if defined(BOOST_ASIO_HAS_MOVE)
51any_io_executor::any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT
52 : base_type(static_cast<base_type&&>(e))
f51cf556
TL
53{
54}
55
56any_io_executor::any_io_executor(std::nothrow_t,
57 any_io_executor&& e) BOOST_ASIO_NOEXCEPT
58 : base_type(static_cast<base_type&&>(e))
1e59de90
TL
59{
60}
61#endif // defined(BOOST_ASIO_HAS_MOVE)
62
63any_io_executor& any_io_executor::operator=(
64 const any_io_executor& e) BOOST_ASIO_NOEXCEPT
65{
66 base_type::operator=(static_cast<const base_type&>(e));
67 return *this;
68}
69
70#if defined(BOOST_ASIO_HAS_MOVE)
71any_io_executor& any_io_executor::operator=(
72 any_io_executor&& e) BOOST_ASIO_NOEXCEPT
73{
74 base_type::operator=(static_cast<base_type&&>(e));
75 return *this;
76}
77#endif // defined(BOOST_ASIO_HAS_MOVE)
78
79any_io_executor& any_io_executor::operator=(nullptr_t)
80{
81 base_type::operator=(nullptr_t());
82 return *this;
83}
84
85any_io_executor::~any_io_executor()
86{
87}
88
89void any_io_executor::swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT
90{
91 static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
92}
93
94template <>
95any_io_executor any_io_executor::require(
96 const execution::blocking_t::never_t& p, int) const
97{
98 return static_cast<const base_type&>(*this).require(p);
99}
100
101template <>
102any_io_executor any_io_executor::prefer(
103 const execution::blocking_t::possibly_t& p, int) const
104{
105 return static_cast<const base_type&>(*this).prefer(p);
106}
107
108template <>
109any_io_executor any_io_executor::prefer(
110 const execution::outstanding_work_t::tracked_t& p, int) const
111{
112 return static_cast<const base_type&>(*this).prefer(p);
113}
114
115template <>
116any_io_executor any_io_executor::prefer(
117 const execution::outstanding_work_t::untracked_t& p, int) const
118{
119 return static_cast<const base_type&>(*this).prefer(p);
120}
121
122template <>
123any_io_executor any_io_executor::prefer(
124 const execution::relationship_t::fork_t& p, int) const
125{
126 return static_cast<const base_type&>(*this).prefer(p);
127}
128
129template <>
130any_io_executor any_io_executor::prefer(
131 const execution::relationship_t::continuation_t& p, int) const
132{
133 return static_cast<const base_type&>(*this).prefer(p);
134}
135
136} // namespace asio
137} // namespace boost
138
139#include <boost/asio/detail/pop_options.hpp>
140
141#endif // !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
142
143#endif // BOOST_ASIO_IMPL_ANY_IO_EXECUTOR_IPP