Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Examples of execution contexts:

.. code-block:: cpp
auto sched = exec::get_parallel_scheduler(); // Obtain the default system scheduler
auto sndr = stdexec::schedule(sched); // Create a sender from the scheduler
auto sched = stdexec::get_parallel_scheduler(); // Obtain the default system scheduler
auto sndr = stdexec::schedule(sched); // Create a sender from the scheduler
The sender you get back from ``stdexec::schedule`` is a factory for operations that,
when started, will immediately call ``set_value()`` on the receiver the operation was
Expand Down
32 changes: 18 additions & 14 deletions include/exec/detail/system_context_replaceability_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,23 @@

namespace experimental::execution
{
namespace [[deprecated("Use the STDEXEC::parallel_scheduler_replacement namespace "
namespace [[deprecated("Use the " STDEXEC_PP_STRINGIZE(STDEXEC) //
"::parallel_scheduler_replacement namespace "
"instead.")]] system_context_replaceability
{
using STDEXEC::parallel_scheduler_replacement::__parallel_scheduler_backend_factory_t;

/// Interface for the parallel scheduler backend.
using parallel_scheduler_backend //
[[deprecated("Use STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend "
"instead.")]] = //
using parallel_scheduler_backend //
[[deprecated("Use " STDEXEC_PP_STRINGIZE(STDEXEC) //
"::parallel_scheduler_replacement::parallel_scheduler_backend instead.")]] = //
STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend;

/// Get the backend for the parallel scheduler.
/// Users might replace this function.
[[deprecated("Use STDEXEC::parallel_scheduler_replacement::query_parallel_scheduler_backend "
"instead.")]]
[[deprecated("Use " STDEXEC_PP_STRINGIZE(STDEXEC) "::parallel_scheduler_replacement::query_"
"parallel_scheduler_backend "
"instead.")]]
inline auto query_parallel_scheduler_backend()
-> std::shared_ptr<STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend>
{
Expand All @@ -53,8 +55,9 @@ namespace experimental::execution
/// Set a factory for the parallel scheduler backend.
/// Can be used to replace the parallel scheduler at runtime.
/// Out of spec.
[[deprecated("Use STDEXEC::parallel_scheduler_replacement::set_parallel_scheduler_backend "
"instead.")]]
[[deprecated("Use " STDEXEC_PP_STRINGIZE(STDEXEC) "::parallel_scheduler_replacement::set_"
"parallel_scheduler_backend "
"instead.")]]
inline auto set_parallel_scheduler_backend(__parallel_scheduler_backend_factory_t __new_factory)
-> __parallel_scheduler_backend_factory_t
{
Expand All @@ -64,14 +67,15 @@ namespace experimental::execution

/// Interface for completing a sender operation. Backend will call frontend though this interface
/// for completing the `schedule` and `schedule_bulk` operations.
using receiver
[[deprecated("Use STDEXEC::parallel_scheduler_replacement::receiver_proxy "
"instead.")]] = STDEXEC::parallel_scheduler_replacement::receiver_proxy;
using receiver [[deprecated("Use " STDEXEC_PP_STRINGIZE(STDEXEC) //
"::parallel_scheduler_replacement::receiver_proxy instead.")]] = //
STDEXEC::parallel_scheduler_replacement::receiver_proxy;

/// Receiver for bulk scheduling operations.
using bulk_item_receiver [[deprecated(
"Use STDEXEC::parallel_scheduler_replacement::bulk_item_receiver_proxy "
"instead.")]] = STDEXEC::parallel_scheduler_replacement::bulk_item_receiver_proxy;
using bulk_item_receiver [[deprecated("Use " STDEXEC_PP_STRINGIZE(STDEXEC) //
"::parallel_scheduler_replacement::bulk_item_receiver_"
"proxy instead.")]] = //
STDEXEC::parallel_scheduler_replacement::bulk_item_receiver_proxy;
} // namespace system_context_replaceability
} // namespace experimental::execution

Expand Down
5 changes: 3 additions & 2 deletions include/exec/env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,10 @@ namespace experimental::execution

inline constexpr __read_with_default::__read_with_default_t read_with_default{};

[[deprecated("exec::write has been renamed to STDEXEC::write_env")]]
[[deprecated("exec::write has been renamed to " STDEXEC_PP_STRINGIZE(STDEXEC) "::write_env")]]
inline constexpr STDEXEC::__write_env_t write{};
[[deprecated("exec::write_env has been moved to the STDEXEC:: namespace")]]
[[deprecated("exec::write_env has been moved to the " STDEXEC_PP_STRINGIZE(STDEXEC) ":: "
"namespace")]]
inline constexpr STDEXEC::__write_env_t write_env{};

namespace __write_attrs
Expand Down
4 changes: 2 additions & 2 deletions include/exec/inline_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace experimental::execution
{
// A simple scheduler that executes its continuation inline, on the
// thread of the caller of start().
using inline_scheduler
[[deprecated("Use STDEXEC::inline_scheduler instead")]] = STDEXEC::inline_scheduler;
using inline_scheduler [[deprecated("Use " STDEXEC_PP_STRINGIZE(
STDEXEC) "::inline_scheduler instead")]] = STDEXEC::inline_scheduler;
} // namespace experimental::execution

namespace exec = experimental::execution;
4 changes: 2 additions & 2 deletions include/exec/just_from.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ namespace experimental::execution
using _completions = STDEXEC::__call_result_t<Fn, _probe_fn>;
static_assert(STDEXEC::__is_instance_of<_completions, STDEXEC::completion_signatures>,
"The function passed to just_from, just_error_from, and just_stopped_from "
"must return an "
"instance of a specialization of STDEXEC::completion_signatures<>.");
"must return an instance of a specialization of " STDEXEC_PP_STRINGIZE(
STDEXEC) "::completion_signatures<>.");
return _sndr<Fn>{
{{}, static_cast<Fn&&>(fn)}
};
Expand Down
5 changes: 3 additions & 2 deletions include/exec/on.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ namespace experimental::execution
{
/////////////////////////////////////////////////////////////////////////////
// A scoped version of [execution.senders.adaptors.on]
using on_t [[deprecated("on_t has been moved to the STDEXEC:: namespace")]] = STDEXEC::on_t;
using on_t [[deprecated(
"on_t has been moved to the " STDEXEC_PP_STRINGIZE(STDEXEC) ":: namespace")]] = STDEXEC::on_t;

[[deprecated("on has been moved to the STDEXEC:: namespace")]]
[[deprecated("on has been moved to the " STDEXEC_PP_STRINGIZE(STDEXEC) ":: namespace")]]
inline constexpr STDEXEC::on_t const & on = STDEXEC::on;
} // namespace experimental::execution

Expand Down
21 changes: 13 additions & 8 deletions include/exec/sequence_senders.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_template_function_params)
////////////////////////////////////////////////////////////////////////////////
#define STDEXEC_ERROR_SEQUENCE_SENDER_DEFINITION \
"A sequence sender must provide a `subscribe` member function that takes a receiver as an\n" \
"argument and returns an object whose type satisfies `STDEXEC::operation_state`,\n" \
"argument and returns an object whose type satisfies `" STDEXEC_PP_STRINGIZE(STDEXEC) \
"::operation_state`,\n" \
"as shown below:\n" \
"\n" \
" class MySequenceSender\n" \
" {\n" \
" public:\n" \
" using sender_concept = exec::sequence_sender_t;\n" \
" using item_types = exec::item_types<>;\n" \
" using completion_signatures = STDEXEC::completion_signatures<STDEXEC::set_value_t()>;\n" \
" using completion_signatures = " STDEXEC_PP_STRINGIZE(STDEXEC) "::completion_signatures<" \
STDEXEC_PP_STRINGIZE(STDEXEC) "::set_value_t()>;\n" \
"\n" \
" template <class Receiver>\n" \
" struct MyOpState\n" \
" {\n" \
" using operation_state_concept = STDEXEC::operation_state_tag;\n" \
" using operation_state_concept = " STDEXEC_PP_STRINGIZE(STDEXEC) "::operation_state_tag;\n"\
"\n" \
" void start() noexcept\n" \
" {\n" \
Expand All @@ -53,7 +55,7 @@ STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_template_function_params)
" Receiver rcvr_;\n" \
" };\n" \
"\n" \
" template <STDEXEC::receiver Receiver>\n" \
" template <" STDEXEC_PP_STRINGIZE(STDEXEC) "::receiver Receiver>\n" \
" auto subscribe(Receiver rcvr) -> MyOpState<Receiver>\n" \
" {\n" \
" return MyOpState<Receiver>{std::move(rcvr)};\n" \
Expand All @@ -71,7 +73,8 @@ STDEXEC_PRAGMA_IGNORE_EDG(not_used_in_template_function_params)
////////////////////////////////////////////////////////////////////////////////
#define STDEXEC_ERROR_SUBSCRIBE_DOES_NOT_RETURN_OPERATION_STATE \
"\n" \
"FAILURE: The subscribe customization did not return an `STDEXEC::operation_state`.\n" \
"FAILURE: The subscribe customization did not return an `" STDEXEC_PP_STRINGIZE(STDEXEC) \
"::operation_state`.\n" \
"\n" STDEXEC_ERROR_SEQUENCE_SENDER_DEFINITION

namespace experimental::execution
Expand Down Expand Up @@ -780,9 +783,11 @@ namespace experimental::execution

static_assert(sequence_sender<_Sequence>
|| has_sequence_item_types<_Sequence, env_of_t<_Receiver>>,
"The first argument to STDEXEC::subscribe must be a sequence sender");
"The first argument to " STDEXEC_PP_STRINGIZE(STDEXEC) "::subscribe must be "
"a sequence sender");
static_assert(receiver<_Receiver>,
"The second argument to STDEXEC::subscribe must be a receiver");
"The second argument to " STDEXEC_PP_STRINGIZE(STDEXEC) "::subscribe must be "
"a receiver");
#if STDEXEC_ENABLE_EXTRA_TYPE_CHECKING()
static_assert(__type_check_arguments<__tfx_seq_t, _Receiver>());
#endif
Expand Down Expand Up @@ -993,7 +998,7 @@ namespace experimental::execution
" template <class... _Env>\n" \
" auto get_item_types(_Env&&...) -> exec::item_types<\n" \
" // This sequence produces void items...\n" \
" STDEXEC::__call_result_t<STDEXEC::just_t>>\n" \
" " STDEXEC_PP_STRINGIZE(STDEXEC) "::__call_result_t<" STDEXEC_PP_STRINGIZE(STDEXEC) "::just_t>>\n" \
" {\n" \
" return {};\n" \
" }\n" \
Expand Down
4 changes: 3 additions & 1 deletion include/exec/windows/windows_thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,9 @@ namespace experimental::execution
using __win32::windows_thread_pool;

static_assert(STDEXEC::scheduler<decltype(windows_thread_pool{}.get_scheduler())>,
"windows_thread_pool::scheduler must model STDEXEC::scheduler");
"windows_thread_pool::scheduler must model " STDEXEC_PP_STRINGIZE(STDEXEC) "::"
"schedul"
"er");
} // namespace experimental::execution

namespace exec = experimental::execution;
Expand Down
8 changes: 4 additions & 4 deletions include/stdexec/__detail/__bulk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ namespace STDEXEC
}

template <sender _Sender, __std::integral _Shape, __std::copy_constructible _Fun>
[[deprecated("The bulk algorithm now requires an execution policy such as STDEXEC::par as an "
"argument.")]]
[[deprecated("The bulk algorithm now requires an execution policy such "
"as " STDEXEC_PP_STRINGIZE(STDEXEC) "::par as an argument.")]]
STDEXEC_ATTRIBUTE(host, device) auto
operator()(_Sender&& __sndr, _Shape __shape, _Fun __fun) const
{
Expand All @@ -215,8 +215,8 @@ namespace STDEXEC
}

template <__std::integral _Shape, __std::copy_constructible _Fun>
[[deprecated("The bulk algorithm now requires an execution policy such as STDEXEC::par as an "
"argument.")]]
[[deprecated("The bulk algorithm now requires an execution policy such "
"as " STDEXEC_PP_STRINGIZE(STDEXEC) "::par as an argument.")]]
STDEXEC_ATTRIBUTE(always_inline) auto operator()(_Shape __shape, _Fun __fun) const
{
return (*this)(par, static_cast<_Shape&&>(__shape), static_cast<_Fun&&>(__fun));
Expand Down
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__completion_behavior.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace STDEXEC
"The __get_completion_behavior query must be noexcept.");
static_assert(__std::convertible_to<__result_t, __completion_behavior::__behavior>,
"The __get_completion_behavior query must return one of the static member "
"variables in STDEXEC::__completion_behavior.");
"variables in " STDEXEC_PP_STRINGIZE(STDEXEC) "::__completion_behavior.");
return __result_t{};
}

Expand Down
3 changes: 2 additions & 1 deletion include/stdexec/__detail/__deprecations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ namespace STDEXEC
inline constexpr __execute_may_block_caller_t const & execute_may_block_caller =
__execute_may_block_caller;

using empty_env [[deprecated("STDEXEC::empty_env is now spelled STDEXEC::env<>")]] = env<>;
using empty_env [[deprecated(
"STDEXEC::empty_env is now spelled " STDEXEC_PP_STRINGIZE(STDEXEC) "::env<>")]] = env<>;

using dependent_completions [[deprecated("use dependent_sender_error instead of "
"dependent_completions")]] = dependent_sender_error;
Expand Down
Loading
Loading