14template <
typename T,
typename Callback>
15concept HasStopCallback =
16 requires {
typename T::template callback_type<Callback>; };
18template <
typename T,
typename Callback>
struct stop_callback_traits;
19template <
typename T,
typename Callback>
20 requires HasStopCallback<T, Callback>
21struct stop_callback_traits<T, Callback> {
22 using type =
typename T::template callback_type<Callback>;
24template <
typename T,
typename Callback>
25 requires(!HasStopCallback<T, Callback> &&
26 std::is_same_v<T, std::stop_token>)
27struct stop_callback_traits<T, Callback> {
28 using type = std::stop_callback<Callback>;
31template <
typename T,
typename Callback>
32using stop_callback_t =
typename stop_callback_traits<T, Callback>::type;
34template <
typename Sender,
typename Receiver>
35using operation_state_t =
decltype(std::declval<Sender &&>().connect_impl(
36 std::declval<Receiver &&>()));
38template <
typename Receiver>
40 std::remove_cvref_t<decltype(std::declval<Receiver &>().get_stop_token())>;
The main namespace for the Condy library.