diff --git a/include/continuable/support/asio.hpp b/include/continuable/support/asio.hpp index c74fd5f..387fef3 100644 --- a/include/continuable/support/asio.hpp +++ b/include/continuable/support/asio.hpp @@ -34,16 +34,21 @@ #include #include +namespace cti { + +// Type used as an ASIO completion token to specify an asynchronous operation +// should return a continuable. +struct asio_token_t {}; + +// Special value for instance of `asio_token_t`. +constexpr asio_token_t asio_token{}; + +} // namespace cti + CTI_DETAIL_ASIO_NAMESPACE_BEGIN -// Class used to specify an asynchronous operation should return a continuable. -struct use_cti_t {}; - -// Special value for instance of `use_cti_t`. -constexpr use_cti_t use_cti{}; - template -class async_result { +class async_result { public: #if defined(CTI_DETAIL_ASIO_HAS_EXPLICIT_RET_TYPE_INTEGRATION) using return_type = typename cti::detail::asio::initiate_make_continuable< @@ -51,7 +56,7 @@ public: #endif template - static auto initiate(Initiation initiation, use_cti_t, Args... args) { + static auto initiate(Initiation initiation, cti::asio_token_t, Args... args) { return cti::detail::asio::initiate_make_continuable{}( [initiation = std::move(initiation), init_args =