diff options
Diffstat (limited to 'src/list/operation/higher/drop_while.h')
-rw-r--r-- | src/list/operation/higher/drop_while.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/list/operation/higher/drop_while.h b/src/list/operation/higher/drop_while.h index 8ba2664..021698f 100644 --- a/src/list/operation/higher/drop_while.h +++ b/src/list/operation/higher/drop_while.h @@ -5,16 +5,18 @@ namespace tav { +namespace detail { + template < template<typename> class Predicate, typename Current > struct DropWhile { - typedef Eval<If< + typedef If< Eval<Predicate<Head<Current>>>, Eval<DropWhile<Predicate, Tail<Current>>>, Current - >> type; + > type; }; template < @@ -26,4 +28,12 @@ struct DropWhile<Predicate, void> { } +template < + template<typename> class Predicate, + typename Current +> +using DropWhile = Eval<detail::DropWhile<Predicate, Current>>; + +} + #endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_DROP_WHILE_H_ |