From 563ab1b352674be2f51900cfd519fd7999bd0d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 22 Dec 2024 17:49:05 +0100 Subject: [PATCH] fixed the return type of getting an element from an rvalue product_type --- include/beman/execution26/detail/product_type.hpp | 2 +- tests/beman/execution26/exec-snd-expos.test.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/beman/execution26/detail/product_type.hpp b/include/beman/execution26/detail/product_type.hpp index 414acff1..8b1d9e49 100644 --- a/include/beman/execution26/detail/product_type.hpp +++ b/include/beman/execution26/detail/product_type.hpp @@ -29,7 +29,7 @@ struct product_type_base<::std::index_sequence, T...> return self.value; } template <::std::size_t J, typename S> - static auto element_get(::beman::execution26::detail::product_type_element&& self) noexcept -> S { + static auto element_get(::beman::execution26::detail::product_type_element&& self) noexcept -> S&& { return ::std::move(self.value); } template <::std::size_t J, typename S> diff --git a/tests/beman/execution26/exec-snd-expos.test.cpp b/tests/beman/execution26/exec-snd-expos.test.cpp index 557d4344..27c1e12e 100644 --- a/tests/beman/execution26/exec-snd-expos.test.cpp +++ b/tests/beman/execution26/exec-snd-expos.test.cpp @@ -1253,11 +1253,11 @@ auto test_write_env() -> void { template struct child_sender : test_detail::product_type {}; auto test_child_type() -> void { - static_assert(std::same_as>>); - static_assert(std::same_as>&>); - static_assert(std::same_as>&>); - static_assert(std::same_as, 0>>); - static_assert(std::same_as, 1>>); + static_assert(std::same_as>>); + static_assert(std::same_as&>>); + static_assert(std::same_as&>>); + static_assert(std::same_as, 0>>); + static_assert(std::same_as, 1>>); } } // namespace