Boost logo

Boost Users :

Subject: [Boost-users] MultiPassInputIterator concept
From: Tim Keitt (tkeitt_at_[hidden])
Date: 2008-11-11 15:02:14


I have a question about the requirements of the MultiPassInputIterator
concept as used in the Boost Graph Library. Does the ++first_iter ==
++second_iter requirement hold across calls to out_edges(vertex, g)?
Or put another way, does out_edges always have to return an iterator
with same ordering of returned edges?

The difference is between:

graph_traits<graph>::out_edge_iterator i = out_edges(vertex, g);
graph_traits<graph>::out_edge_iterator j = i;
++i == ++j; // clearly required, but sufficient?

and

graph_traits<graph>::out_edge_iterator i = out_edges(vertex, g);
graph_traits<graph>::out_edge_iterator j = out_edges(vertex, g);
++i == ++j; // also required?

Strangely enough, I have an application where the second case is
(currently) not guaranteed (its a custom graph class where the
out_edge_iterator is constructed on-the-fly).

THK

-- 
Timothy H. Keitt
http://www.keittlab.org/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net