Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-06-15 12:03:53


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u3brjtxrc.fsf_at_boost-consulting.com...
| Jonathan Wakely <cow_at_[hidden]> writes:

| > But the container requirements require that X::iterator be convertible
| > to X::const_iterator, and then all those operations work by using that
| > conversion.
|
| That's incorrect. For example, if the operations are templated no
| implicit conversion will take place.

would it be correct to implement the binary operators in my "wrapping"
iterators
as function templates.

template< class VoidIter, class VoidIter2 >
inline bool operator==( const iter<VoidIter>& l, const iter<VoidIter2>& r )
{ return l.base() == r.base(); }

?

(At least that is how I do it now)

-Thorsten


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