From ad27a79a2e6bc380e68ec77ae961917a9fb402d3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 12 Feb 2015 10:16:54 +0100 Subject: Revamped partial function application * moved internals into separate header i.e. the `detail` namespace relating to `Apply` * implemented automatic alias selection by implementing aliae of the basic variadic `type` template alias in different base classes ** variadic partial application is implemented in `detail::apply_variadic` *** `detail::apply_single` and `detail::apply_pair` define aliae to `detail::apply_variadic`'s `type` template alias *** both restricted aliae derive from `detail::apply_variadic` ** `Apply` derives from any of the aliae defining base classes depending on the count of placeholders as determined by `detail::count_placeholders` *** `Apply` is guaranteed to always be derived from `detail::apply_variadic` one way or the other * changed functions, test cases and examples depending on `Apply` accordingly ** `Length` had to be reimplemented without `Apply` as it doesn't allow usage of aliae expecting a different count of arguments anymore *** this is a advantage in the sense that core functionality of _TypeAsValue_ now doesn't depend on this complex partial application implementation anymore *** such functionality may be reimplemented separately from `Apply` * removed unnecessary `tav` namespace prefixes --- example/prime/prime.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'example') diff --git a/example/prime/prime.cc b/example/prime/prime.cc index f1771a6..3d5cced 100644 --- a/example/prime/prime.cc +++ b/example/prime/prime.cc @@ -2,6 +2,7 @@ #include "type.h" #include "operation/math.h" +#include "function/apply.h" #include "list/list.h" #include "list/operation/higher/filter.h" @@ -30,7 +31,7 @@ template < typename Base > using removeMultiplesOf = tav::Remove< - tav::Apply::template single_type, + tav::Apply::template type, Candidates >; -- cgit v1.2.3