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>;
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)
typename std::remove_reference< C >::type unref_C
auto back() const -> decltype(this->cont_.back())
The last element.
auto empty() const -> decltype(this->cont_.empty())
auto front() const -> decltype(this->cont_.front())
The first element.
typename unref_C::const_iterator iterator
ATTRIBUTE_PURE bool empty() const
std::string type(const automaton &a)
The implementation type of a.
value_type back() const
The last element.
value_type front() const
The first element.
typename unref_C::value_type value_type
typename std::remove_reference< container_t >::type unref_C
ATTRIBUTE_PURE size_t size() const
#define DEFINE(Name)
Forward function Name to the container.
auto end() const -> decltype(this->cont_.end())
auto begin() const -> decltype(this->cont_.begin())
boost::filter_iterator< predicate_t, typename unref_C::const_iterator > const_iterator
const_iterator end() const
typename unref_C::const_iterator const_iterator
typename unref_C::value_type value_type
const_iterator begin() const
container_range(const unref_C &cont)
auto size() const -> decltype(this->cont_.size())
container_filter_range(const unref_C &cont, predicate_t predicate)