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
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
{ "stdlibs": ["libstdc++"],
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.Coverage", "Debug.Werror",
"Debug.Werror",
"Debug.Dynamic", "Release.Dynamic"
]
}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ option(
option(
BEMAN_NET_BUILD_EXAMPLES
"Enable building examples. Default: ON. Values: { ON, OFF }."
OFF # TODO(CK): ${PROJECT_IS_TOP_LEVEL}
OFF #-dk:TODO ${PROJECT_IS_TOP_LEVEL}
)

if(LINUX)
Expand Down
10 changes: 6 additions & 4 deletions examples/demo_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,19 @@ inline auto demo::into_error_t::operator()(Sender&& sndr, Fun&& fun) const

template <typename Fun>
inline auto demo::into_error_t::operator()(Fun&& fun) const {
return ex::detail::sender_adaptor{*this, fun};
return ex::detail::make_sender_adaptor(*this, fun);
}

// ----------------------------------------------------------------------------

#if 202202L <= __cpp_lib_expected
inline auto demo::into_expected_t::operator()() const { return beman::net::detail::ex::detail::sender_adaptor{*this}; }
inline auto demo::into_expected_t::operator()() const {
return beman::net::detail::ex::detail::make_sender_adaptor(*this);
}
template <beman::net::detail::ex::sender Sender>
inline auto demo::into_expected_t::operator()(Sender&& s) const {
using value_type =
ex::value_types_of_t<Sender, ex::empty_env, demo::detail::decayed_tuple_or_single_t, std::type_identity_t>;
ex::value_types_of_t<Sender, ex::env<>, demo::detail::decayed_tuple_or_single_t, std::type_identity_t>;
using error_type = ex::error_types_of_t<Sender>;
return ::std::forward<Sender>(s) | beman::net::detail::ex::then([]<typename... A>(A&&... a) noexcept {
return std::expected<value_type, error_type>(::std::in_place_t{}, ::std::forward<A>(a)...);
Expand Down Expand Up @@ -355,7 +357,7 @@ struct demo::when_any_t::sender {
::beman::execution::detail::product_type<::std::remove_cvref_t<Sender>...> sender;
using sender_concept = ex::sender_t;
using completion_signatures = ::beman::execution::detail::meta::unique<::beman::execution::detail::meta::combine<
decltype(ex::get_completion_signatures(::std::declval<Sender&&>(), ex::empty_env{}))...>>;
decltype(ex::get_completion_signatures(::std::declval<Sender&&>(), ex::env<>{}))...>>;

template <demo::ex::receiver Receiver>
auto connect(Receiver&& receiver) && -> state<
Expand Down
5 changes: 3 additions & 2 deletions include/beman/net/detail/execution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace beman::net::detail::ex::detail {
using ::beman::execution::detail::forward_like;
using ::beman::execution::detail::make_sender_adaptor;
using ::beman::execution::detail::sender_adaptor;
using ::beman::execution::detail::type_list;
using ::beman::execution::detail::variant_or_empty;
Expand All @@ -23,7 +24,7 @@ namespace beman::net::detail::ex {
using ::beman::execution::completion_signatures;
using ::beman::execution::detail::decayed_tuple;

using ::beman::execution::empty_env;
using ::beman::execution::env;
using ::beman::execution::env_of_t;
using ::beman::execution::error_types_of_t;
using ::beman::execution::get_env;
Expand Down Expand Up @@ -71,7 +72,7 @@ using ::beman::execution::sync_wait;
using ::beman::execution::then;
using ::beman::execution::upon_error;
using ::beman::execution::upon_stopped;
using ::beman::execution::detail::write_env;
using ::beman::execution::write_env;
} // namespace beman::net::detail::ex

// ----------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions include/beman/net/detail/scope.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class beman::net::detail::scope {
public:
token(scope* s) : _scope(s), _counting_token(s->_counting_scope.get_token()) {}

auto try_associate() noexcept -> bool { return this->_counting_token.try_associate(); }
auto disassociate() noexcept -> void { this->_counting_token.disassociate(); }
auto try_associate() const noexcept -> auto { return this->_counting_token.try_associate(); }
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type of try_associate() has been changed from -> bool to -> auto. While this change may be necessary to match the updated execution library API, using auto as a trailing return type makes the interface less explicit and harder to understand. Consider using a concrete return type or at least decltype(auto) to make it clear whether the return value is by value or by reference.

Suggested change
auto try_associate() const noexcept -> auto { return this->_counting_token.try_associate(); }
auto try_associate() const noexcept -> decltype(auto) { return this->_counting_token.try_associate(); }

Copilot uses AI. Check for mistakes.
template <beman::execution::sender Sender, typename... Env>
auto wrap(Sender&& sndr, const Env&... ev) const noexcept -> beman::execution::sender auto {
return this->_counting_token.wrap(
Expand Down