From 8e49cc6f8f2186ef028bfa765fd06e52ce5218c5 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 15 Feb 2015 20:31:07 +0100 Subject: Reduced `Filter` and `Remove` implementations to direct aliases * i.e. instead of defining full class templates in the `detail` namespace we only define predicate helpers * I don't like how some symbols have to be prefixed with `tav::` in the `detail` namespace to prevent conflicts - this is one reason why as much implementation as possible should be moved to template aliases --- src/list/operation/higher/remove.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/list/operation/higher/remove.h') diff --git a/src/list/operation/higher/remove.h b/src/list/operation/higher/remove.h index e67e962..598f5a6 100644 --- a/src/list/operation/higher/remove.h +++ b/src/list/operation/higher/remove.h @@ -7,18 +7,10 @@ namespace tav { namespace detail { -template < - template class Predicate, - typename List -> -class Remove { - private: - template - using predicate_negator = Not>; - - public: - typedef tav::Filter type; - +template class Predicate> +struct predicate_negator { + template + using function = Not>; }; } @@ -27,7 +19,10 @@ template < template class Predicate, typename List > -using Remove = Eval>; +using Remove = Filter< + detail::predicate_negator::template function, + List +>; } -- cgit v1.2.3