// // execution/sender.hpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 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 ASIO_EXECUTION_SENDER_HPP #define ASIO_EXECUTION_SENDER_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" #include "asio/detail/type_traits.hpp" #include "asio/execution/detail/as_invocable.hpp" #include "asio/execution/detail/void_receiver.hpp" #include "asio/execution/executor.hpp" #include "asio/execution/receiver.hpp" #include "asio/detail/push_options.hpp" #if defined(ASIO_HAS_ALIAS_TEMPLATES) \ && defined(ASIO_HAS_VARIADIC_TEMPLATES) \ && defined(ASIO_HAS_DECLTYPE) \ && !defined(ASIO_MSVC) || (_MSC_VER >= 1910) # define ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT 1 #endif // defined(ASIO_HAS_ALIAS_TEMPLATES) // && defined(ASIO_HAS_VARIADIC_TEMPLATES) // && defined(ASIO_HAS_DECLTYPE) // && !defined(ASIO_MSVC) || (_MSC_VER >= 1910) namespace asio { namespace execution { namespace detail { namespace sender_base_ns { struct sender_base {}; } template struct sender_traits_base { typedef void asio_execution_sender_traits_base_is_unspecialised; }; template struct sender_traits_base::value >::type> { }; template struct has_sender_types : false_type { }; #if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT) template < template < template class Tuple, template class Variant > class> struct has_value_types { typedef void type; }; template < template < template class Variant > class> struct has_error_types { typedef void type; }; template struct has_sender_types::type, typename has_error_types::type, typename conditional::type> : true_type { }; template struct sender_traits_base::value >::type> { template < template class Tuple, template class Variant> using value_types = typename S::template value_types; template