aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-24 16:51:37 +0100
committerAdrian Kummerlaender2015-02-24 16:51:37 +0100
commita3a0d6a1fa880b324576bb073637e021c57b0e65 (patch)
tree7015c994acff2c02c71d7ef3aaa6cc5a6cb4ec11 /src
parent0dde43edac6817c3f0a237d25c2054c0ee75926c (diff)
downloadTypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar.gz
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar.bz2
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar.lz
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar.xz
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.tar.zst
TypeAsValue-a3a0d6a1fa880b324576bb073637e021c57b0e65.zip
Replaced `utility::defer_eval` with placeholder-less `Apply`
* usage of `Apply` sans placeholders was already possible and as such duplicated `utility::defer_eval` * renamed `apply_none`'s type alias from to `type` to enable combining it with `Eval`
Diffstat (limited to 'src')
-rw-r--r--src/function/detail/apply.h2
-rw-r--r--src/utility/predicate.h11
2 files changed, 3 insertions, 10 deletions
diff --git a/src/function/detail/apply.h b/src/function/detail/apply.h
index 2f4c782..c06fe68 100644
--- a/src/function/detail/apply.h
+++ b/src/function/detail/apply.h
@@ -12,7 +12,7 @@ template <
typename... Arguments
>
struct apply_none {
- using function = Function<Arguments...>;
+ using type = Function<Arguments...>;
};
template <
diff --git a/src/utility/predicate.h b/src/utility/predicate.h
index e84b18f..b185759 100644
--- a/src/utility/predicate.h
+++ b/src/utility/predicate.h
@@ -3,6 +3,7 @@
#include "conditional/if.h"
#include "operation/logic.h"
+#include "function/apply.h"
namespace tav {
@@ -22,14 +23,6 @@ struct predicate_assurance {
};
template <
- template<typename...> class Function,
- typename... Arguments
->
-struct defer_eval {
- typedef Function<Arguments...> type;
-};
-
-template <
template<typename> class Predicate,
template<typename> class Charge,
typename Surrogate
@@ -38,7 +31,7 @@ struct predicate_guard {
template <typename Value>
using check = Eval<If<
Eval<Predicate<Value>>,
- defer_eval<Charge, Value>,
+ Apply<Charge, Value>,
Surrogate
>>;
};