Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,29 @@ stdexec should follow.
the `include/exec` directory, export them with
`STDEXEC_MODULE_EXPORT_AUTHORING`.

* The first non-comment, non-blank line in a test file should be
`#include <catch2/catch_all.hpp>` so as not to break the modules build.
If compile-time behavior needs to differ between modularized and
traditional builds, the next inclusion should be
`#include <stdexec/__detail/__config.hpp>` so that `STDEXEC_USE_MODULES()`
is defined and can be checked.
* In tests, the include order should be:
```c++
/* Copyright... */

// Catch2 must come before any potential import statements
#include <catch2/catch_all.hpp>

// Pull in all the macros in __config.hpp and either include all of
// stdexec's headers, or import stdexec, as appropriate
#include <stdexec/execution.hpp>

// other non-std headers, like anything in <exec/...> or in the test
// utility library
#include <exec/function.hpp>
#include <test_common/receivers.hpp>

// if the test has direct dependencies on std, the declarations thereof
// must come last, either as import std, or the usual includes. This has
// to come last because current compilers support including std headers
// *before* import std, but not *after*.
#if STDEXEC_USE_MODULES()
import std;
#else
# include <algorithm>
#endif
```
17 changes: 12 additions & 5 deletions include/exec/any_sender_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@
*/
#pragma once

#include "../stdexec/__detail/__any.hpp"
#include "../stdexec/__detail/__concepts.hpp"
#include "../stdexec/__detail/__receiver_ref.hpp"
#include "../stdexec/__detail/__receivers.hpp"
#include "../stdexec/__detail/__config.hpp"

#include "../stdexec/__detail/__receiver_ref.hpp"
#include "env.hpp"

#include <utility>
#if STDEXEC_USE_MODULES()
import std;
import stdexec;
#else
# include "../stdexec/__detail/__any.hpp"
# include "../stdexec/__detail/__concepts.hpp"
# include "../stdexec/__detail/__receivers.hpp"

# include <utility>
#endif

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_GNU("-Woverloaded-virtual")
Expand Down
10 changes: 8 additions & 2 deletions include/exec/asio/as_default_on.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@

#include <exec/asio/asio_config.hpp>

#include "../../stdexec/__detail/__config.hpp"

#include "executor_with_default.hpp"

#include <type_traits>
#include <utility>
#if STDEXEC_USE_MODULES()
import std;
#else
# include <type_traits>
# include <utility>
#endif

namespace experimental::execution::asio
{
Expand Down
46 changes: 27 additions & 19 deletions include/exec/asio/completion_token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,33 @@

#include <exec/asio/asio_config.hpp>

#include "../../stdexec/__detail/__execution_fwd.hpp"

#include "../../stdexec/__detail/__completion_signatures_of.hpp"
#include "../../stdexec/__detail/__env.hpp"
#include "../../stdexec/__detail/__queries.hpp"
#include "../../stdexec/__detail/__receivers.hpp"
#include "../../stdexec/__detail/__type_traits.hpp"
#include "../../stdexec/stop_token.hpp"
#include "as_default_on.hpp"

#include <concepts>
#include <exception>
#include <functional>
#include <mutex>
#include <optional>
#include <tuple>
#include <type_traits>
#include <utility>
#include <version>
#include "../../stdexec/__detail/__config.hpp"

# include "as_default_on.hpp"

#if STDEXEC_USE_MODULES()
import std;
import stdexec;
#else
# include "../../stdexec/__detail/__execution_fwd.hpp"

# include "../../stdexec/__detail/__completion_signatures_of.hpp"
# include "../../stdexec/__detail/__env.hpp"
# include "../../stdexec/__detail/__queries.hpp"
# include "../../stdexec/__detail/__receivers.hpp"
# include "../../stdexec/__detail/__type_traits.hpp"
# include "../../stdexec/stop_token.hpp"

# include <concepts>
# include <exception>
# include <functional>
# include <mutex>
# include <optional>
# include <tuple>
# include <type_traits>
# include <utility>
# include <version>
#endif

namespace experimental::execution::asio
{
Expand Down
8 changes: 6 additions & 2 deletions include/exec/asio/noexcept_boost_throw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@
# include <boost/asio/thread_pool.hpp>
# include <boost/throw_exception.hpp>

# include <cstdlib>
# include <exception>
# if STDEXEC_USE_MODULES()
import std;
# else
# include <cstdlib>
# include <exception>
# endif

namespace boost
{
Expand Down
33 changes: 20 additions & 13 deletions include/exec/asio/use_sender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,29 @@

#include <exec/asio/asio_config.hpp>

#include "../../stdexec/__detail/__execution_fwd.hpp"

#include "../../stdexec/__detail/__completion_signatures_of.hpp"
#include "../../stdexec/__detail/__receivers.hpp"
#include "../../stdexec/__detail/__senders.hpp"
#include "../../stdexec/__detail/__transform_completion_signatures.hpp"
#include "../../stdexec/__detail/__type_traits.hpp"
#include "../../stdexec/__detail/__config.hpp"

#include "as_default_on.hpp"
#include "completion_token.hpp"

#include <concepts>
#include <exception>
#include <system_error>
#include <type_traits>
#include <utility>
#if STDEXEC_USE_MODULES()
import std;
import stdexec;
#else
# include "../../stdexec/__detail/__execution_fwd.hpp"

# include "../../stdexec/__detail/__completion_signatures_of.hpp"
# include "../../stdexec/__detail/__receivers.hpp"
# include "../../stdexec/__detail/__senders.hpp"
# include "../../stdexec/__detail/__transform_completion_signatures.hpp"
# include "../../stdexec/__detail/__type_traits.hpp"

# include <concepts>
# include <exception>
# include <system_error>
# include <type_traits>
# include <utility>
#endif

namespace experimental::execution::asio
{
Expand Down Expand Up @@ -71,7 +78,7 @@ namespace experimental::execution::asio
: r_(static_cast<T&&>(t))
{}

using receiver_concept = ::STDEXEC::receiver_t;
using receiver_concept = ::STDEXEC::receiver_tag;

constexpr void set_stopped() && noexcept
requires ::STDEXEC::receiver_of<
Expand Down
4 changes: 2 additions & 2 deletions include/exec/async_scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace experimental::execution

template <__decays_to<__when_empty_sender> _Self, class... _Env>
static consteval auto get_completion_signatures()
-> __completion_signatures_of_t<__copy_cvref_t<_Self, _Constrained>, __env_t<_Env>...>
-> completion_signatures_of_t<__copy_cvref_t<_Self, _Constrained>, __env_t<_Env>...>
{
return {};
}
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace experimental::execution

template <__decays_to<__nest_sender> _Self, class... _Env>
static consteval auto get_completion_signatures()
-> __completion_signatures_of_t<__copy_cvref_t<_Self, _Constrained>, __env_t<_Env>...>
-> completion_signatures_of_t<__copy_cvref_t<_Self, _Constrained>, __env_t<_Env>...>
{
return {};
}
Expand Down
10 changes: 8 additions & 2 deletions include/exec/detail/basic_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@
*/
#pragma once

#include "../../stdexec/__detail/__basic_sender.hpp"
#include "../../stdexec/__detail/__config.hpp"
#include "../../stdexec/__detail/__meta.hpp"

#if STDEXEC_USE_MODULES()
import stdexec;
#else
# include "../../stdexec/__detail/__basic_sender.hpp"
# include "../../stdexec/__detail/__meta.hpp"
#endif

#include "../../stdexec/__detail/__basic_sender_macros.hpp"
#include "../sequence_senders.hpp"

namespace experimental::execution
Expand Down
10 changes: 8 additions & 2 deletions include/exec/env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
*/
#pragma once

#include "../stdexec/execution.hpp"
#include "../stdexec/__detail/__config.hpp"

#if STDEXEC_USE_MODULES()
import stdexec;
#else
# include "../stdexec/execution.hpp"
#endif

STDEXEC_PRAGMA_PUSH()
STDEXEC_PRAGMA_IGNORE_EDG(1302)
Expand Down Expand Up @@ -229,7 +235,7 @@ namespace experimental::execution

template <__decays_to<__sender> _Self, class... _Env>
static consteval auto get_completion_signatures()
-> __completion_signatures_of_t<__copy_cvref_t<_Self, _Sender>, _Env...>
-> completion_signatures_of_t<__copy_cvref_t<_Self, _Sender>, _Env...>
{
return {};
}
Expand Down
8 changes: 7 additions & 1 deletion include/exec/sender_for.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
*/
#pragma once

#include "../stdexec/__detail/__sender_introspection.hpp"
#include "../stdexec/__detail/__config.hpp"

#if STDEXEC_USE_MODULES()
import stdexec;
#else
# include "../stdexec/__detail/__sender_introspection.hpp"
#endif

namespace experimental::execution
{
Expand Down
30 changes: 18 additions & 12 deletions include/exec/sequence/iterate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,31 @@

#include "../../stdexec/__detail/__config.hpp"

#include "../../stdexec/__detail/__concepts.hpp"
#include "../../stdexec/__detail/__connect.hpp"
#include "../../stdexec/__detail/__env.hpp"
#include "../../stdexec/__detail/__execution_fwd.hpp"
#include "../../stdexec/__detail/__operation_states.hpp"
#include "../../stdexec/__detail/__optional.hpp"
#include "../../stdexec/__detail/__receivers.hpp"
#include "../../stdexec/__detail/__schedulers.hpp"
#include "../../stdexec/__detail/__sender_concepts.hpp"
#if STDEXEC_USE_MODULES()
import std;
import stdexec;
#else
# include "../../stdexec/__detail/__execution_fwd.hpp"

# include "../../stdexec/__detail/__concepts.hpp"
# include "../../stdexec/__detail/__connect.hpp"
# include "../../stdexec/__detail/__env.hpp"
# include "../../stdexec/__detail/__operation_states.hpp"
# include "../../stdexec/__detail/__optional.hpp"
# include "../../stdexec/__detail/__receivers.hpp"
# include "../../stdexec/__detail/__schedulers.hpp"
# include "../../stdexec/__detail/__sender_concepts.hpp"

# include <exception>
# include <ranges>
#endif

#include "../detail/basic_sequence.hpp"
#include "../sender_for.hpp"
#include "../sequence.hpp"
#include "../sequence_senders.hpp"
#include "../trampoline_scheduler.hpp"

#include <exception>
#include <ranges>

namespace experimental::execution
{
namespace __iterate
Expand Down
43 changes: 25 additions & 18 deletions include/exec/sequence_senders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,31 @@
*/
#pragma once

#include "../stdexec/__detail/__execution_fwd.hpp"

#include "../stdexec/__detail/__completion_signatures.hpp"
#include "../stdexec/__detail/__concepts.hpp"
#include "../stdexec/__detail/__connect.hpp"
#include "../stdexec/__detail/__debug.hpp"
#include "../stdexec/__detail/__diagnostics.hpp"
#include "../stdexec/__detail/__env.hpp"
#include "../stdexec/__detail/__just.hpp"
#include "../stdexec/__detail/__meta.hpp"
#include "../stdexec/__detail/__receivers.hpp"
#include "../stdexec/__detail/__senders.hpp"
#include "../stdexec/__detail/__stop_token.hpp"
#include "../stdexec/__detail/__tag_invoke.hpp"
#include "../stdexec/__detail/__transform_sender.hpp"
#include "../stdexec/__detail/__type_traits.hpp"
#include "../stdexec/__detail/__utility.hpp"
#include "../stdexec/stop_token.hpp"
#include "../stdexec/__detail/__config.hpp"

#if STDEXEC_USE_MODULES()
import stdexec;
# include "../stdexec/__detail/__diagnostic_macros.hpp"
#else
# include "../stdexec/__detail/__execution_fwd.hpp"

# include "../stdexec/__detail/__completion_signatures.hpp"
# include "../stdexec/__detail/__concepts.hpp"
# include "../stdexec/__detail/__connect.hpp"
# include "../stdexec/__detail/__debug.hpp"
# include "../stdexec/__detail/__diagnostics.hpp"
# include "../stdexec/__detail/__env.hpp"
# include "../stdexec/__detail/__just.hpp"
# include "../stdexec/__detail/__meta.hpp"
# include "../stdexec/__detail/__receivers.hpp"
# include "../stdexec/__detail/__senders.hpp"
# include "../stdexec/__detail/__stop_token.hpp"
# include "../stdexec/__detail/__tag_invoke.hpp"
# include "../stdexec/__detail/__transform_sender.hpp"
# include "../stdexec/__detail/__type_traits.hpp"
# include "../stdexec/__detail/__utility.hpp"
# include "../stdexec/stop_token.hpp"
#endif

#include "completion_signatures.hpp"

Expand Down
Loading
Loading