From 46e174935b122c0da4b51532a7f683a512eeaf65 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 15 Feb 2015 14:07:50 +0100 Subject: Moved class-based implementations into `detail` namespace * while class templates enable e.g. hiding implementation details they also require evaluation via `Eval` ** this clutters up the actual logic and is now hidden behind aliae that perform the evaluation --- src/list/operation/higher/sort.h | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src/list/operation/higher/sort.h') diff --git a/src/list/operation/higher/sort.h b/src/list/operation/higher/sort.h index cf86e9b..2976e06 100644 --- a/src/list/operation/higher/sort.h +++ b/src/list/operation/higher/sort.h @@ -8,31 +8,33 @@ namespace tav { +namespace detail { + template < template class Comparator, typename Sequence > class Sort { private: - using index = Divide>, Size<2>>; - using pivot = Eval>; + using index = Divide, Size<2>>; + using pivot = tav::Nth; - using partitions = Eval::template function, - Eval> - >>; + DeleteNth + >; - using lhs = Eval>; - using rhs = Eval>; + using lhs = tav::Car; + using rhs = tav::Cdr; public: - typedef Eval>, - Eval>, + tav::List, Eval> - >> - >> type; + > + >; }; template class Comparator> @@ -42,4 +44,12 @@ struct Sort { } +template < + template class Comparator, + typename Sequence +> +using Sort = Eval>; + +} + #endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_SORT_H_ -- cgit v1.2.3