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);
|
||||
}
|
||||
|
||||
// Dummy version for iterators that don't support member access
|
||||
// Dummy version for non-random access iterators
|
||||
template <class Iter, class Diff, class Cat>
|
||||
inline void advance_impl(Iter&, Diff, Cat) { }
|
||||
|
||||
@ -250,6 +250,21 @@ namespace detail {
|
||||
#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
|
||||
|
||||
//============================================================================
|
||||
@ -336,11 +351,7 @@ public:
|
||||
Self operator++(int) { Self tmp(*this); ++*this; return tmp; }
|
||||
|
||||
Self& operator--() {
|
||||
#ifdef __MWERKS__
|
||||
policies().decrement<Iterator>(iter());
|
||||
#else
|
||||
policies().decrement(iter());
|
||||
#endif
|
||||
detail::decrement_impl(*this, iterator_category());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user