diff options
-rw-r--r-- | example/turing/src/tape.h | 3 | ||||
-rw-r--r-- | src/function/detail/apply.h | 2 | ||||
-rw-r--r-- | src/utility/predicate.h | 11 | ||||
-rw-r--r-- | test.cc | 2 |
4 files changed, 6 insertions, 12 deletions
diff --git a/example/turing/src/tape.h b/example/turing/src/tape.h index 4f79bd9..94c9536 100644 --- a/example/turing/src/tape.h +++ b/example/turing/src/tape.h @@ -5,6 +5,7 @@ #include "list/list.h" #include "list/operation/replace_nth.h" #include "conditional/if.h" +#include "function/apply.h" namespace machine { @@ -26,7 +27,7 @@ template < > using readSymbol = tav::Eval<tav::If< tav::LowerThan<Position, tav::Length<Tape>>, - tav::utility::defer_eval<tav::Nth, Position, Tape>, + tav::Apply<tav::Nth, Position, Tape>, BLANK >>; 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 >>; }; @@ -1146,7 +1146,7 @@ static_assert( tav::Multiply, tav::Int<21>, tav::Int<2> - >::function::type + >::type >::value, "(* 21 2) != 42" ); |