Skip to content

Commit

Permalink
Fix C++14 build
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Oct 3, 2024
1 parent 43d0595 commit b0c2452
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/experimental/__p0009_bits/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ struct integral_constant {
}
};

// The tuple implementation only comes in play when using capabilities
// such as submdspan which require C++17 anyway
#if MDSPAN_HAS_CXX_17
template<class T, size_t Idx>
struct tuple_member {
using type = T;
Expand Down Expand Up @@ -158,10 +161,11 @@ constexpr const auto& get(const tuple<Args...>& vals) { return vals.template get

template<class ... Elements>
tuple(Elements ...) -> tuple<Elements...>;
#endif

template<class T, size_t ... Idx>
constexpr auto c_array_to_std(std::index_sequence<Idx...>, const T(&values)[sizeof...(Idx)]) {
return std::array{values[Idx]...};
return std::array<T, sizeof...(Idx)>{values[Idx]...};
}
template<class T, size_t N>
constexpr auto c_array_to_std(const T(&values)[N]) {
Expand Down

0 comments on commit b0c2452

Please sign in to comment.