11 class node_iterator :
public std::iterator<std::forward_iterator_tag, Node>
14 typedef std::vector<std::pair<Node, adjacency_list>> vec_t;
16 typedef typename std::conditional<
17 std::is_same<Iter, typename vec_t::const_iterator>::value,
19 Node>::type value_type;
20 typedef value_type* pointer;
21 typedef value_type& reference;
22 typedef std::forward_iterator_tag iterator_category;
23 typedef ptrdiff_t difference_type;
25 friend bool operator==(
const self_type& lhs,
const self_type& rhs)
27 return lhs.iter_ == rhs.iter_;
30 friend bool operator!=(
const self_type& lhs,
const self_type& rhs)
37 self_type operator++()
43 self_type operator++(
int)
45 self_type saved{*
this};
50 reference operator*() {
return iter_->first; }
52 pointer operator->() {
return &iter_->first; }
Definition: node_iterator.h:11