Rolled in Helmut's fixes for random_access_iterable; rolled back

workarounds for that problem.


[SVN r11887]
This commit is contained in:
Dave Abrahams 2001-12-03 21:47:58 +00:00
parent 2937f5876c
commit 7ae912d83c

View File

@ -9,6 +9,7 @@
// See http://www.boost.org for most recent version including documentation. // See http://www.boost.org for most recent version including documentation.
// Revision History // Revision History
// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel)
// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) // 28 Sep 01 Factored out iterator operator groups. (Daryle Walker)
// 27 Aug 01 'left' form for non commutative operators added; // 27 Aug 01 'left' form for non commutative operators added;
// additional classes for groups of related operators added; // additional classes for groups of related operators added;
@ -597,10 +598,14 @@ struct bidirectional_iteratable
, decrementable<T, B , decrementable<T, B
> > {}; > > {};
// To avoid repeated derivation from equality_comparable,
// which is an indirect base class of bidirectional_iterable,
// random_access_iteratable must not be derived from totally_ordered1
// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001)
template <class T, class P, class D, class R, class B = ::boost::detail::empty_base> template <class T, class P, class D, class R, class B = ::boost::detail::empty_base>
struct random_access_iteratable struct random_access_iteratable
: bidirectional_iteratable<T, P : bidirectional_iteratable<T, P
, totally_ordered1<T , less_than_comparable1<T
, additive2<T, D , additive2<T, D
, indexable<T, D, R, B , indexable<T, D, R, B
> > > > {}; > > > > {};
@ -894,11 +899,9 @@ template <class T,
class P = V*, class P = V*,
class R = V&> class R = V&>
struct forward_iterator_helper struct forward_iterator_helper
: equality_comparable1<T : forward_iteratable<T, P
, incrementable<T
, dereferenceable<T, P
, boost::iterator<std::forward_iterator_tag, V, D, P, R , boost::iterator<std::forward_iterator_tag, V, D, P, R
> > > > {}; > > {};
template <class T, template <class T,
class V, class V,
@ -906,11 +909,9 @@ template <class T,
class P = V*, class P = V*,
class R = V&> class R = V&>
struct bidirectional_iterator_helper struct bidirectional_iterator_helper
: equality_comparable1<T : bidirectional_iteratable<T, P
, unit_steppable<T
, dereferenceable<T, P
, boost::iterator<std::bidirectional_iterator_tag, V, D, P, R , boost::iterator<std::bidirectional_iterator_tag, V, D, P, R
> > > > {}; > > {};
template <class T, template <class T,
class V, class V,
@ -918,13 +919,9 @@ template <class T,
class P = V*, class P = V*,
class R = V&> class R = V&>
struct random_access_iterator_helper struct random_access_iterator_helper
: totally_ordered1<T : random_access_iteratable<T, P, D, R
, unit_steppable<T
, dereferenceable<T, P
, additive2<T, D
, indexable<T, D, R
, boost::iterator<std::random_access_iterator_tag, V, D, P, R , boost::iterator<std::random_access_iterator_tag, V, D, P, R
> > > > > > > >
{ {
friend D requires_difference_operator(const T& x, const T& y) { friend D requires_difference_operator(const T& x, const T& y) {
return x - y; return x - y;