mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix for constexpr disabled
add sprout::adaptors::sized
This commit is contained in:
parent
2b8a8662af
commit
bcd7674cc0
84 changed files with 1758 additions and 1365 deletions
|
@ -142,13 +142,13 @@ namespace sprout {
|
|||
}
|
||||
bytes_iterator& operator+=(difference_type n) {
|
||||
bytes_iterator temp(it_, i_ + n, ra_tag());
|
||||
temp.swap(this);
|
||||
return this;
|
||||
temp.swap(*this);
|
||||
return *this;
|
||||
}
|
||||
bytes_iterator& operator-=(difference_type n) {
|
||||
bytes_iterator temp(it_, i_ - n, ra_tag());
|
||||
temp.swap(this);
|
||||
return this;
|
||||
temp.swap(*this);
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
||||
return *(*this + n);
|
||||
|
@ -207,6 +207,19 @@ namespace sprout {
|
|||
return it - n;
|
||||
}
|
||||
|
||||
//
|
||||
// distance
|
||||
//
|
||||
template<typename Iterator, typename Traits>
|
||||
SPROUT_CONSTEXPR typename std::iterator_traits<sprout::bytes_iterator<Iterator, Traits> >::difference_type
|
||||
distance(
|
||||
sprout::bytes_iterator<Iterator, Traits> first,
|
||||
sprout::bytes_iterator<Iterator, Traits> last
|
||||
)
|
||||
{
|
||||
return last - first;
|
||||
}
|
||||
|
||||
//
|
||||
// make_bytes_iterator
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue