aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/remove.h
blob: 598f5a64a0ccb52e96616ad8c867dc8c239cf7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#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>
struct predicate_negator {
	template <typename Element>
	using function = Not<Predicate<Element>>;
};

}

template <
	template<typename> class Predicate,
	typename                 List
>
using Remove = Filter<
	detail::predicate_negator<Predicate>::template function,
	List
>;

}

#endif  // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_REMOVE_H_