8 #ifndef TRSL_PPFILTER_ITERATOR_HPP
9 #define TRSL_PPFILTER_ITERATOR_HPP
20 template<
class Predicate,
class ElementIterator>
26 template<
class Predicate,
class ElementIterator>
29 typedef Predicate predicate_t;
30 typedef ElementIterator element_iterator;
36 typedef boost::iterator_adaptor<
39 typename boost::detail::iterator_traits<ElementIterator>::value_type,
40 boost::forward_traversal_tag,
41 typename boost::detail::iterator_traits<ElementIterator>::reference
57 template<
class Predicate,
class ElementIterator>
62 typedef typename base_t::type super_t;
64 friend class boost::iterator_core_access;
66 typedef typename base_t::upstream_iterator upstream_iterator;
67 typedef typename base_t::downstream_iterator downstream_iterator;
71 typedef typename base_t::element_iterator element_iterator;
74 super_t(), predicate_()
81 ElementIterator first, ElementIterator last)
82 : super_t(), predicate_(f)
97 template<
class OtherElementIterator>
100 typename boost::enable_if_convertible<OtherElementIterator, ElementIterator>::type* = 0) :
101 super_t(r.base()), predicate_(r.predicate_)
113 this->base_reference().base().
begin(),
114 this->base_reference().base().
end());
126 this->base_reference().base().
end(),
127 this->base_reference().base().
end());
135 typename upstream_iterator::index_t
index()
const
136 {
return this->base().base().index(); }
141 Predicate
predicate()
const {
return this->base_reference().predicate(); }
145 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
152 Predicate predicate_;
157 #endif // include guard