1 #ifndef TERMOX_COMMON_FILTER_VIEW_HPP
2 #define TERMOX_COMMON_FILTER_VIEW_HPP
7 #include <termox/common/filter_iterator.hpp>
14 template <
typename Container,
typename Filter_fn>
18 : container_{c}, filter_fn_{std::forward<Filter_fn>(filter_fn)}
22 [[nodiscard]]
auto begin()
const
28 [[nodiscard]]
auto begin()
34 [[nodiscard]]
auto end()
const
40 [[nodiscard]]
auto end()
47 Container& container_;
54 template <
typename Container,
typename Filter_fn>
58 : container_{std::move(c)},
59 filter_fn_{std::forward<Filter_fn>(filter_fn)}
63 [[nodiscard]]
auto begin()
const
69 [[nodiscard]]
auto begin()
75 [[nodiscard]]
auto end()
const
81 [[nodiscard]]
auto end()
operator++ skips underlying elements of it that do not satisfy predicate.
Definition: filter_iterator.hpp:10
Read only Container view with Filter_iterator interface.
Definition: filter_view.hpp:15
Container view with Filter_iterator interface.
Definition: filter_view.hpp:55