mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
algorithm を next/prev で再実装
This commit is contained in:
parent
6fe7e88509
commit
628d1caa7e
50 changed files with 310 additions and 189 deletions
|
@ -275,17 +275,17 @@ namespace std {
|
|||
//
|
||||
template<std::size_t I, typename T, std::size_t N>
|
||||
T& get(sprout::array<T, N>& arr) SPROUT_NOEXCEPT {
|
||||
static_assert(I < N, "tuple_element<>: index out of range");
|
||||
static_assert(I < N, "get: index out of range");
|
||||
return arr[I];
|
||||
}
|
||||
template<std::size_t I, typename T, std::size_t N>
|
||||
SPROUT_CONSTEXPR T const& get(sprout::array<T, N> const& arr) SPROUT_NOEXCEPT {
|
||||
static_assert(I < N, "tuple_element<>: index out of range");
|
||||
static_assert(I < N, "get: index out of range");
|
||||
return arr[I];
|
||||
}
|
||||
template<std::size_t I, typename T, std::size_t N>
|
||||
T&& get(sprout::array<T, N>&& arr) SPROUT_NOEXCEPT {
|
||||
return std::move(get<I>(arr));
|
||||
return std::move(std::get<I>(arr));
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue