operator[] workaround from "Yitzhak Sapir" <yitzhaks@actimize.com>

[SVN r15244]
This commit is contained in:
Dave Abrahams
2002-09-09 21:15:41 +00:00
parent a586f20d19
commit 2c302ee549

View File

@ -761,6 +761,12 @@ namespace detail {
BOOST_STATIC_ASSERT(forward_iter_with_real_reference); BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
}; };
template <class T, class Result> struct dependent
{
typedef Result type;
};
} // namespace detail } // namespace detail
@ -880,7 +886,8 @@ struct iterator_adaptor :
# pragma warning(pop) # pragma warning(pop)
#endif #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); } { return *(*this + n); }
self& operator++() { self& operator++() {