@@ -29,34 +29,35 @@ struct product_type_base<::std::index_sequence<I...>, T...>
2929 static constexpr bool is_product_type{true };
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 constexpr auto element_get (::beman::execution26::detail::product_type_element<J, S>& self) noexcept -> S& {
3333 return self.value ;
3434 }
3535 template <::std::size_t J, typename S>
36- static auto element_get (::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S&& {
36+ static constexpr auto
37+ element_get (::beman::execution26::detail::product_type_element<J, S>&& self) noexcept -> S&& {
3738 return ::std::move (self.value );
3839 }
3940 template <::std::size_t J, typename S>
40- static auto element_get ( const ::beman::execution26::detail::product_type_element<J, S>& self) noexcept
41- -> const S& {
41+ static constexpr auto
42+ element_get ( const ::beman::execution26::detail::product_type_element<J, S>& self) noexcept -> const S& {
4243 return self.value ;
4344 }
4445
4546 template <::std::size_t J>
46- auto get () & -> decltype(auto ) {
47+ constexpr auto get () & -> decltype(auto ) {
4748 return this ->element_get <J>(*this );
4849 }
4950 template <::std::size_t J>
50- auto get () && -> decltype(auto ) {
51+ constexpr auto get () && -> decltype(auto ) {
5152 return this ->element_get <J>(::std::move (*this ));
5253 }
5354 template <::std::size_t J>
54- auto get () const & -> decltype(auto ) {
55+ constexpr auto get () const & -> decltype(auto ) {
5556 return this ->element_get <J>(*this );
5657 }
5758
5859 template <::std::size_t J, typename Allocator, typename Self>
59- static auto make_element (Allocator&& alloc, Self&& self) -> decltype(auto ) {
60+ static constexpr auto make_element (Allocator&& alloc, Self&& self) -> decltype(auto ) {
6061 using type = ::std::remove_cvref_t <decltype (product_type_base::element_get<J>(std::forward<Self>(self)))>;
6162 if constexpr (::std::uses_allocator_v<type, Allocator>)
6263 return ::std::make_obj_using_allocator<type>(alloc,
@@ -65,7 +66,7 @@ struct product_type_base<::std::index_sequence<I...>, T...>
6566 return product_type_base::element_get<J>(std::forward<Self>(self));
6667 }
6768
68- auto operator ==(const product_type_base&) const -> bool = default ;
69+ constexpr auto operator ==(const product_type_base&) const -> bool = default ;
6970};
7071
7172template <typename T>
@@ -74,12 +75,13 @@ concept is_product_type_c = requires(const T& t) { T::is_product_type; };
7475template <typename ... T>
7576struct product_type : ::beman::execution26::detail::product_type_base<::std::index_sequence_for<T...>, T...> {
7677 template <typename Allocator, typename Product, std::size_t ... I>
77- static auto make_from (Allocator&& allocator, Product&& product, std::index_sequence<I...>) -> product_type {
78+ static constexpr auto
79+ make_from (Allocator&& allocator, Product&& product, std::index_sequence<I...>) -> product_type {
7880 return {product_type::template make_element<I>(allocator, ::std::forward<Product>(product))...};
7981 }
8082
8183 template <typename Allocator, typename Product>
82- static auto make_from (Allocator&& allocator, Product&& product) -> product_type {
84+ static constexpr auto make_from (Allocator&& allocator, Product&& product) -> product_type {
8385 return product_type::make_from (
8486 ::std::forward<Allocator>(allocator), ::std::forward<Product>(product), ::std::index_sequence_for<T...>{});
8587 }
0 commit comments