diff options
Diffstat (limited to 'src/list/operation/reverse.h')
-rw-r--r-- | src/list/operation/reverse.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/list/operation/reverse.h b/src/list/operation/reverse.h index aabba92..6d9237d 100644 --- a/src/list/operation/reverse.h +++ b/src/list/operation/reverse.h @@ -8,27 +8,16 @@ namespace tav { namespace detail { -template <typename Sequence> -class Reverse { - private: - template < - typename Current, - typename Previous - > - using reversed_append = tav::Append< - Previous, - tav::List<Current> - >; - - public: - typedef tav::Fold<reversed_append, void, Sequence> type; - -}; +template < + typename Current, + typename Previous +> +using reversed_append = tav::Append<Previous, List<Current>>; } template <typename Sequence> -using Reverse = Eval<detail::Reverse<Sequence>>; +using Reverse = Fold<detail::reversed_append, void, Sequence>; } |