From 5a9366307d23b220657629c494827def3544c490 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 16 Feb 2015 16:35:38 +0100 Subject: Renamed `detail::Sort` to `detail::quick_sort` * opens up the possibility of implementing different sort algorithms in this library * removed now unnecessary namespace prefixes --- src/list/list.h | 1 + src/list/operation/higher/sort.h | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/list/list.h b/src/list/list.h index 1a4c260..edb52ec 100644 --- a/src/list/list.h +++ b/src/list/list.h @@ -1,6 +1,7 @@ #ifndef TYPEASVALUE_SRC_LIST_LIST_H_ #define TYPEASVALUE_SRC_LIST_LIST_H_ +#include "type.h" #include "cons.h" #include "detail/fold_variadic.h" diff --git a/src/list/operation/higher/sort.h b/src/list/operation/higher/sort.h index 26d99e6..925ab89 100644 --- a/src/list/operation/higher/sort.h +++ b/src/list/operation/higher/sort.h @@ -14,31 +14,31 @@ template < template class Comparator, typename Sequence > -class Sort { +class quick_sort { private: - using index = Divide, Size<2>>; - using pivot = tav::Nth; + using index = Divide, Size<2>>; + using pivot = Nth; using partitions = Partition< Apply::template function, DeleteNth >; - using lhs = tav::Car; - using rhs = tav::Cdr; + using lhs = Car; + using rhs = Cdr; public: using type = Concatenate< List< - Eval>, + Eval>, List, - Eval> + Eval> > >; }; template class Comparator> -struct Sort { +struct quick_sort { typedef void type; }; @@ -48,7 +48,7 @@ template < template class Comparator, typename Sequence > -using Sort = Eval>; +using Sort = Eval>; } -- cgit v1.2.3