5 #include <boost/iterator/filter_iterator.hpp> 13 struct container_range
20 using iterator =
typename unref_C::const_iterator;
30 #define DEFINE(Name) \ 31 auto Name() const -> decltype(this->cont_.Name()) \ 33 return cont_.Name(); \ 49 template <
typename Cont,
typename Pred>
58 = boost::filter_iterator<predicate_t, typename unref_C::const_iterator>;
62 , predicate_(predicate)
67 return {predicate_,
cont_.begin(),
cont_.end()};
104 return std::distance(
begin(),
end());
112 template <
typename Cont,
typename Pred>
container_filter_range< Cont, Pred > make_container_filter_range(const Cont &cont, Pred pred)
ATTRIBUTE_PURE bool empty() const
auto begin() const -> decltype(this->cont_. begin())
auto end() const -> decltype(this->cont_. end())
value_type back() const
The last element.
boost::filter_iterator< predicate_t, typename unref_C::const_iterator > const_iterator
auto size() const -> decltype(this->cont_. size())
typename unref_C::const_iterator iterator
typename std::remove_reference< C >::type unref_C
ATTRIBUTE_PURE size_t size() const
container_range(const unref_C &cont)
value_type front() const
The first element.
typename unref_C::const_iterator const_iterator
std::string type(const automaton &a)
The implementation type of a.
auto empty() const -> decltype(this->cont_. empty())
const_iterator begin() const
auto back() const -> decltype(this->cont_. back())
The last element.
#define DEFINE(Name)
Forward function Name to the container.
auto front() const -> decltype(this->cont_. front())
The first element.
typename unref_C::value_type value_type
typename std::remove_reference< container_t >::type unref_C
container_filter_range(const unref_C &cont, predicate_t predicate)
const_iterator end() const
typename unref_C::value_type value_type