Hello *!<div><br></div><div>I defined a custom bidi-iterator and assumed it was going to support std::advance(iterator, Difference n), where n can be negative for random access and bidirectional iterators.</div><div><br></div> <div>The definition of my iterator's facade base looks like:</div><div><div>struct my_iter�</div><div>� :�boost::iterator_facade</div><div>� � � < my_iter</div><div>� � � , const byte</div><div>� � � , boost::bidirectional_traversal_tag�</div> <div>� � � , const byte</div><div>� � � ></div></div><div>{</div><div><br></div><div>// some impl stuff follows...</div><div>};</div><div><br></div><div><br></div><div>My tests show that calling:</div><div>advance(instance_of_my_iter, N) works fine (increment implementation is called)</div> <div><br></div><div>advance(instance_of_my_iter, -N) does not work, because increment (instead of decrement) is called as well</div><div><br></div><div>While reading through the docs for iterator facade at�<a href="http://www.boost.org/doc/libs/1_46_0/libs/iterator/doc/iterator_facade.html">http://www.boost.org/doc/libs/1_46_0/libs/iterator/doc/iterator_facade.html</a>�I found the section�<span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; font-weight: bold; line-height: 15px; background-color: rgb(255, 255, 255); "><tt class="docutils literal"><span class="pre" style="white-space: pre; ">iterator_facade</span></tt>�Core Operations.</span></div> <div><br></div><div>For the advance implementation is stated there that it is only gets called for Random Access Iterators. C++ Standard clearly defines that N-Parameter to std::advance can be negative to random access and bidi iterators. Implementing void advance member in my_iter still results in the call to increment member. Can someone give me any suggestions or is it a bug in the iterator lib?</div> <div><br></div><div>My compiler is gcc 4.3 under Debian Linux with Kernal 2.6.26. and Boost 1.42.</div><div><br></div><div><br></div><div>With Kind Regards,</div><div>Ovanes</div><div><br></div>