From 73680466149c7aad21de558b7acc11dfa05183d2 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 13 Feb 2015 21:54:48 +0100 Subject: Renamed `Apply`'s template alias to `function` * `type` is used to represent evaluation of a template * accessing the `function` doesn't evaluate it as it is the template itself --- example/prime/prime.cc | 2 +- src/function/detail/apply.h | 12 ++++++------ src/list/operation/contains.h | 2 +- src/list/operation/delete.h | 2 +- src/list/operation/higher/sort.h | 2 +- test.cc | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/example/prime/prime.cc b/example/prime/prime.cc index e4a58d6..e89d2a4 100644 --- a/example/prime/prime.cc +++ b/example/prime/prime.cc @@ -31,7 +31,7 @@ template < typename Base > using removeMultiplesOf = tav::Remove< - tav::Apply::template type, + tav::Apply::template function, Candidates >; diff --git a/src/function/detail/apply.h b/src/function/detail/apply.h index d9f058a..b4b70bf 100644 --- a/src/function/detail/apply.h +++ b/src/function/detail/apply.h @@ -47,7 +47,7 @@ template < typename... Arguments > struct apply_none { - using type = Function; + using function = Function; }; template < @@ -56,7 +56,7 @@ template < > struct apply_variadic { template - using type = Function< + using function = Function< typename resolve_placeholder< typename tav::List::type, Arguments @@ -70,10 +70,10 @@ template < > struct apply_single : apply_variadic { template - using type = typename apply_variadic< + using function = typename apply_variadic< Function, Arguments... - >::template type; + >::template function; }; template < @@ -82,10 +82,10 @@ template < > struct apply_pair : apply_variadic { template - using type = typename apply_variadic< + using function = typename apply_variadic< Function, Arguments... - >::template type; + >::template function; }; } diff --git a/src/list/operation/contains.h b/src/list/operation/contains.h index c58d6ac..fc70d78 100644 --- a/src/list/operation/contains.h +++ b/src/list/operation/contains.h @@ -12,7 +12,7 @@ template < typename List > using Contains = Any< - Apply::template type, + Apply::template function, List >; diff --git a/src/list/operation/delete.h b/src/list/operation/delete.h index 430336f..48f1137 100644 --- a/src/list/operation/delete.h +++ b/src/list/operation/delete.h @@ -12,7 +12,7 @@ template < typename List > using Delete = Remove< - Apply::template type, + Apply::template function, List >; diff --git a/src/list/operation/higher/sort.h b/src/list/operation/higher/sort.h index 5bc30c6..5a4009c 100644 --- a/src/list/operation/higher/sort.h +++ b/src/list/operation/higher/sort.h @@ -18,7 +18,7 @@ class Sort { using pivot = typename Nth::type; using partitions = typename Partition< - Apply::template type, + Apply::template function, typename DeleteNth::type >::type; diff --git a/test.cc b/test.cc index db19889..11b870f 100644 --- a/test.cc +++ b/test.cc @@ -1024,7 +1024,7 @@ static_assert( tav::Multiply, tav::Int<21>, tav::_0 - >::type< + >::function< tav::Int<2> >::type >::value, @@ -1039,7 +1039,7 @@ static_assert( tav::Add, tav::_0, tav::Int<10> - >::type, + >::function, tav::List, tav::Int<2>, tav::Int<4>>::type >::type >::value, @@ -1053,7 +1053,7 @@ static_assert( tav::Multiply, tav::Int<21>, tav::Int<2> - >::type::type + >::function::type >::value, "(* 21 2) != 42" ); -- cgit v1.2.3