12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #ifndef BOOST_ASIO_EXECUTION_SCHEDULER_HPP
- #define BOOST_ASIO_EXECUTION_SCHEDULER_HPP
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- # pragma once
- #endif
- #include <boost/asio/detail/config.hpp>
- #include <boost/asio/detail/type_traits.hpp>
- #include <boost/asio/execution/schedule.hpp>
- #include <boost/asio/traits/equality_comparable.hpp>
- #include <boost/asio/detail/push_options.hpp>
- namespace boost {
- namespace asio {
- namespace execution {
- namespace detail {
- template <typename T>
- struct is_scheduler_base :
- integral_constant<bool,
- is_copy_constructible<typename remove_cvref<T>::type>::value
- && traits::equality_comparable<typename remove_cvref<T>::type>::is_valid
- >
- {
- };
- }
- template <typename T>
- struct is_scheduler :
- #if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
- #else
- conditional<
- can_schedule<T>::value,
- detail::is_scheduler_base<T>,
- false_type
- >::type
- #endif
- {
- };
- #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
- template <typename T>
- BOOST_ASIO_CONSTEXPR const bool is_scheduler_v = is_scheduler<T>::value;
- #endif
- #if defined(BOOST_ASIO_HAS_CONCEPTS)
- template <typename T>
- BOOST_ASIO_CONCEPT scheduler = is_scheduler<T>::value;
- #define BOOST_ASIO_EXECUTION_SCHEDULER ::boost::asio::execution::scheduler
- #else
- #define BOOST_ASIO_EXECUTION_SCHEDULER typename
- #endif
- }
- }
- }
- #include <boost/asio/detail/pop_options.hpp>
- #endif
|