aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/remove.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/operation/higher/remove.h')
-rw-r--r--src/list/operation/higher/remove.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/list/operation/higher/remove.h b/src/list/operation/higher/remove.h
new file mode 100644
index 0000000..e67e962
--- /dev/null
+++ b/src/list/operation/higher/remove.h
@@ -0,0 +1,34 @@
+#ifndef TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_REMOVE_H_
+#define TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_REMOVE_H_
+
+#include "filter.h"
+
+namespace tav {
+
+namespace detail {
+
+template <
+ template<typename> class Predicate,
+ typename List
+>
+class Remove {
+ private:
+ template <typename Element>
+ using predicate_negator = Not<Predicate<Element>>;
+
+ public:
+ typedef tav::Filter<predicate_negator, List> type;
+
+};
+
+}
+
+template <
+ template<typename> class Predicate,
+ typename List
+>
+using Remove = Eval<detail::Remove<Predicate, List>>;
+
+}
+
+#endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_REMOVE_H_