| 653 | // Replace the Nth element of the tuple with x |
| 654 | template <int N, class T, class X> |
| 655 | CUTE_HOST_DEVICE constexpr |
| 656 | auto |
| 657 | replace(T const& t, X const& x) |
| 658 | { |
| 659 | if constexpr (is_tuple<T>::value) { |
| 660 | return detail::construct(t, x, make_seq<N>{}, seq<0>{}, make_range<N+1,tuple_size<T>::value>{}); |
| 661 | } else { |
| 662 | static_assert(N == 0); |
| 663 | return x; |
| 664 | } |
| 665 | |
| 666 | CUTE_GCC_UNREACHABLE; |
| 667 | } |
| 668 | |
| 669 | // Replace the first element of the tuple with x |
| 670 | template <class T, class X> |
nothing calls this directly
no test coverage detected