mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
sprout::detail::distance のADL追加
sprout/numeric/fixed/partial_sum.hpp 修正 sprout/numeric/fixed/adjacent_difference.hpp 修正
This commit is contained in:
parent
bbe932a452
commit
aa96f9ce73
13 changed files with 496 additions and 296 deletions
|
@ -99,16 +99,16 @@ namespace sprout {
|
|||
friend SPROUT_CONSTEXPR bool operator!=(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
friend bool operator<(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
friend SPROUT_CONSTEXPR bool operator<(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return lhs.it_ < rhs.it_ || lhs.it_ == rhs.it_ && lhs.i_ < rhs.i_;
|
||||
}
|
||||
friend bool operator>(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
friend SPROUT_CONSTEXPR bool operator>(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return rhs < lhs;
|
||||
}
|
||||
friend bool operator<=(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
friend SPROUT_CONSTEXPR bool operator<=(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
friend bool operator>=(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
friend SPROUT_CONSTEXPR bool operator>=(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator*() const {
|
||||
|
@ -153,7 +153,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
||||
return *(*this + n);
|
||||
}
|
||||
friend difference_type operator-(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
friend SPROUT_CONSTEXPR difference_type operator-(bytes_iterator const& lhs, bytes_iterator const& rhs) {
|
||||
return (lhs.it_ - rhs.it_) * traits_type::size() + (lhs.i_ - rhs.i_);
|
||||
}
|
||||
friend SPROUT_CONSTEXPR bytes_iterator operator+(difference_type n, bytes_iterator const& it) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue