kokkos-execution 0.0.1
Loading...
Searching...
No Matches
exit_scope_sender.hpp
Go to the documentation of this file.
1// NOLINTBEGIN
2/*
3 * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4 * Copyright (c) 2025 Robert Leahy. All rights reserved.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 * Licensed under the Apache License, Version 2.0 with LLVM Exceptions (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * https://llvm.org/LICENSE.txt
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#pragma once
21
22#include <type_traits>
23
24#include "stdexec/execution.hpp"
25
27
28template <typename Sender>
29concept exit_scope_sender = ::STDEXEC::sender<Sender>
30 && std::is_nothrow_constructible_v<std::remove_cvref_t<Sender>, Sender>
31 && std::is_nothrow_move_constructible_v<std::remove_cvref_t<Sender>>;
32
33template <typename Sender, typename Env>
34concept exit_scope_sender_in = exit_scope_sender<Sender> && ::STDEXEC::sender_in<Sender, Env>
35 && ::STDEXEC::__nothrow_connectable<Sender, ::STDEXEC::__receiver_archetype<Env>>
36 && std::is_same_v<
37 ::STDEXEC::completion_signatures<::STDEXEC::set_value_t()>,
38 ::STDEXEC::completion_signatures_of_t<Sender, Env>
39 >;
40
41} // namespace experimental::execution
42
43// NOLINTEND