File indexing completed on 2025-12-16 09:43:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_EXPERIMENTAL_CHANNEL_HPP
0012 #define BOOST_ASIO_EXPERIMENTAL_CHANNEL_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/any_io_executor.hpp>
0020 #include <boost/asio/detail/type_traits.hpp>
0021 #include <boost/asio/execution/executor.hpp>
0022 #include <boost/asio/is_executor.hpp>
0023 #include <boost/asio/experimental/basic_channel.hpp>
0024 #include <boost/asio/experimental/channel_traits.hpp>
0025
0026 #include <boost/asio/detail/push_options.hpp>
0027
0028 namespace boost {
0029 namespace asio {
0030 namespace experimental {
0031 namespace detail {
0032
0033 template <typename ExecutorOrSignature, typename = void>
0034 struct channel_type
0035 {
0036 template <typename... Signatures>
0037 struct inner
0038 {
0039 typedef basic_channel<any_io_executor, channel_traits<>,
0040 ExecutorOrSignature, Signatures...> type;
0041 };
0042 };
0043
0044 template <typename ExecutorOrSignature>
0045 struct channel_type<ExecutorOrSignature,
0046 enable_if_t<
0047 is_executor<ExecutorOrSignature>::value
0048 || execution::is_executor<ExecutorOrSignature>::value
0049 >>
0050 {
0051 template <typename... Signatures>
0052 struct inner
0053 {
0054 typedef basic_channel<ExecutorOrSignature,
0055 channel_traits<>, Signatures...> type;
0056 };
0057 };
0058
0059 }
0060
0061
0062 #if defined(GENERATING_DOCUMENTATION)
0063 template <typename ExecutorOrSignature, typename... Signatures>
0064 using channel = basic_channel<
0065 specified_executor_or_any_io_executor, channel_traits<>, signatures...>;
0066 #else
0067 template <typename ExecutorOrSignature, typename... Signatures>
0068 using channel = typename detail::channel_type<
0069 ExecutorOrSignature>::template inner<Signatures...>::type;
0070 #endif
0071
0072 }
0073 }
0074 }
0075
0076 #include <boost/asio/detail/pop_options.hpp>
0077
0078 #endif