aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/higher/sort.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-14 10:43:49 +0100
committerAdrian Kummerlaender2015-02-14 10:43:49 +0100
commite24f25ada7e8f48dc35cb235e045a4324bccb4f2 (patch)
tree3b6c409c7d336557163dcb25e4b11fdef82a3a79 /src/list/operation/higher/sort.h
parent73680466149c7aad21de558b7acc11dfa05183d2 (diff)
downloadTypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar.gz
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar.bz2
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar.lz
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar.xz
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.tar.zst
TypeAsValue-e24f25ada7e8f48dc35cb235e045a4324bccb4f2.zip
Introduced `Eval` function evaluation helper
* replaces `typename *::type` constructs with `Eval` applications * aims to further unify function evaluation
Diffstat (limited to 'src/list/operation/higher/sort.h')
-rw-r--r--src/list/operation/higher/sort.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/list/operation/higher/sort.h b/src/list/operation/higher/sort.h
index 5a4009c..cf86e9b 100644
--- a/src/list/operation/higher/sort.h
+++ b/src/list/operation/higher/sort.h
@@ -14,25 +14,25 @@ template <
>
class Sort {
private:
- using index = Divide<typename Length<Sequence>::type, Size<2>>;
- using pivot = typename Nth<index, Sequence>::type;
+ using index = Divide<Eval<Length<Sequence>>, Size<2>>;
+ using pivot = Eval<Nth<index, Sequence>>;
- using partitions = typename Partition<
+ using partitions = Eval<Partition<
Apply<Comparator, pivot, _0>::template function,
- typename DeleteNth<index, Sequence>::type
- >::type;
+ Eval<DeleteNth<index, Sequence>>
+ >>;
- using lhs = typename Car<partitions>::type;
- using rhs = typename Cdr<partitions>::type;
+ using lhs = Eval<Car<partitions>>;
+ using rhs = Eval<Cdr<partitions>>;
public:
- typedef typename Concatenate<
- typename List<
- typename Sort<Comparator, lhs>::type,
- typename List<pivot>::type,
- typename Sort<Comparator, rhs>::type
- >::type
- >::type type;
+ typedef Eval<Concatenate<
+ Eval<List<
+ Eval<Sort<Comparator, lhs>>,
+ Eval<List<pivot>>,
+ Eval<Sort<Comparator, rhs>>
+ >>
+ >> type;
};
template <template<typename, typename> class Comparator>