From 7ae912d83c44ba3801dadf39846e420cddd292eb Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 3 Dec 2001 21:47:58 +0000 Subject: [PATCH] Rolled in Helmut's fixes for random_access_iterable; rolled back workarounds for that problem. [SVN r11887] --- include/boost/operators.hpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/include/boost/operators.hpp b/include/boost/operators.hpp index 8004a1f..0cb0385 100644 --- a/include/boost/operators.hpp +++ b/include/boost/operators.hpp @@ -9,6 +9,7 @@ // See http://www.boost.org for most recent version including documentation. // Revision History +// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) // 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) // 27 Aug 01 'left' form for non commutative operators added; // additional classes for groups of related operators added; @@ -597,10 +598,14 @@ struct bidirectional_iteratable , decrementable > {}; +// 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 struct random_access_iteratable : bidirectional_iteratable > > > {}; @@ -894,11 +899,9 @@ template struct forward_iterator_helper - : equality_comparable1 > > > {}; + > > {}; template struct bidirectional_iterator_helper - : equality_comparable1 > > > {}; + > > {}; template struct random_access_iterator_helper - : totally_ordered1 > > > > > + > > { friend D requires_difference_operator(const T& x, const T& y) { return x - y;