async: add is_sender type-aliases
The latest version of stdexec requires all sender types to include a
type alias `is_sender` (which their examples all set to `void`) or
else a unique overload of a stdexec template. Add the type alias to
all of our defined sender types.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2229905703b0f9c360d0fa5f1ba6acffd1f22a02
diff --git a/include/sdbusplus/async/callback.hpp b/include/sdbusplus/async/callback.hpp
index 61596c4..61efab8 100644
--- a/include/sdbusplus/async/callback.hpp
+++ b/include/sdbusplus/async/callback.hpp
@@ -132,6 +132,8 @@
template <takes_msg_handler Init>
struct callback_sender
{
+ using is_sender = void;
+
explicit callback_sender(Init init) : init(std::move(init)){};
// This Sender yields a message_t.
diff --git a/include/sdbusplus/async/match.hpp b/include/sdbusplus/async/match.hpp
index b193a50..40ecbe5 100644
--- a/include/sdbusplus/async/match.hpp
+++ b/include/sdbusplus/async/match.hpp
@@ -122,6 +122,8 @@
// match Sender implementation.
struct match_sender
{
+ using is_sender = void;
+
match_sender() = delete;
explicit match_sender(match& m) noexcept : m(m){};
diff --git a/include/sdbusplus/async/timer.hpp b/include/sdbusplus/async/timer.hpp
index de54b97..699265a 100644
--- a/include/sdbusplus/async/timer.hpp
+++ b/include/sdbusplus/async/timer.hpp
@@ -78,6 +78,8 @@
*/
struct sleep_sender : public details::context_friend
{
+ using is_sender = void;
+
sleep_sender() = delete;
sleep_sender(context& ctx, event_t::time_resolution time) noexcept :
diff --git a/src/async/context.cpp b/src/async/context.cpp
index c8f7e5f..5a5bc8c 100644
--- a/src/async/context.cpp
+++ b/src/async/context.cpp
@@ -84,6 +84,8 @@
/* The sender for the wait/process event. */
struct wait_process_sender
{
+ using is_sender = void;
+
explicit wait_process_sender(context& ctx) : ctx(ctx) {}
friend auto tag_invoke(execution::get_completion_signatures_t,