File indexing completed on 2025-09-17 08:39:14
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_MYSQL_DETAIL_INITIATION_BASE_HPP
0009 #define BOOST_MYSQL_DETAIL_INITIATION_BASE_HPP
0010
0011 #include <boost/mysql/with_diagnostics.hpp>
0012
0013 #include <boost/asio/any_io_executor.hpp>
0014 #include <boost/asio/associator.hpp>
0015 #include <boost/asio/deferred.hpp>
0016
0017 #include <type_traits>
0018
0019 namespace boost {
0020 namespace mysql {
0021 namespace detail {
0022
0023 struct executor_with_default : asio::any_io_executor
0024 {
0025 using default_completion_token_type = with_diagnostics_t<asio::deferred_t>;
0026
0027 template <
0028 typename InnerExecutor1,
0029 class = typename std::enable_if<!std::is_same<InnerExecutor1, executor_with_default>::value>::type>
0030 executor_with_default(const InnerExecutor1& ex) noexcept : asio::any_io_executor(ex)
0031 {
0032 }
0033 };
0034
0035
0036
0037
0038 struct initiation_base
0039 {
0040 executor_with_default ex;
0041
0042 initiation_base(asio::any_io_executor ex) noexcept : ex(std::move(ex)) {}
0043
0044 using executor_type = executor_with_default;
0045 const executor_type& get_executor() const noexcept { return ex; }
0046 };
0047
0048 }
0049 }
0050
0051 }
0052
0053 #endif