mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-29 12:27:33 +02:00
another MIPSpro workaround
[SVN r8597]
This commit is contained in:
@ -235,7 +235,7 @@ namespace detail {
|
|||||||
return &(*i);
|
return &(*i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dummy version for iterators that don't support member access
|
// Dummy version for non-random access iterators
|
||||||
template <class Iter, class Diff, class Cat>
|
template <class Iter, class Diff, class Cat>
|
||||||
inline void advance_impl(Iter&, Diff, Cat) { }
|
inline void advance_impl(Iter&, Diff, Cat) { }
|
||||||
|
|
||||||
@ -250,6 +250,21 @@ namespace detail {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dummy version for non-bidirectional iterators
|
||||||
|
template <class Iter, class Cat>
|
||||||
|
inline void decrement_impl(Iter&, Cat) { }
|
||||||
|
|
||||||
|
// Real version
|
||||||
|
template <class Iter>
|
||||||
|
inline typename Iter::pointer
|
||||||
|
decrement_impl(Iter& i, std::bidirectional_iterator_tag) {
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
i.policies().decrement<Iter>(i.iter());
|
||||||
|
#else
|
||||||
|
i.policies().decrement(i.iter());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
@ -336,11 +351,7 @@ public:
|
|||||||
Self operator++(int) { Self tmp(*this); ++*this; return tmp; }
|
Self operator++(int) { Self tmp(*this); ++*this; return tmp; }
|
||||||
|
|
||||||
Self& operator--() {
|
Self& operator--() {
|
||||||
#ifdef __MWERKS__
|
detail::decrement_impl(*this, iterator_category());
|
||||||
policies().decrement<Iterator>(iter());
|
|
||||||
#else
|
|
||||||
policies().decrement(iter());
|
|
||||||
#endif
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user