mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix recursion depth O(logN): some algorithms
This commit is contained in:
parent
28697ee7a8
commit
5019f6aa96
162 changed files with 3600 additions and 1659 deletions
|
@ -189,15 +189,6 @@ namespace sprout {
|
|||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
//
|
||||
// iterator_distance
|
||||
//
|
||||
template<typename Iterator, typename Traits>
|
||||
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::bytes_iterator<Iterator, Traits> >::difference_type
|
||||
iterator_distance(sprout::bytes_iterator<Iterator, Traits> first, sprout::bytes_iterator<Iterator, Traits> last) {
|
||||
return last - first;
|
||||
}
|
||||
|
||||
//
|
||||
// iterator_next
|
||||
//
|
||||
|
@ -206,15 +197,6 @@ namespace sprout {
|
|||
iterator_next(sprout::bytes_iterator<Iterator, Traits> const& it) {
|
||||
return it.next();
|
||||
}
|
||||
template<typename Iterator, typename Traits>
|
||||
inline SPROUT_CONSTEXPR sprout::bytes_iterator<Iterator, Traits>
|
||||
iterator_next(
|
||||
sprout::bytes_iterator<Iterator, Traits> const& it,
|
||||
typename sprout::bytes_iterator<Iterator, Traits>::difference_type n
|
||||
)
|
||||
{
|
||||
return it + n;
|
||||
}
|
||||
|
||||
//
|
||||
// iterator_prev
|
||||
|
@ -224,15 +206,6 @@ namespace sprout {
|
|||
iterator_prev(sprout::bytes_iterator<Iterator, Traits> const& it) {
|
||||
return it.prev();
|
||||
}
|
||||
template<typename Iterator, typename Traits>
|
||||
inline SPROUT_CONSTEXPR sprout::bytes_iterator<Iterator, Traits>
|
||||
iterator_prev(
|
||||
sprout::bytes_iterator<Iterator, Traits> const& it,
|
||||
typename sprout::bytes_iterator<Iterator, Traits>::difference_type n
|
||||
)
|
||||
{
|
||||
return it - n;
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_ITERATOR_BYTES_ITERATOR_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue