Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-02-09 12:22:28


Have you actually tried the "easier" fix? It's been a while, but I
remember that there were several subtle issues that led me to the
workaround I used.

On Sat, 9 Feb 2002, Peter Dimov wrote:

pdimov> From: "Jeremy Siek" <jsiek_at_[hidden]>
pdimov> > The boost/iterator_adaptors.hpp header currently has a local macro for
pdimov> > this named BOOST_RELOPS_AMBIGUITY_BUG. We could move this into config.
pdimov> > Also, whoever fixes shared_ptr and weak_ptr may want to look at how the
pdimov> > workaround was accomplished for iterator_adaptor.
pdimov>
pdimov> There's a much easier fix, just define
pdimov>
pdimov> template<typename T> inline bool operator!=(shared_ptr<T> const & a,
pdimov> shared_ptr<T> const & b)
pdimov> {
pdimov> return a.get() != b.get();
pdimov> }
pdimov>
pdimov> or, in your case,
pdimov>
pdimov> template <class Iterator, class Policies, class Value,
pdimov> class Reference, class Pointer,
pdimov> class Category, class Distance>
pdimov> inline bool
pdimov> operator!=(
pdimov> const
pdimov> iterator_adaptor<Iterator,Policies,Value,Reference,Pointer,Category,Distance
pdimov> >& x,
pdimov> const
pdimov> iterator_adaptor<Iterator,Policies,Value,Reference,Pointer,Category,Distance
pdimov> >& y);
pdimov>
pdimov>
pdimov> Partial ordering takes care of the rest.
pdimov>
pdimov>
pdimov> Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>
pdimov>
pdimov> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
pdimov>
pdimov>

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk