Skip to content

Commit

Permalink
Merge pull request NVIDIA#1225 from NVIDIA/nodiscard-ensure-started
Browse files Browse the repository at this point in the history
Mark the return of `ensure_started` as `[[nodiscard]]`
  • Loading branch information
ericniebler authored Jan 29, 2024
2 parents 9075f8f + 160bebd commit 6a6b7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/stdexec/execution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3277,7 +3277,7 @@ namespace stdexec {
struct ensure_started_t {
template <sender _Sender, class _Env = empty_env>
requires sender_in<_Sender, _Env> && __decay_copyable<env_of_t<_Sender>>
auto operator()(_Sender&& __sndr, _Env&& __env = {}) const {
[[nodiscard]] auto operator()(_Sender&& __sndr, _Env&& __env = {}) const {
if constexpr (sender_expr_for<_Sender, __ensure_started_t>) {
return (_Sender&&) __sndr;
} else {
Expand Down

0 comments on commit 6a6b7ae

Please sign in to comment.