Skip to content

Commit 0cb0150

Browse files
authored
fixed the return type of getting an element from an rvalue product_type (#107)
1 parent 5b44c98 commit 0cb0150

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/beman/execution26/detail/product_type.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct product_type_base<::std::index_sequence<I...>, T...>
2929
return self.value;
3030
}
3131
template <::std::size_t J, typename S>
32-
static auto element_get(::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S {
32+
static auto element_get(::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S&& {
3333
return ::std::move(self.value);
3434
}
3535
template <::std::size_t J, typename S>

tests/beman/execution26/exec-snd-expos.test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,11 @@ auto test_write_env() -> void {
12531253
template <typename... T>
12541254
struct child_sender : test_detail::product_type<T...> {};
12551255
auto test_child_type() -> void {
1256-
static_assert(std::same_as<int, test_detail::child_type<child_sender<bool, char, int, double>>>);
1257-
static_assert(std::same_as<int&, test_detail::child_type<child_sender<bool, char, int, double>>&>);
1258-
static_assert(std::same_as<const int&, const test_detail::child_type<child_sender<bool, char, int, double>>&>);
1259-
static_assert(std::same_as<int, test_detail::child_type<child_sender<bool, char, int, double>, 0>>);
1260-
static_assert(std::same_as<double, test_detail::child_type<child_sender<bool, char, int, double>, 1>>);
1256+
static_assert(std::same_as<int&&, test_detail::child_type<child_sender<bool, char, int, double>>>);
1257+
static_assert(std::same_as<int&, test_detail::child_type<child_sender<bool, char, int, double>&>>);
1258+
static_assert(std::same_as<const int&, test_detail::child_type<const child_sender<bool, char, int, double>&>>);
1259+
static_assert(std::same_as<int&&, test_detail::child_type<child_sender<bool, char, int, double>, 0>>);
1260+
static_assert(std::same_as<double&&, test_detail::child_type<child_sender<bool, char, int, double>, 1>>);
12611261
}
12621262
} // namespace
12631263

0 commit comments

Comments
 (0)