#ifndef SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP #define SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP #include #include namespace sprout { // // remove_if_filter // template class remove_if_filter { public: typedef bool result_type; private: Predicate pred_; public: SPROUT_CONSTEXPR remove_if_filter(Predicate pred) : pred_(pred) {} template SPROUT_CONSTEXPR bool operator()(U const& value) const { return !pred_(value); } }; // // make_remove_if_iterator // template inline SPROUT_CONSTEXPR sprout::filter_iterator, Iterator> make_remove_if_iterator(Predicate pred, Iterator it, Iterator last = Iterator()) { return sprout::filter_iterator, Iterator>( sprout::remove_if_filter(pred), it, last ); } } // namespace sprout #endif // SPROUT_ITERATOR_REMOVE_IF_ITERATOR_HPP