Beispiel #1
0
 static constexpr auto apply(Xs&& xs, N const&) {
     constexpr std::size_t n = hana::value<N>();
     constexpr std::size_t len = hana::value<decltype(hana::length(xs))>();
     return remove_at_helper(static_cast<Xs&&>(xs),
                             std::make_index_sequence<n>{},
                             std::make_index_sequence<len - n - 1>{});
 }
Beispiel #2
0
 static constexpr auto apply(Xs&& xs, N const&) {
     constexpr std::size_t n = N::value;
     constexpr std::size_t len = decltype(hana::length(xs))::value;
     static_assert(n < len,
     "hana::remove_at(xs, n) requires 'n' to be in the bounds of the sequence");
     return remove_at_helper(static_cast<Xs&&>(xs),
                             std::make_index_sequence<n>{},
                             std::make_index_sequence<len - n - 1>{});
 }