forked from boostorg/iterator
operator[] workaround from "Yitzhak Sapir" <yitzhaks@actimize.com>
[SVN r15244]
This commit is contained in:
@ -761,6 +761,12 @@ namespace detail {
|
||||
|
||||
BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
|
||||
};
|
||||
|
||||
template <class T, class Result> struct dependent
|
||||
{
|
||||
typedef Result type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
@ -880,7 +886,8 @@ struct iterator_adaptor :
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
value_type operator[](difference_type n) const
|
||||
template <class diff_type>
|
||||
typename detail::dependent<diff_type, value_type>::type operator[](diff_type n) const
|
||||
{ return *(*this + n); }
|
||||
|
||||
self& operator++() {
|
||||
|
Reference in New Issue
Block a user