
15 Jun
2005
15 Jun
'05
5:03 p.m.
"David Abrahams" <dave@boost-consulting.com> wrote in message news:u3brjtxrc.fsf@boost-consulting.com... | Jonathan Wakely <cow@compsoc.man.ac.uk> 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