mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
rename ptr_index, ptr_unindex
This commit is contained in:
parent
899bf3fa77
commit
a5e14e71e1
10 changed files with 75 additions and 41 deletions
|
@ -284,14 +284,12 @@ namespace sprout {
|
|||
return *sprout::next(sprout::begin(get_array()), to_first_ + i);
|
||||
}
|
||||
reference at(size_type i) {
|
||||
return i < size()
|
||||
? *sprout::next(sprout::begin(get_array()), to_first_ + i)
|
||||
return i < size() ? *sprout::next(sprout::begin(get_array()), to_first_ + i)
|
||||
: (throw std::out_of_range("sub_array<>: index out of range"), *sprout::next(sprout::begin(get_array()), to_first_ + i))
|
||||
;
|
||||
}
|
||||
SPROUT_CONSTEXPR const_reference at(size_type i) const {
|
||||
return i < size()
|
||||
? *sprout::next(sprout::begin(get_array()), to_first_ + i)
|
||||
return i < size() ? *sprout::next(sprout::begin(get_array()), to_first_ + i)
|
||||
: (throw std::out_of_range("sub_array<>: index out of range"), *sprout::next(sprout::begin(get_array()), to_first_ + i))
|
||||
;
|
||||
}
|
||||
|
@ -359,6 +357,12 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR difference_type to_last() const {
|
||||
return to_last_;
|
||||
}
|
||||
SPROUT_CONSTEXPR difference_type from_begin() const {
|
||||
return to_first_;
|
||||
}
|
||||
SPROUT_CONSTEXPR difference_type from_end() const {
|
||||
return to_last_ - sprout::size(get_array());
|
||||
}
|
||||
};
|
||||
template<typename Container>
|
||||
SPROUT_CONSTEXPR_OR_CONST typename sprout::sub_array<Container>::size_type sprout::sub_array<Container>::enumerable_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue