aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-12 10:16:54 +0100
committerAdrian Kummerlaender2015-02-12 10:16:54 +0100
commitad27a79a2e6bc380e68ec77ae961917a9fb402d3 (patch)
tree7b6f43b9973d9ccae40adeb16f1184d8ea8d8e5b /test.cc
parentf1268ca3bf10ab136bafbd63894ce12353fa8690 (diff)
downloadTypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar.gz
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar.bz2
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar.lz
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar.xz
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.tar.zst
TypeAsValue-ad27a79a2e6bc380e68ec77ae961917a9fb402d3.zip
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
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.cc b/test.cc
index 931d8f1..2bf9e09 100644
--- a/test.cc
+++ b/test.cc
@@ -999,7 +999,7 @@ static_assert(
tav::Multiply,
tav::Int<21>,
tav::_0
- >::single_type<
+ >::type<
tav::Int<2>
>::type
>::value,
@@ -1014,7 +1014,7 @@ static_assert(
tav::Add,
tav::_0,
tav::Int<10>
- >::single_type,
+ >::type,
tav::List<tav::Int<0>, tav::Int<2>, tav::Int<4>>::type
>::type
>::value,