Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the return type of getting an element from an rvalue product_type #107

Merged
merged 1 commit into from
Dec 22, 2024
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 include/beman/execution26/detail/product_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct product_type_base<::std::index_sequence<I...>, T...>
return self.value;
}
template <::std::size_t J, typename S>
static auto element_get(::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S {
static auto element_get(::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S&& {
return ::std::move(self.value);
}
template <::std::size_t J, typename S>
Expand Down
10 changes: 5 additions & 5 deletions tests/beman/execution26/exec-snd-expos.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,11 +1253,11 @@ auto test_write_env() -> void {
template <typename... T>
struct child_sender : test_detail::product_type<T...> {};
auto test_child_type() -> void {
static_assert(std::same_as<int, test_detail::child_type<child_sender<bool, char, int, double>>>);
static_assert(std::same_as<int&, test_detail::child_type<child_sender<bool, char, int, double>>&>);
static_assert(std::same_as<const int&, const test_detail::child_type<child_sender<bool, char, int, double>>&>);
static_assert(std::same_as<int, test_detail::child_type<child_sender<bool, char, int, double>, 0>>);
static_assert(std::same_as<double, test_detail::child_type<child_sender<bool, char, int, double>, 1>>);
static_assert(std::same_as<int&&, test_detail::child_type<child_sender<bool, char, int, double>>>);
static_assert(std::same_as<int&, test_detail::child_type<child_sender<bool, char, int, double>&>>);
static_assert(std::same_as<const int&, test_detail::child_type<const child_sender<bool, char, int, double>&>>);
static_assert(std::same_as<int&&, test_detail::child_type<child_sender<bool, char, int, double>, 0>>);
static_assert(std::same_as<double&&, test_detail::child_type<child_sender<bool, char, int, double>, 1>>);
}
} // namespace

Expand Down
Loading