/usr/include/boost/asio/execution
Edit: /usr/include/boost/asio/execution/sender.hpp (8539B)
//
// 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 BOOST_ASIO_EXECUTION_SENDER_HPP
#define BOOST_ASIO_EXECUTION_SENDER_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include
#include
#include
#include
#include
#include
#include
#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) \
&& defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \
&& defined(BOOST_ASIO_HAS_DECLTYPE) \
&& !defined(BOOST_ASIO_MSVC) || (_MSC_VER >= 1910)
# define BOOST_ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT 1
#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
// && defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
// && defined(BOOST_ASIO_HAS_DECLTYPE)
// && !defined(BOOST_ASIO_MSVC) || (_MSC_VER >= 1910)
namespace boost {
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(BOOST_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 class Variant>
using error_types = typename S::template error_types;
BOOST_ASIO_STATIC_CONSTEXPR(bool, sends_done = S::sends_done);
};
#endif // defined(BOOST_ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
template
struct sender_traits_base::value
&& detail::is_executor_of_impl >::value
>::type>
{
#if defined(BOOST_ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT) \
&& defined(BOOST_ASIO_HAS_STD_EXCEPTION_PTR)
template <
template class Tuple,
template class Variant>
using value_types = Variant>;
template class Variant>
using error_types = Variant;
BOOST_ASIO_STATIC_CONSTEXPR(bool, sends_done = true);
#endif // defined(BOOST_ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
// && defined(BOOST_ASIO_HAS_STD_EXCEPTION_PTR)
};
} // namespace detail
/// Base class used for tagging senders.
#if defined(GENERATING_DOCUMENTATION)
typedef unspecified sender_base;
#else // defined(GENERATING_DOCUMENTATION)
typedef detail::sender_base_ns::sender_base sender_base;
#endif // defined(GENERATING_DOCUMENTATION)
/// Traits for senders.
template
struct sender_traits
#if !defined(GENERATING_DOCUMENTATION)
: detail::sender_traits_base
#endif // !defined(GENERATING_DOCUMENTATION)
{
};
namespace detail {
template
struct has_sender_traits : true_type
{
};
template
struct has_sender_traits::asio_execution_sender_traits_base_is_unspecialised,
void
>::value
>::type> : false_type
{
};
} // namespace detail
/// The is_sender trait detects whether a type T satisfies the
/// execution::sender concept.
/**
* Class template @c is_sender is a type trait that is derived from @c
* true_type if the type @c T meets the concept definition for a sender,
* otherwise @c false_type.
*/
template
struct is_sender :
#if defined(GENERATING_DOCUMENTATION)
integral_constant
#else // defined(GENERATING_DOCUMENTATION)
conditional<
detail::has_sender_traits::type>::value,
is_move_constructible::type>,
false_type
>::type
#endif // defined(GENERATING_DOCUMENTATION)
{
};
#if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
template
BOOST_ASIO_CONSTEXPR const bool is_sender_v = is_sender::value;
#endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
#if defined(BOOST_ASIO_HAS_CONCEPTS)
template
BOOST_ASIO_CONCEPT sender = is_sender::value;
#define BOOST_ASIO_EXECUTION_SENDER ::boost::asio::execution::sender
#else // defined(BOOST_ASIO_HAS_CONCEPTS)
#define BOOST_ASIO_EXECUTION_SENDER typename
#endif // defined(BOOST_ASIO_HAS_CONCEPTS)
template
struct can_connect;
/// The is_sender_to trait detects whether a type T satisfies the
/// execution::sender_to concept for some receiver.
/**
* Class template @c is_sender_to is a type trait that is derived from @c
* true_type if the type @c T meets the concept definition for a sender
* for some receiver type R, otherwise @c false.
*/
template
struct is_sender_to :
#if defined(GENERATING_DOCUMENTATION)
integral_constant
#else // defined(GENERATING_DOCUMENTATION)
integral_constant::value
&& is_receiver::value
&& can_connect::value
>
#endif // defined(GENERATING_DOCUMENTATION)
{
};
#if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
template
BOOST_ASIO_CONSTEXPR const bool is_sender_to_v =
is_sender_to::value;
#endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
#if defined(BOOST_ASIO_HAS_CONCEPTS)
template
BOOST_ASIO_CONCEPT sender_to = is_sender_to::value;
#define BOOST_ASIO_EXECUTION_SENDER_TO(r) \
::boost::asio::execution::sender_to
#else // defined(BOOST_ASIO_HAS_CONCEPTS)
#define BOOST_ASIO_EXECUTION_SENDER_TO(r) typename
#endif // defined(BOOST_ASIO_HAS_CONCEPTS)
/// The is_typed_sender trait detects whether a type T satisfies the
/// execution::typed_sender concept.
/**
* Class template @c is_typed_sender is a type trait that is derived from @c
* true_type if the type @c T meets the concept definition for a typed sender,
* otherwise @c false.
*/
template
struct is_typed_sender :
#if defined(GENERATING_DOCUMENTATION)
integral_constant
#else // defined(GENERATING_DOCUMENTATION)
integral_constant::value
&& detail::has_sender_types<
sender_traits::type> >::value
>
#endif // defined(GENERATING_DOCUMENTATION)
{
};
#if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
template
BOOST_ASIO_CONSTEXPR const bool is_typed_sender_v = is_typed_sender::value;
#endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
#if defined(BOOST_ASIO_HAS_CONCEPTS)
template
BOOST_ASIO_CONCEPT typed_sender = is_typed_sender::value;
#define BOOST_ASIO_EXECUTION_TYPED_SENDER \
::boost::asio::execution::typed_sender
#else // defined(BOOST_ASIO_HAS_CONCEPTS)
#define BOOST_ASIO_EXECUTION_TYPED_SENDER typename
#endif // defined(BOOST_ASIO_HAS_CONCEPTS)
} // namespace execution
} // namespace asio
} // namespace boost
#include
#include
#endif // BOOST_ASIO_EXECUTION_SENDER_HPP