fix recursion depth O(logN): some algorithms

This commit is contained in:
bolero-MURAKAMI 2013-01-03 17:01:50 +09:00
parent 28697ee7a8
commit 5019f6aa96
162 changed files with 3600 additions and 1659 deletions

View file

@ -184,15 +184,6 @@ namespace sprout {
lhs.swap(rhs);
}
//
// iterator_distance
//
template<typename Incrementable>
inline SPROUT_CONSTEXPR typename std::iterator_traits<sprout::counting_iterator<Incrementable> >::difference_type
iterator_distance(sprout::counting_iterator<Incrementable> first, sprout::counting_iterator<Incrementable> last) {
return last - first;
}
//
// iterator_next
//
@ -201,15 +192,6 @@ namespace sprout {
iterator_next(sprout::counting_iterator<Incrementable> const& it) {
return it.next();
}
template<typename Incrementable>
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable>
iterator_next(
sprout::counting_iterator<Incrementable> const& it,
typename sprout::counting_iterator<Incrementable>::difference_type n
)
{
return it + n;
}
//
// iterator_prev
@ -219,15 +201,6 @@ namespace sprout {
iterator_prev(sprout::counting_iterator<Incrementable> const& it) {
return it.prev();
}
template<typename Incrementable>
inline SPROUT_CONSTEXPR sprout::counting_iterator<Incrementable>
iterator_prev(
sprout::counting_iterator<Incrementable> const& it,
typename sprout::counting_iterator<Incrementable>::difference_type n
)
{
return it - n;
}
} // namespace sprout
#endif // #ifndef SPROUT_ITERATOR_COUNTING_ITERATOR_HPP