From 9413cace9423b822e37b94f35e61560816a1ecd5 Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Mon, 5 Sep 2016 23:33:41 -0300 Subject: [PATCH 1/7] clean up for consistency --- include/metal/list/range.hpp | 35 ++++---- include/metal/list/sort.hpp | 24 ++---- include/metal/list/transform.hpp | 1 + include/metal/map/map.hpp | 2 +- test/include/test/expressions.hpp | 22 ++--- test/include/test/lambda.hpp | 4 +- test/include/test/numbers.hpp | 4 +- test/include/test/sequences.hpp | 4 +- test/include/test/values.hpp | 4 +- test/src/metal.cpp | 56 ++++++------- test/src/metal/lambda/apply.cpp | 92 ++++++++++----------- test/src/metal/lambda/arg.cpp | 4 +- test/src/metal/lambda/bind.cpp | 72 ++++++++-------- test/src/metal/lambda/invoke.cpp | 68 ++++++++-------- test/src/metal/lambda/lambda.cpp | 8 +- test/src/metal/lambda/partial.cpp | 70 ++++++++-------- test/src/metal/lambda/quote.cpp | 22 ++--- test/src/metal/list/all.cpp | 78 +++++++++--------- test/src/metal/list/any.cpp | 80 +++++++++--------- test/src/metal/list/append.cpp | 72 ++++++++-------- test/src/metal/list/at.cpp | 88 ++++++++++---------- test/src/metal/list/back.cpp | 12 +-- test/src/metal/list/contains.cpp | 88 ++++++++++---------- test/src/metal/list/copy.cpp | 86 ++++++++++---------- test/src/metal/list/copy_if.cpp | 86 ++++++++++---------- test/src/metal/list/count.cpp | 90 ++++++++++---------- test/src/metal/list/count_if.cpp | 86 ++++++++++---------- test/src/metal/list/drop.cpp | 68 ++++++++-------- test/src/metal/list/empty.cpp | 12 +-- test/src/metal/list/erase.cpp | 74 ++++++++--------- test/src/metal/list/find.cpp | 90 ++++++++++---------- test/src/metal/list/find_if.cpp | 86 ++++++++++---------- test/src/metal/list/flatten.cpp | 12 +-- test/src/metal/list/fold_left.cpp | 86 ++++++++++---------- test/src/metal/list/fold_right.cpp | 86 ++++++++++---------- test/src/metal/list/front.cpp | 12 +-- test/src/metal/list/indices.cpp | 14 ++-- test/src/metal/list/insert.cpp | 100 +++++++++++------------ test/src/metal/list/join.cpp | 74 ++++++++--------- test/src/metal/list/list.cpp | 15 ++-- test/src/metal/list/none.cpp | 80 +++++++++--------- test/src/metal/list/partition.cpp | 86 ++++++++++---------- test/src/metal/list/prepend.cpp | 72 ++++++++-------- test/src/metal/list/range.cpp | 78 +++++++++--------- test/src/metal/list/remove.cpp | 86 ++++++++++---------- test/src/metal/list/remove_if.cpp | 86 ++++++++++---------- test/src/metal/list/replace.cpp | 104 ++++++++++++------------ test/src/metal/list/replace_if.cpp | 122 ++++++++++++++-------------- test/src/metal/list/reverse.cpp | 14 ++-- test/src/metal/list/rotate.cpp | 84 +++++++++---------- test/src/metal/list/size.cpp | 12 +-- test/src/metal/list/slice.cpp | 104 ++++++++++++------------ test/src/metal/list/sort.cpp | 84 +++++++++---------- test/src/metal/list/splice.cpp | 82 +++++++++---------- test/src/metal/list/take.cpp | 82 +++++++++---------- test/src/metal/list/transform.cpp | 76 ++++++++--------- test/src/metal/list/transpose.cpp | 12 +-- test/src/metal/map/at_key.cpp | 84 +++++++++---------- test/src/metal/map/erase_key.cpp | 82 +++++++++---------- test/src/metal/map/has_key.cpp | 86 ++++++++++---------- test/src/metal/map/keys.cpp | 10 +-- test/src/metal/map/map.cpp | 14 ++-- test/src/metal/map/order.cpp | 84 +++++++++---------- test/src/metal/map/values.cpp | 10 +-- test/src/metal/number/add.cpp | 68 ++++++++-------- test/src/metal/number/and.cpp | 70 ++++++++-------- test/src/metal/number/dec.cpp | 10 +-- test/src/metal/number/div.cpp | 68 ++++++++-------- test/src/metal/number/enumerate.cpp | 94 ++++++++++----------- test/src/metal/number/greater.cpp | 82 +++++++++---------- test/src/metal/number/if.cpp | 68 ++++++++-------- test/src/metal/number/inc.cpp | 10 +-- test/src/metal/number/less.cpp | 82 +++++++++---------- test/src/metal/number/max.cpp | 68 ++++++++-------- test/src/metal/number/min.cpp | 68 ++++++++-------- test/src/metal/number/mod.cpp | 68 ++++++++-------- test/src/metal/number/mul.cpp | 68 ++++++++-------- test/src/metal/number/neg.cpp | 10 +-- test/src/metal/number/not.cpp | 10 +-- test/src/metal/number/number.cpp | 8 +- test/src/metal/number/or.cpp | 70 ++++++++-------- test/src/metal/number/pow.cpp | 70 ++++++++-------- test/src/metal/number/sub.cpp | 68 ++++++++-------- test/src/metal/pair/first.cpp | 10 +-- test/src/metal/pair/pair.cpp | 86 ++++++++++---------- test/src/metal/pair/second.cpp | 10 +-- test/src/metal/value/distinct.cpp | 58 ++++++------- test/src/metal/value/same.cpp | 58 ++++++------- test/src/metal/value/value.cpp | 16 ++-- 89 files changed, 2457 insertions(+), 2462 deletions(-) diff --git a/include/metal/list/range.hpp b/include/metal/list/range.hpp index 82b6094c..6a401629 100644 --- a/include/metal/list/range.hpp +++ b/include/metal/list/range.hpp @@ -9,10 +9,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include namespace metal { @@ -32,8 +32,8 @@ namespace metal template using range = detail::range< seq, - if_, beg>, size>, beg>, beg>, - if_, end>, size>, end>, end> + if_, beg>, greater>>>, beg>, + if_, end>, greater>>>, end> >; } @@ -42,6 +42,8 @@ namespace metal #include #include #include +#include +#include #include #include @@ -53,14 +55,11 @@ namespace metal template using void_ = void; template - struct _skip + struct _skip_impl {}; - template - using skip = typename _skip::type; - template - struct _skip, list<_...>> + struct _skip_impl, list<_...>> { template static list impl(void_<_>*..., value*...); @@ -68,6 +67,9 @@ namespace metal using type = decltype(impl(declptr>()...)); }; + template + using skip = typename _skip_impl, num>>::type; + template struct _range { @@ -82,17 +84,16 @@ namespace metal >; }; - template - struct _range, n> + template + struct _range, num> { - using type = - skip, enumerate, sub, n>>>; + using type = skip, sub, num>>; }; - template - struct _range> + template + struct _range> { - using type = skip, n>>; + using type = skip; }; template diff --git a/include/metal/list/sort.hpp b/include/metal/list/sort.hpp index 83a6e9a0..d121825c 100644 --- a/include/metal/list/sort.hpp +++ b/include/metal/list/sort.hpp @@ -7,18 +7,12 @@ #include -#include -#include - namespace metal { namespace detail { template struct _sort; - - template - using sort = typename _sort::type; } /// \ingroup list @@ -26,7 +20,7 @@ namespace metal /// ### Description /// ... template - using sort = detail::sort, lbd>>; + using sort = typename detail::_sort::type; } #include @@ -34,8 +28,10 @@ namespace metal #include #include #include +#include #include #include +#include namespace metal { @@ -108,16 +104,14 @@ namespace metal {}; template - struct _sort, lbd> - { - using type = list; - }; + struct _sort, lbd> : + _if_, list> + {}; template - struct _sort, lbd> - { - using type = list<>; - }; + struct _sort, lbd> : + _if_, list<>> + {}; } } diff --git a/include/metal/list/transform.hpp b/include/metal/list/transform.hpp index e3e1ce9b..674b8e21 100644 --- a/include/metal/list/transform.hpp +++ b/include/metal/list/transform.hpp @@ -36,6 +36,7 @@ namespace metal #include #include +#include #include #include #include diff --git a/include/metal/map/map.hpp b/include/metal/map/map.hpp index 6c7d6e8c..913992a1 100644 --- a/include/metal/map/map.hpp +++ b/include/metal/map/map.hpp @@ -62,7 +62,7 @@ namespace metal >; } -#include +#include #include namespace metal diff --git a/test/include/test/expressions.hpp b/test/include/test/expressions.hpp index 23ba1ab9..d835c3f6 100644 --- a/test/include/test/expressions.hpp +++ b/test/include/test/expressions.hpp @@ -20,20 +20,20 @@ namespace test template using expr0 = - typename std::enable_if::value == 0, NUM(0)>::type; + typename std::enable_if::value == 0, NUMBER(0)>::type; template using expr1 = - typename std::enable_if::value == 1, NUM(1)>::type; - - template using expr2 = NUM(2); - template using expr3 = NUM(3); - template using expr4 = NUM(4); - template using expr5 = NUM(5); - template using expr6 = NUM(6); - template using expr7 = NUM(7); - template using expr8 = NUM(8); - template using expr9 = NUM(9); + typename std::enable_if::value == 1, NUMBER(1)>::type; + + template using expr2 = NUMBER(2); + template using expr3 = NUMBER(3); + template using expr4 = NUMBER(4); + template using expr5 = NUMBER(5); + template using expr6 = NUMBER(6); + template using expr7 = NUMBER(7); + template using expr8 = NUMBER(8); + template using expr9 = NUMBER(9); } #define EXPR(...) CAT(test::expr, __VA_ARGS__) diff --git a/test/include/test/lambda.hpp b/test/include/test/lambda.hpp index 95dedb64..c47c0ca8 100644 --- a/test/include/test/lambda.hpp +++ b/test/include/test/lambda.hpp @@ -8,7 +8,7 @@ #include "test/expressions.hpp" #include "test/preprocessor.hpp" -#define LBD(...) metal::lambda -#define LBDS(N) ENUM(N, LBD) +#define LAMBDA(...) metal::lambda +#define LAMBDAS(N) ENUM(N, LAMBDA) #endif diff --git a/test/include/test/numbers.hpp b/test/include/test/numbers.hpp index d2059192..e2494545 100644 --- a/test/include/test/numbers.hpp +++ b/test/include/test/numbers.hpp @@ -33,8 +33,8 @@ namespace test #define FACT_9 FACT_7*9 #define FACT(N) (CAT(FACT_, N)) -#define NUM(N) CAT(test::num, N) -#define NUMS(N) ENUM(N, NUM) +#define NUMBER(N) CAT(test::num, N) +#define NUMBERS(N) ENUM(N, NUMBER) #define BOOL(B) metal::number<(B)> #define TRUE BOOL(true) diff --git a/test/include/test/sequences.hpp b/test/include/test/sequences.hpp index d6de8dfd..3386ac8b 100644 --- a/test/include/test/sequences.hpp +++ b/test/include/test/sequences.hpp @@ -9,10 +9,10 @@ #include "test/numbers.hpp" #include "test/preprocessor.hpp" -#define PAIR(N) metal::list +#define PAIR(N) metal::list #define PAIRS(N) ENUM(N, PAIR) -#define LIST(N) metal::list +#define LIST(N) metal::list #define LISTS(N) ENUM(N, LIST) #define MAP(N) metal::list diff --git a/test/include/test/values.hpp b/test/include/test/values.hpp index 53fd1ca3..f70192cc 100644 --- a/test/include/test/values.hpp +++ b/test/include/test/values.hpp @@ -21,7 +21,7 @@ namespace test enum val9 {type}; } -#define VAL(N) CAT(test::val, N) -#define VALS(N) ENUM(N, VAL) +#define VALUE(N) CAT(test::val, N) +#define VALUES(N) ENUM(N, VALUE) #endif diff --git a/test/src/metal.cpp b/test/src/metal.cpp index 8929eee4..38cfa438 100644 --- a/test/src/metal.cpp +++ b/test/src/metal.cpp @@ -7,43 +7,43 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::not_>), (BOOL(!!N))); \ - CHECK((metal::not_>), (metal::or_, metal::not_>)); \ - CHECK((metal::not_>), (metal::and_, metal::not_>)); \ - CHECK((metal::neg>), (NUM(N))); \ - CHECK((metal::inc>), (NUM(N))); \ - CHECK((metal::dec>), (NUM(N))); \ - CHECK((metal::same, metal::mul>), (TRUE)); \ - CHECK((metal::same, metal::pow>), (TRUE)); \ - CHECK((metal::same, metal::div>, NUM(2)>>), (TRUE)); \ - CHECK((metal::same, NUM(INC(N))>>, metal::mod>), (TRUE)); \ - CHECK((metal::same, NUM(INC(M))>, NUM(0)>), (TRUE)); \ - CHECK((metal::same), (metal::not_, metal::greater>>)); \ - CHECK((metal::less), (metal::greater)); \ - CHECK((metal::if_), (metal::and_)); \ - CHECK((metal::if_), (metal::or_)); \ - CHECK((metal::at>), (VAL(M))); \ - CHECK((metal::insert), (metal::append)); \ - CHECK((metal::insert), (metal::prepend)); \ - CHECK((metal::erase), (metal::take)); \ - CHECK((metal::erase), (metal::drop)); \ - CHECK((metal::slice>), (LIST(M))); \ - CHECK((metal::take), (metal::reverse, NUM(CMPL(M))>>)); \ - CHECK((metal::rotate), (metal::join, metal::take>)); \ - CHECK((metal::sort, metal::lambda>), (metal::reverse>)); \ - CHECK((metal::same>), (TRUE)); \ + CHECK((metal::not_>), (BOOL(!!N))); \ + CHECK((metal::not_>), (metal::or_, metal::not_>)); \ + CHECK((metal::not_>), (metal::and_, metal::not_>)); \ + CHECK((metal::neg>), (NUMBER(N))); \ + CHECK((metal::inc>), (NUMBER(N))); \ + CHECK((metal::dec>), (NUMBER(N))); \ + CHECK((metal::same, metal::mul>), (TRUE)); \ + CHECK((metal::same, metal::pow>), (TRUE)); \ + CHECK((metal::same, metal::div>, NUMBER(2)>>), (TRUE)); \ + CHECK((metal::same, NUMBER(INC(N))>>, metal::mod>), (TRUE)); \ + CHECK((metal::same, NUMBER(INC(M))>, NUMBER(0)>), (TRUE)); \ + CHECK((metal::same), (metal::not_, metal::greater>>)); \ + CHECK((metal::less), (metal::greater)); \ + CHECK((metal::if_), (metal::and_)); \ + CHECK((metal::if_), (metal::or_)); \ + CHECK((metal::at>), (VALUE(M))); \ + CHECK((metal::insert), (metal::append)); \ + CHECK((metal::insert), (metal::prepend)); \ + CHECK((metal::erase), (metal::take)); \ + CHECK((metal::erase), (metal::drop)); \ + CHECK((metal::slice>), (LIST(M))); \ + CHECK((metal::take), (metal::reverse, NUMBER(CMPL(M))>>)); \ + CHECK((metal::rotate), (metal::join, metal::take>)); \ + CHECK((metal::sort, metal::lambda>), (metal::reverse>)); \ + CHECK((metal::same>), (TRUE)); \ CHECK((metal::flatten>>), (LIST(M))); \ CHECK((metal::flatten, metal::lambda>>), (LIST(M))); \ CHECK((metal::fold_left, metal::lambda>), (metal::fold_right, metal::lambda>)); \ - CHECK((metal::range, NUM(0)>), (metal::reverse)); \ + CHECK((metal::range, NUMBER(0)>), (metal::reverse)); \ CHECK((metal::transform, metal::quote, metal::_1>, metal::indices>), (LIST(M))); \ CHECK((metal::transpose>), (MAP(INC(M)))); \ CHECK((metal::transform, metal::_1>, MAP(M)>), (metal::keys)); \ CHECK((metal::transform, metal::_1>, MAP(M)>), (metal::values)); \ CHECK((metal::first>), (metal::keys)); \ CHECK((metal::second>), (metal::values)); \ - CHECK((metal::at>), (PAIR(N))); \ - CHECK((metal::has_key, NUM(M)>, NUM(M)>), (FALSE)); \ + CHECK((metal::at>), (PAIR(N))); \ + CHECK((metal::has_key, NUMBER(N)>), (BOOL(M != N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/apply.cpp b/test/src/metal/lambda/apply.cpp index c266b905..c9930cdb 100644 --- a/test/src/metal/lambda/apply.cpp +++ b/test/src/metal/lambda/apply.cpp @@ -11,61 +11,61 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (BOOL(M == 2))); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (BOOL(M == N))); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (BOOL(M == N))); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::apply), (EXPR(2))); \ - CHECK((metal::apply), (EXPR(_))); \ - CHECK((metal::apply), (EXPR(M))); \ - CHECK((metal::apply), (EXPR(_))); \ - CHECK((metal::apply), (EXPR(M))); \ - CHECK((metal::apply), (EXPR(_))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (BOOL(M == 2))); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (BOOL(M == N))); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (BOOL(M == N))); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::apply), (EXPR(2))); \ + CHECK((metal::apply), (EXPR(_))); \ + CHECK((metal::apply), (EXPR(M))); \ + CHECK((metal::apply), (EXPR(_))); \ + CHECK((metal::apply), (EXPR(M))); \ + CHECK((metal::apply), (EXPR(_))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/arg.cpp b/test/src/metal/lambda/arg.cpp index e77feb24..2574a7e9 100644 --- a/test/src/metal/lambda/arg.cpp +++ b/test/src/metal/lambda/arg.cpp @@ -13,8 +13,8 @@ #define MATRIX(M, N) \ CHECK((metal::arg), (CAT(metal::_, INC(M)))); \ CHECK((metal::is_lambda>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) VALS(N)>), (BOOL(M < N))); \ - CHECK((metal::invoke, VALS(INC(M))>), (VAL(M))); \ + CHECK((metal::is_invocable COMMA(N) VALUES(N)>), (BOOL(M < N))); \ + CHECK((metal::invoke, VALUES(INC(M))>), (VALUE(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/bind.cpp b/test/src/metal/lambda/bind.cpp index 2302fd97..f94eb6a7 100644 --- a/test/src/metal/lambda/bind.cpp +++ b/test/src/metal/lambda/bind.cpp @@ -11,51 +11,51 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) VALS(N)>), (BOOL(M == N))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (EXPR(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (EXPR(_))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(N) VALUES(N)>), (BOOL(M == N))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (EXPR(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (EXPR(_))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/invoke.cpp b/test/src/metal/lambda/invoke.cpp index dcb2eded..8fabf251 100644 --- a/test/src/metal/lambda/invoke.cpp +++ b/test/src/metal/lambda/invoke.cpp @@ -10,46 +10,46 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (FALSE)); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (BOOL(M == N))); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::is_invocable), (TRUE)); \ - CHECK((metal::invoke), (EXPR(M))); \ - CHECK((metal::invoke), (EXPR(_))); \ - CHECK((metal::invoke), (EXPR(M))); \ - CHECK((metal::invoke), (EXPR(_))); \ + CHECK((metal::is_invocable), (FALSE)); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (BOOL(M == N))); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::is_invocable), (TRUE)); \ + CHECK((metal::invoke), (EXPR(M))); \ + CHECK((metal::invoke), (EXPR(_))); \ + CHECK((metal::invoke), (EXPR(M))); \ + CHECK((metal::invoke), (EXPR(_))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/lambda.cpp b/test/src/metal/lambda/lambda.cpp index 006a5356..447721fe 100644 --- a/test/src/metal/lambda/lambda.cpp +++ b/test/src/metal/lambda/lambda.cpp @@ -9,13 +9,13 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_lambda), (FALSE)); \ - CHECK((metal::is_lambda), (FALSE)); \ + CHECK((metal::is_lambda), (FALSE)); \ + CHECK((metal::is_lambda), (FALSE)); \ CHECK((metal::is_lambda), (FALSE)); \ CHECK((metal::is_lambda), (FALSE)); \ CHECK((metal::is_lambda), (FALSE)); \ - CHECK((metal::is_lambda), (TRUE)); \ - CHECK((metal::is_lambda), (TRUE)); \ + CHECK((metal::is_lambda), (TRUE)); \ + CHECK((metal::is_lambda), (TRUE)); \ CHECK((metal::is_lambda>), (TRUE)); \ CHECK((metal::is_lambda>), (TRUE)); \ /**/ diff --git a/test/src/metal/lambda/partial.cpp b/test/src/metal/lambda/partial.cpp index e597395b..f77113e4 100644 --- a/test/src/metal/lambda/partial.cpp +++ b/test/src/metal/lambda/partial.cpp @@ -12,50 +12,50 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) VALS(N)>), (BOOL(M == 2*N))); \ - CHECK((metal::invoke COMMA(CMPL(M)) VALS(CMPL(M))>), (EXPR(_))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(N) VALUES(N)>), (BOOL(M == 2*N))); \ + CHECK((metal::invoke COMMA(CMPL(M)) VALUES(CMPL(M))>), (EXPR(_))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/lambda/quote.cpp b/test/src/metal/lambda/quote.cpp index 8738542c..6fe3cea3 100644 --- a/test/src/metal/lambda/quote.cpp +++ b/test/src/metal/lambda/quote.cpp @@ -11,20 +11,20 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_)>), (TRUE)); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (VAL(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (NUM(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (PAIR(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (LIST(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (MAP(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (LBD(M))); \ - CHECK((metal::invoke COMMA(N) VALS(N)>), (LBD(_))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (TRUE)); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (VALUE(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (NUMBER(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (PAIR(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (LIST(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (MAP(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (LAMBDA(M))); \ + CHECK((metal::invoke COMMA(N) VALUES(N)>), (LAMBDA(_))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/all.cpp b/test/src/metal/list/all.cpp index 447071c0..da0122a3 100644 --- a/test/src/metal/list/all.cpp +++ b/test/src/metal/list/all.cpp @@ -12,54 +12,54 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::all>), (FALSE)); \ CHECK((metal::all>), (BOOL(!M))); \ CHECK((metal::all>), (BOOL(!M))); \ diff --git a/test/src/metal/list/any.cpp b/test/src/metal/list/any.cpp index 38456f89..b224b853 100644 --- a/test/src/metal/list/any.cpp +++ b/test/src/metal/list/any.cpp @@ -12,55 +12,55 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::any>), (TRUE)); \ CHECK((metal::any>), (FALSE)); \ CHECK((metal::any>), (FALSE)); \ diff --git a/test/src/metal/list/append.cpp b/test/src/metal/list/append.cpp index 4b179ad2..39009ef5 100644 --- a/test/src/metal/list/append.cpp +++ b/test/src/metal/list/append.cpp @@ -11,51 +11,51 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::append), (metal::list)); \ - CHECK((metal::append), (metal::list)); \ - CHECK((metal::append), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::append), (metal::list)); \ + CHECK((metal::append), (metal::list)); \ + CHECK((metal::append), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/at.cpp b/test/src/metal/list/at.cpp index 9545c9fe..849045d4 100644 --- a/test/src/metal/list/at.cpp +++ b/test/src/metal/list/at.cpp @@ -11,59 +11,59 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (BOOL(N < 2))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (BOOL(N < 2))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (BOOL(M > N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (BOOL(M > N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M > N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M > N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::at), (NUM(M))); \ - CHECK((metal::at), (VAL(M))); \ - CHECK((metal::at), (VAL(M))); \ - CHECK((metal::at), (PAIR(M))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::at), (NUMBER(M))); \ + CHECK((metal::at), (VALUE(M))); \ + CHECK((metal::at), (VALUE(M))); \ + CHECK((metal::at), (PAIR(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/back.cpp b/test/src/metal/list/back.cpp index 2c53cfe9..77541e90 100644 --- a/test/src/metal/list/back.cpp +++ b/test/src/metal/list/back.cpp @@ -11,15 +11,15 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(M > 0))); \ CHECK((metal::is_invocable, MAP(M)>), (BOOL(M > 0))); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::back), (VAL(M))); \ - CHECK((metal::back), (VAL(M))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::back), (VALUE(M))); \ + CHECK((metal::back), (VALUE(M))); \ CHECK((metal::back), (PAIR(M))); \ /**/ diff --git a/test/src/metal/list/contains.cpp b/test/src/metal/list/contains.cpp index 00db2124..26be8cf4 100644 --- a/test/src/metal/list/contains.cpp +++ b/test/src/metal/list/contains.cpp @@ -11,60 +11,60 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::contains), (BOOL(M == N))); \ - CHECK((metal::contains), (BOOL(M == N))); \ - CHECK((metal::contains), (BOOL(M > N))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::contains), (BOOL(M == N))); \ + CHECK((metal::contains), (BOOL(M == N))); \ + CHECK((metal::contains), (BOOL(M > N))); \ CHECK((metal::contains), (BOOL(M > N))); \ - CHECK((metal::contains, VAL(N)>), (TRUE)); \ - CHECK((metal::contains, VAL(N)>), (BOOL(M > 0))); \ + CHECK((metal::contains, VALUE(N)>), (TRUE)); \ + CHECK((metal::contains, VALUE(N)>), (BOOL(M > 0))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/copy.cpp b/test/src/metal/list/copy.cpp index c6ef6e79..b76bb85f 100644 --- a/test/src/metal/list/copy.cpp +++ b/test/src/metal/list/copy.cpp @@ -10,58 +10,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::copy), (std::conditional_t, metal::list<>>)); \ - CHECK((metal::copy), (std::conditional_t, metal::list<>>)); \ - CHECK((metal::copy, VAL(M)>), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::copy), (std::conditional_t, metal::list<>>)); \ + CHECK((metal::copy), (std::conditional_t, metal::list<>>)); \ + CHECK((metal::copy, VALUE(M)>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/copy_if.cpp b/test/src/metal/list/copy_if.cpp index 4dd0b28f..838a8473 100644 --- a/test/src/metal/list/copy_if.cpp +++ b/test/src/metal/list/copy_if.cpp @@ -12,62 +12,62 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::copy_if>), (LIST(0))); \ CHECK((metal::copy_if>), (LIST(0))); \ CHECK((metal::copy_if>), (MAP(M))); \ CHECK((metal::copy_if>), (LIST(0))); \ - CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ - CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ - CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ + CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ + CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ + CHECK((metal::copy_if, metal::lambda>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/count.cpp b/test/src/metal/list/count.cpp index b860e505..833eeff9 100644 --- a/test/src/metal/list/count.cpp +++ b/test/src/metal/list/count.cpp @@ -11,61 +11,61 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::count), (metal::number)); \ - CHECK((metal::count), (metal::number)); \ - CHECK((metal::count), (metal::number<(M > N)>)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::count), (metal::number)); \ + CHECK((metal::count), (metal::number)); \ + CHECK((metal::count), (metal::number<(M > N)>)); \ CHECK((metal::count), (metal::number<(M > N)>)); \ - CHECK((metal::count, VAL(N)>), (metal::number<1 + (M > N)>)); \ - CHECK((metal::count, VAL(N)>), (metal::number)); \ + CHECK((metal::count, VALUE(N)>), (metal::number<1 + (M > N)>)); \ + CHECK((metal::count, VALUE(N)>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/count_if.cpp b/test/src/metal/list/count_if.cpp index b669dd39..919cd91d 100644 --- a/test/src/metal/list/count_if.cpp +++ b/test/src/metal/list/count_if.cpp @@ -12,55 +12,55 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::count_if>), (metal::number<1>)); \ CHECK((metal::count_if>), (metal::number<0>)); \ CHECK((metal::count_if>), (metal::number<0>)); \ @@ -70,9 +70,9 @@ CHECK((metal::count_if>), (metal::number<0>)); \ CHECK((metal::count_if>), (metal::number<0>)); \ CHECK((metal::count_if>), (metal::number<0>)); \ - CHECK((metal::count_if, metal::lambda>), (metal::number)); \ - CHECK((metal::count_if, metal::lambda>), (metal::number)); \ - CHECK((metal::count_if, metal::lambda>), (metal::number)); \ + CHECK((metal::count_if, metal::lambda>), (metal::number)); \ + CHECK((metal::count_if, metal::lambda>), (metal::number)); \ + CHECK((metal::count_if, metal::lambda>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/drop.cpp b/test/src/metal/list/drop.cpp index 4f12d21e..525e7c8c 100644 --- a/test/src/metal/list/drop.cpp +++ b/test/src/metal/list/drop.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (BOOL(N < 3))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::drop, NUM(M)>), (LIST(N))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::drop, NUMBER(M)>), (LIST(N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/empty.cpp b/test/src/metal/list/empty.cpp index e202aaf1..b83a7f73 100644 --- a/test/src/metal/list/empty.cpp +++ b/test/src/metal/list/empty.cpp @@ -11,18 +11,18 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ CHECK((metal::empty), (FALSE)); \ CHECK((metal::empty), (BOOL(!M))); \ CHECK((metal::empty), (BOOL(!M))); \ - CHECK((metal::empty>), (BOOL(!M && !N))); \ - CHECK((metal::empty>), (BOOL(!M))); \ + CHECK((metal::empty>), (BOOL(!M && !N))); \ + CHECK((metal::empty>), (BOOL(!M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/erase.cpp b/test/src/metal/list/erase.cpp index 78e16d17..50873621 100644 --- a/test/src/metal/list/erase.cpp +++ b/test/src/metal/list/erase.cpp @@ -11,52 +11,52 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(0), NUM(N)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(0), NUMBER(N)>), (BOOL(N < 3))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(0), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(0), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(0), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(0), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::erase), (metal::erase)); \ - CHECK((metal::erase), (metal::erase)); \ - CHECK((metal::erase), (LIST(0))); \ - CHECK((metal::erase), (LIST(M))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::erase), (metal::erase)); \ + CHECK((metal::erase), (metal::erase)); \ + CHECK((metal::erase), (LIST(0))); \ + CHECK((metal::erase), (LIST(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/find.cpp b/test/src/metal/list/find.cpp index 6e94d146..88122562 100644 --- a/test/src/metal/list/find.cpp +++ b/test/src/metal/list/find.cpp @@ -11,61 +11,61 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::find), (metal::number)); \ - CHECK((metal::find), (metal::number)); \ - CHECK((metal::find), (metal::number<(M > N) ? N : M>)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::find), (metal::number)); \ + CHECK((metal::find), (metal::number)); \ + CHECK((metal::find), (metal::number<(M > N) ? N : M>)); \ CHECK((metal::find), (metal::number<(M > N) ? N : M>)); \ - CHECK((metal::find, VAL(N)>), (metal::number<(M > N) ? N : M>)); \ - CHECK((metal::find, VAL(N)>), (metal::number<0>)); \ + CHECK((metal::find, VALUE(N)>), (metal::number<(M > N) ? N : M>)); \ + CHECK((metal::find, VALUE(N)>), (metal::number<0>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/find_if.cpp b/test/src/metal/list/find_if.cpp index 1891e822..98317bac 100644 --- a/test/src/metal/list/find_if.cpp +++ b/test/src/metal/list/find_if.cpp @@ -12,55 +12,55 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::find_if>), (metal::number<0>)); \ CHECK((metal::find_if>), (metal::number)); \ CHECK((metal::find_if>), (metal::number)); \ @@ -70,9 +70,9 @@ CHECK((metal::find_if>), (metal::number<2>)); \ CHECK((metal::find_if>), (metal::number)); \ CHECK((metal::find_if>), (metal::number)); \ - CHECK((metal::find_if, metal::lambda>), (metal::number<0>)); \ - CHECK((metal::find_if, metal::lambda>), (metal::number)); \ - CHECK((metal::find_if, metal::lambda>), (metal::number)); \ + CHECK((metal::find_if, metal::lambda>), (metal::number<0>)); \ + CHECK((metal::find_if, metal::lambda>), (metal::number)); \ + CHECK((metal::find_if, metal::lambda>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/flatten.cpp b/test/src/metal/list/flatten.cpp index 56fb228d..2da68984 100644 --- a/test/src/metal/list/flatten.cpp +++ b/test/src/metal/list/flatten.cpp @@ -12,17 +12,17 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ CHECK((metal::flatten), (PAIR(M))); \ CHECK((metal::flatten), (LIST(M))); \ - CHECK((metal::flatten), (metal::list)); \ - CHECK((metal::flatten, NUM(N)>>), (metal::enumerate, NUM(N)>)); \ + CHECK((metal::flatten), (metal::list)); \ + CHECK((metal::flatten, NUMBER(N)>>), (metal::enumerate, NUMBER(N)>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/fold_left.cpp b/test/src/metal/list/fold_left.cpp index c46c0481..853bc5b0 100644 --- a/test/src/metal/list/fold_left.cpp +++ b/test/src/metal/list/fold_left.cpp @@ -11,60 +11,60 @@ #include "test.hpp" -#define TAB(N, ...) EXPR(_)<__VA_ARGS__, VAL(N)> +#define TAB(N, ...) EXPR(_)<__VA_ARGS__, VALUE(N)> #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), LBD(N)>), (BOOL(N == 2))); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), LAMBDA(N)>), (BOOL(N == 2))); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), LBD(N)>), (BOOL(!M || N == 2))); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), LAMBDA(N)>), (BOOL(!M || N == 2))); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), LBD(N)>), (BOOL(!M || N == 2))); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(_)>), (FALSE)); \ - CHECK((metal::fold_left), (FOLD(M, TAB, VAL(N)))); \ - CHECK((metal::fold_left, NUM(N)>, NUM(2), LBD(2)>), (NUM(2))); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), LAMBDA(N)>), (BOOL(!M || N == 2))); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::fold_left), (FOLD(M, TAB, VALUE(N)))); \ + CHECK((metal::fold_left, NUMBER(N)>, NUMBER(2), LAMBDA(2)>), (NUMBER(2))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/fold_right.cpp b/test/src/metal/list/fold_right.cpp index 3a56f890..f8d61d68 100644 --- a/test/src/metal/list/fold_right.cpp +++ b/test/src/metal/list/fold_right.cpp @@ -11,60 +11,60 @@ #include "test.hpp" -#define TAB(N, ...) EXPR(_)<__VA_ARGS__, VAL(N)> +#define TAB(N, ...) EXPR(_)<__VA_ARGS__, VALUE(N)> #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), VAL(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), LBD(N)>), (BOOL(N == 2))); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), LAMBDA(N)>), (BOOL(N == 2))); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), LBD(N)>), (BOOL(!M || N == 2))); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), LAMBDA(N)>), (BOOL(!M || N == 2))); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), LBD(N)>), (BOOL(!M || N == 2))); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(_)>), (FALSE)); \ - CHECK((metal::fold_right), (REFOLD(M, TAB, VAL(N)))); \ - CHECK((metal::fold_right, NUM(N)>, NUM(2), LBD(2)>), (NUM(2))); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), LAMBDA(N)>), (BOOL(!M || N == 2))); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::fold_right), (REFOLD(M, TAB, VALUE(N)))); \ + CHECK((metal::fold_right, NUMBER(N)>, NUMBER(2), LAMBDA(2)>), (NUMBER(2))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/front.cpp b/test/src/metal/list/front.cpp index f3850c07..743b65d6 100644 --- a/test/src/metal/list/front.cpp +++ b/test/src/metal/list/front.cpp @@ -11,15 +11,15 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(M > 0))); \ CHECK((metal::is_invocable, MAP(M)>), (BOOL(M > 0))); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::front), (NUM(M))); \ - CHECK((metal::front), (VAL(0))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::front), (NUMBER(M))); \ + CHECK((metal::front), (VALUE(0))); \ CHECK((metal::front), (PAIR(0))); \ /**/ diff --git a/test/src/metal/list/indices.cpp b/test/src/metal/list/indices.cpp index 2baf8f26..0b536bf2 100644 --- a/test/src/metal/list/indices.cpp +++ b/test/src/metal/list/indices.cpp @@ -11,16 +11,16 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::indices), (metal::list)); \ - CHECK((metal::indices), (metal::list)); \ - CHECK((metal::indices), (metal::list)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::indices), (metal::list)); \ + CHECK((metal::indices), (metal::list)); \ + CHECK((metal::indices), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/insert.cpp b/test/src/metal/list/insert.cpp index 0a0a0b9a..48b90b2b 100644 --- a/test/src/metal/list/insert.cpp +++ b/test/src/metal/list/insert.cpp @@ -11,56 +11,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N), VAL(M)>), (BOOL(N < 3))); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N), VAL(M)>), (BOOL(M >= N))); \ - CHECK((metal::is_invocable, LIST(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N), VAL(M)>), (BOOL(M >= N))); \ - CHECK((metal::is_invocable, MAP(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::insert, NUM(M), NUM(N)>), (metal::list)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N), VALUE(M)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N), VALUE(M)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N), VALUE(M)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, MAP(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::insert, NUMBER(M), NUMBER(N)>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/join.cpp b/test/src/metal/list/join.cpp index daa106ab..f6588073 100644 --- a/test/src/metal/list/join.cpp +++ b/test/src/metal/list/join.cpp @@ -11,52 +11,52 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::join), (metal::list)); \ - CHECK((metal::join), (metal::list)); \ - CHECK((metal::join), (metal::list)); \ - CHECK((metal::join), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::join), (metal::list)); \ + CHECK((metal::join), (metal::list)); \ + CHECK((metal::join), (metal::list)); \ + CHECK((metal::join), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/list.cpp b/test/src/metal/list/list.cpp index 88b22795..9c1159b6 100644 --- a/test/src/metal/list/list.cpp +++ b/test/src/metal/list/list.cpp @@ -10,20 +10,19 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable COMMA(N) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(N) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(N) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(N) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(N) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(N) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(N) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_list), (FALSE)); \ - CHECK((metal::is_list), (FALSE)); \ + CHECK((metal::is_invocable COMMA(N) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_list), (FALSE)); \ + CHECK((metal::is_list), (FALSE)); \ CHECK((metal::is_list), (TRUE)); \ CHECK((metal::is_list), (TRUE)); \ CHECK((metal::is_list), (TRUE)); \ - CHECK((metal::is_list), (FALSE)); \ - CHECK((metal::is_list), (FALSE)); \ + CHECK((metal::is_list), (FALSE)); \ + CHECK((metal::is_list), (FALSE)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/none.cpp b/test/src/metal/list/none.cpp index 49bcf6a5..68d70e36 100644 --- a/test/src/metal/list/none.cpp +++ b/test/src/metal/list/none.cpp @@ -12,55 +12,55 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::none>), (FALSE)); \ CHECK((metal::none>), (TRUE)); \ CHECK((metal::none>), (TRUE)); \ diff --git a/test/src/metal/list/partition.cpp b/test/src/metal/list/partition.cpp index 12b97ea8..d98b64d8 100644 --- a/test/src/metal/list/partition.cpp +++ b/test/src/metal/list/partition.cpp @@ -12,61 +12,61 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::partition>), (metal::pair)); \ CHECK((metal::partition>), (metal::pair)); \ CHECK((metal::partition>), (metal::pair)); \ - CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ - CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ - CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ + CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ + CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ + CHECK((metal::partition, metal::lambda>), (metal::pair, metal::list>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/prepend.cpp b/test/src/metal/list/prepend.cpp index abc4cfa5..acb6510f 100644 --- a/test/src/metal/list/prepend.cpp +++ b/test/src/metal/list/prepend.cpp @@ -11,51 +11,51 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (BOOL(N > 0))); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::prepend), (metal::list)); \ - CHECK((metal::prepend), (metal::list)); \ - CHECK((metal::prepend), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::prepend), (metal::list)); \ + CHECK((metal::prepend), (metal::list)); \ + CHECK((metal::prepend), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/range.cpp b/test/src/metal/list/range.cpp index 2801ae0d..1afd447c 100644 --- a/test/src/metal/list/range.cpp +++ b/test/src/metal/list/range.cpp @@ -11,54 +11,54 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(0), NUM(N)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(0), NUMBER(N)>), (BOOL(N < 3))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(0), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(0), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(0), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(0), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(0), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(0), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(0), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(0), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(0), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(0), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(0), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(0), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(INF), NUM(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(INF), NUM(M), NUM(N)>), (TRUE)); \ - CHECK((metal::range), (LIST(M))); \ - CHECK((metal::range), (metal::list)); \ - CHECK((metal::range), (metal::list)); \ - CHECK((metal::range), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(0), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(0), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(0), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(0), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(0), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(0), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(INF), NUMBER(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(INF), NUMBER(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::range), (LIST(M))); \ + CHECK((metal::range), (metal::list)); \ + CHECK((metal::range), (metal::list)); \ + CHECK((metal::range), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/remove.cpp b/test/src/metal/list/remove.cpp index a787f320..0086de5d 100644 --- a/test/src/metal/list/remove.cpp +++ b/test/src/metal/list/remove.cpp @@ -11,58 +11,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::remove), (std::conditional_t, PAIR(M)>)); \ - CHECK((metal::remove), (std::conditional_t, PAIR(M)>)); \ - CHECK((metal::remove, VAL(M)>), (LIST(M))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::remove), (std::conditional_t, PAIR(M)>)); \ + CHECK((metal::remove), (std::conditional_t, PAIR(M)>)); \ + CHECK((metal::remove, VALUE(M)>), (LIST(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/remove_if.cpp b/test/src/metal/list/remove_if.cpp index 7a3d2aab..6d6b97a3 100644 --- a/test/src/metal/list/remove_if.cpp +++ b/test/src/metal/list/remove_if.cpp @@ -12,58 +12,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ - CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ - CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ + CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ + CHECK((metal::remove_if, metal::lambda>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/replace.cpp b/test/src/metal/list/replace.cpp index 80f4145e..7a59d43c 100644 --- a/test/src/metal/list/replace.cpp +++ b/test/src/metal/list/replace.cpp @@ -11,58 +11,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LIST(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), MAP(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), PAIR(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), MAP(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), PAIR(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LIST(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_), VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::replace), (metal::list>)); \ - CHECK((metal::replace), (metal::list, VAL(M)>)); \ - CHECK((metal::replace, NUM(N), VAL(N)>), (metal::list)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LIST(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), MAP(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), PAIR(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), MAP(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), PAIR(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LIST(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_), VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::replace), (metal::list>)); \ + CHECK((metal::replace), (metal::list, VALUE(M)>)); \ + CHECK((metal::replace, NUMBER(N), VALUE(N)>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/replace_if.cpp b/test/src/metal/list/replace_if.cpp index b8ea8ae3..942f93fa 100644 --- a/test/src/metal/list/replace_if.cpp +++ b/test/src/metal/list/replace_if.cpp @@ -12,67 +12,67 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N), VAL(M)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N), VAL(M)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_), VAL(M)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N), VAL(M)>), (BOOL(!M || N == 1))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_), VAL(M)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), VAL(M)>), (FALSE)); \ - CHECK((metal::replace_if, VAL(N)>), (metal::list)); \ - CHECK((metal::replace_if, VAL(N)>), (LIST(M))); \ - CHECK((metal::replace_if, VAL(N)>), (MAP(M))); \ - CHECK((metal::replace_if, VAL(N)>), (PAIR(M))); \ - CHECK((metal::replace_if, VAL(N)>), (LIST(M))); \ - CHECK((metal::replace_if, VAL(N)>), (metal::list)); \ - CHECK((metal::replace_if, VAL(N)>), (PAIR(M))); \ - CHECK((metal::replace_if, VAL(N)>), (LIST(M))); \ - CHECK((metal::replace_if, VAL(N)>), (MAP(M))); \ - CHECK((metal::replace_if, metal::lambda, VAL(N)>), (metal::list)); \ - CHECK((metal::replace_if, metal::lambda, VAL(N)>), (metal::list)); \ - CHECK((metal::replace_if, metal::lambda, VAL(N)>), (metal::list)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N), VALUE(M)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N), VALUE(M)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_), VALUE(M)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N), VALUE(M)>), (BOOL(!M || N == 1))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_), VALUE(M)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), VALUE(M)>), (FALSE)); \ + CHECK((metal::replace_if, VALUE(N)>), (metal::list)); \ + CHECK((metal::replace_if, VALUE(N)>), (LIST(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (MAP(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (PAIR(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (LIST(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (metal::list)); \ + CHECK((metal::replace_if, VALUE(N)>), (PAIR(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (LIST(M))); \ + CHECK((metal::replace_if, VALUE(N)>), (MAP(M))); \ + CHECK((metal::replace_if, metal::lambda, VALUE(N)>), (metal::list)); \ + CHECK((metal::replace_if, metal::lambda, VALUE(N)>), (metal::list)); \ + CHECK((metal::replace_if, metal::lambda, VALUE(N)>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/reverse.cpp b/test/src/metal/list/reverse.cpp index 5d6afd1e..f1703991 100644 --- a/test/src/metal/list/reverse.cpp +++ b/test/src/metal/list/reverse.cpp @@ -12,17 +12,17 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::reverse), (metal::list)); \ - CHECK((metal::reverse), (metal::list)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::reverse), (metal::list)); \ + CHECK((metal::reverse), (metal::list)); \ CHECK((metal::reverse), (metal::list)); \ - CHECK((metal::reverse, NUM(N)>>), (metal::enumerate, metal::number<-100*M>, NUM(N)>)); \ + CHECK((metal::reverse, NUMBER(N)>>), (metal::enumerate, metal::number<-100*M>, NUMBER(N)>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/rotate.cpp b/test/src/metal/list/rotate.cpp index 017cf602..5ed16207 100644 --- a/test/src/metal/list/rotate.cpp +++ b/test/src/metal/list/rotate.cpp @@ -12,59 +12,59 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ CHECK((metal::rotate>), (LIST(M))); \ CHECK((metal::rotate>), (metal::rotate>)); \ - CHECK((metal::rotate, NUM(M)>), (metal::list)); \ - CHECK((metal::rotate>, metal::number<100*N>>, metal::number<-100*N>>), (metal::enumerate>)); \ + CHECK((metal::rotate, NUMBER(M)>), (metal::list)); \ + CHECK((metal::rotate>, metal::number<100*N>>, metal::number<-100*N>>), (metal::enumerate>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/size.cpp b/test/src/metal/list/size.cpp index 233b1225..c748b8c4 100644 --- a/test/src/metal/list/size.cpp +++ b/test/src/metal/list/size.cpp @@ -11,18 +11,18 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ CHECK((metal::size), (metal::number<2>)); \ CHECK((metal::size), (metal::number)); \ CHECK((metal::size), (metal::number)); \ - CHECK((metal::size>), (metal::number)); \ - CHECK((metal::size>), (metal::number)); \ + CHECK((metal::size>), (metal::number)); \ + CHECK((metal::size>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/slice.cpp b/test/src/metal/list/slice.cpp index 37b7946c..fe8a2b7a 100644 --- a/test/src/metal/list/slice.cpp +++ b/test/src/metal/list/slice.cpp @@ -11,58 +11,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(0), NUM(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(0), NUM(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(0), NUM(N), NUM(1)>), (BOOL(N < 3))); \ - CHECK((metal::is_invocable, PAIR(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(0), NUM(N), NUM(1)>), (BOOL(M >= N))); \ - CHECK((metal::is_invocable, LIST(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(0), NUM(N), NUM(1)>), (BOOL(M >= N))); \ - CHECK((metal::is_invocable, MAP(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(0), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(0), NUM(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(0), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(0), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(0), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(0), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(M), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), NUM(1)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), NUM(1)>), (FALSE)); \ - CHECK((metal::slice), (LIST(M))); \ - CHECK((metal::slice), (metal::list)); \ - CHECK((metal::slice>), (metal::list)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, PAIR(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, MAP(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(0), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(0), NUMBER(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(0), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(0), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(0), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(0), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(M), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), NUMBER(1)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), NUMBER(1)>), (FALSE)); \ + CHECK((metal::slice), (LIST(M))); \ + CHECK((metal::slice), (metal::list)); \ + CHECK((metal::slice>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/sort.cpp b/test/src/metal/list/sort.cpp index 57fe69c4..7391aa38 100644 --- a/test/src/metal/list/sort.cpp +++ b/test/src/metal/list/sort.cpp @@ -13,57 +13,57 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (BOOL(N == 2))); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (BOOL(N == 2))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(N == 2 || M < 2))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(M < 2))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(N == 2 || M < 2))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(M < 2))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (BOOL(N == 2 || M < 2))); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (BOOL(M < 2))); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::sort, metal::lambda>), (metal::list)); \ - CHECK((metal::sort, metal::lambda>), (metal::list)); \ - CHECK((metal::sort, metal::lambda>), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (BOOL(N == 2 || M < 2))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (BOOL(M < 2))); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::sort, metal::lambda>), (metal::list)); \ + CHECK((metal::sort, metal::lambda>), (metal::list)); \ + CHECK((metal::sort, metal::lambda>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/splice.cpp b/test/src/metal/list/splice.cpp index 30a267b3..fb7401bd 100644 --- a/test/src/metal/list/splice.cpp +++ b/test/src/metal/list/splice.cpp @@ -11,56 +11,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N), PAIR(N)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N), PAIR(N)>), (BOOL(N < 3))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N), LIST(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N), LIST(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N), MAP(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N), MAP(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N), MAP(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N), MAP(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::splice, NUM(M), PAIR(N)>), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::splice, NUMBER(M), PAIR(N)>), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/take.cpp b/test/src/metal/list/take.cpp index fe80c6b7..4a3af364 100644 --- a/test/src/metal/list/take.cpp +++ b/test/src/metal/list/take.cpp @@ -11,56 +11,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (BOOL(N < 3))); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (BOOL(N < 3))); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M >= N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M >= N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::take, NUM(M)>), (LIST(M))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::take, NUMBER(M)>), (LIST(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/transform.cpp b/test/src/metal/list/transform.cpp index cd3f47e8..db7abf1d 100644 --- a/test/src/metal/list/transform.cpp +++ b/test/src/metal/list/transform.cpp @@ -11,53 +11,53 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (BOOL(M == N && N))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (BOOL(N == 1))); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::transform), (metal::list, EXPR(INC(M))>)); \ - CHECK((metal::transform), (metal::list)); \ - CHECK((metal::transform), (metal::list, EXPR(_)>)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (BOOL(M == N && N))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (BOOL(N > 0))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (BOOL(N == 1))); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::transform), (metal::list, EXPR(INC(M))>)); \ + CHECK((metal::transform), (metal::list)); \ + CHECK((metal::transform), (metal::list, EXPR(_)>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/list/transpose.cpp b/test/src/metal/list/transpose.cpp index aea0a5a8..891147ed 100644 --- a/test/src/metal/list/transpose.cpp +++ b/test/src/metal/list/transpose.cpp @@ -13,15 +13,15 @@ #define SEQ(N, ...) metal::list #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M)>), (BOOL(M > 0))); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::transpose), (metal::list, metal::list>)); \ - CHECK((metal::transpose>), (metal::list)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::transpose), (metal::list, metal::list>)); \ + CHECK((metal::transpose>), (metal::list)); \ /**/ diff --git a/test/src/metal/map/at_key.cpp b/test/src/metal/map/at_key.cpp index 69b0ab4a..9a404ed7 100644 --- a/test/src/metal/map/at_key.cpp +++ b/test/src/metal/map/at_key.cpp @@ -11,57 +11,57 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M > N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M > N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::at_key), (VAL(N))); \ - CHECK((metal::at_key>, NUM(N)>), (LBD(N))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::at_key), (VALUE(N))); \ + CHECK((metal::at_key>, NUMBER(N)>), (LAMBDA(N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/map/erase_key.cpp b/test/src/metal/map/erase_key.cpp index 5f14430d..5aa1cfae 100644 --- a/test/src/metal/map/erase_key.cpp +++ b/test/src/metal/map/erase_key.cpp @@ -12,56 +12,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M > N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M > N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::erase_key), (metal::erase)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::erase_key), (metal::erase)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/map/has_key.cpp b/test/src/metal/map/has_key.cpp index 523056f3..98146d7f 100644 --- a/test/src/metal/map/has_key.cpp +++ b/test/src/metal/map/has_key.cpp @@ -11,58 +11,58 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (BOOL(!M))); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (BOOL(!M))); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (BOOL(!M))); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (BOOL(!M))); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (BOOL(!M))); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::has_key), (BOOL(M > N))); \ - CHECK((metal::has_key), (FALSE)); \ - CHECK((metal::has_key>, NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::has_key), (BOOL(M > N))); \ + CHECK((metal::has_key), (FALSE)); \ + CHECK((metal::has_key>, NUMBER(N)>), (TRUE)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/map/keys.cpp b/test/src/metal/map/keys.cpp index 030875b5..5bb33f90 100644 --- a/test/src/metal/map/keys.cpp +++ b/test/src/metal/map/keys.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(!M))); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::keys), (metal::list)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::keys), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/map/map.cpp b/test/src/metal/map/map.cpp index f60b0af4..701bfd79 100644 --- a/test/src/metal/map/map.cpp +++ b/test/src/metal/map/map.cpp @@ -11,20 +11,20 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable COMMA(N) NUMS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable COMMA(N) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(N) LISTS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable COMMA(N) LBDS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (BOOL(M >= N))); \ - CHECK((metal::is_map), (FALSE)); \ - CHECK((metal::is_map), (FALSE)); \ + CHECK((metal::is_map), (FALSE)); \ + CHECK((metal::is_map), (FALSE)); \ CHECK((metal::is_map), (FALSE)); \ CHECK((metal::is_map), (BOOL(!N))); \ CHECK((metal::is_map), (TRUE)); \ - CHECK((metal::is_map), (FALSE)); \ - CHECK((metal::is_map), (FALSE)); \ + CHECK((metal::is_map), (FALSE)); \ + CHECK((metal::is_map), (FALSE)); \ CHECK((metal::is_map>), (BOOL(N >= M))); \ /**/ diff --git a/test/src/metal/map/order.cpp b/test/src/metal/map/order.cpp index 60386123..09b2c3a3 100644 --- a/test/src/metal/map/order.cpp +++ b/test/src/metal/map/order.cpp @@ -11,57 +11,57 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (BOOL(M > N))); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (BOOL(M > N))); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::order), (metal::number)); \ - CHECK((metal::order>, NUM(N)>), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::order), (metal::number)); \ + CHECK((metal::order>, NUMBER(N)>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/map/values.cpp b/test/src/metal/map/values.cpp index 10ef0b74..47efc0a1 100644 --- a/test/src/metal/map/values.cpp +++ b/test/src/metal/map/values.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(!M))); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::values), (metal::list)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::values), (metal::list)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/add.cpp b/test/src/metal/number/add.cpp index fcc15e88..6313fbcf 100644 --- a/test/src/metal/number/add.cpp +++ b/test/src/metal/number/add.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::add), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::add), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/and.cpp b/test/src/metal/number/and.cpp index fb2d609f..bded892c 100644 --- a/test/src/metal/number/and.cpp +++ b/test/src/metal/number/and.cpp @@ -11,50 +11,50 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::and_), (BOOL(M && !N))); \ - CHECK((metal::and_), (BOOL(M || !N))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::and_), (BOOL(M && !N))); \ + CHECK((metal::and_), (BOOL(M || !N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/dec.cpp b/test/src/metal/number/dec.cpp index e38e3cbe..75ae0b08 100644 --- a/test/src/metal/number/dec.cpp +++ b/test/src/metal/number/dec.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::dec), (metal::number)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::dec), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/div.cpp b/test/src/metal/number/div.cpp index 0906e1d2..d118f73d 100644 --- a/test/src/metal/number/div.cpp +++ b/test/src/metal/number/div.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::div COMMA(N) ENUM(N, NUM LIFT(INC))>), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::div COMMA(N) ENUM(N, NUMBER LIFT(INC))>), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/enumerate.cpp b/test/src/metal/number/enumerate.cpp index cf023375..7eac2d2b 100644 --- a/test/src/metal/number/enumerate.cpp +++ b/test/src/metal/number/enumerate.cpp @@ -13,63 +13,63 @@ #define ENTRY(N, A, B) metal::number #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N), MAP(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N), MAP(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N), MAP(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::enumerate), (metal::list)); \ - CHECK((metal::enumerate), (metal::list)); \ - CHECK((metal::enumerate, metal::number<-M>>), (metal::list)); \ - CHECK((metal::enumerate, NUM(N)>), (metal::list)); \ - CHECK((metal::enumerate, NUM(N), NUM(M)>), (metal::list)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::enumerate), (metal::list)); \ + CHECK((metal::enumerate), (metal::list)); \ + CHECK((metal::enumerate, metal::number<-M>>), (metal::list)); \ + CHECK((metal::enumerate, NUMBER(N)>), (metal::list)); \ + CHECK((metal::enumerate, NUMBER(N), NUMBER(M)>), (metal::list)); \ CHECK((metal::enumerate, metal::number<-N>>), (metal::list)); \ - CHECK((metal::enumerate, metal::number<-N>, NUM(M)>), (metal::list)); \ - CHECK((metal::enumerate, NUM(N), metal::number<-M>>), (metal::list)); \ + CHECK((metal::enumerate, metal::number<-N>, NUMBER(M)>), (metal::list)); \ + CHECK((metal::enumerate, NUMBER(N), metal::number<-M>>), (metal::list)); \ CHECK((metal::enumerate, metal::number<-N>, metal::number<-M>>), (metal::list)); \ /**/ diff --git a/test/src/metal/number/greater.cpp b/test/src/metal/number/greater.cpp index 2a6d63b6..037cb5dd 100644 --- a/test/src/metal/number/greater.cpp +++ b/test/src/metal/number/greater.cpp @@ -11,56 +11,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::greater), (BOOL(M > N))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::greater), (BOOL(M > N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/if.cpp b/test/src/metal/number/if.cpp index 02d50213..770b0b6f 100644 --- a/test/src/metal/number/if.cpp +++ b/test/src/metal/number/if.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (BOOL((M && N) ||(!M && N > 1)))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL((M && N) || (!M && N == 2)))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (BOOL((M && N) ||(!M && N > 1)))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL((M && N) || (!M && N == 2)))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::if_), (BOOL(!(M % 2) && N))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::if_), (BOOL(!(M % 2) && N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/inc.cpp b/test/src/metal/number/inc.cpp index c4685a83..85362bd7 100644 --- a/test/src/metal/number/inc.cpp +++ b/test/src/metal/number/inc.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::inc), (metal::number)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::inc), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/less.cpp b/test/src/metal/number/less.cpp index 85703c94..62ecf49c 100644 --- a/test/src/metal/number/less.cpp +++ b/test/src/metal/number/less.cpp @@ -11,56 +11,56 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), VAL(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (FALSE)); \ - CHECK((metal::less), (BOOL(M < N))); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), VALUE(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (FALSE)); \ + CHECK((metal::less), (BOOL(M < N))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/max.cpp b/test/src/metal/number/max.cpp index 9d916f25..3c8ac827 100644 --- a/test/src/metal/number/max.cpp +++ b/test/src/metal/number/max.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::max), (metal::number<(M >= N) ? M : N - 1>)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::max), (metal::number<(M >= N) ? M : N - 1>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/min.cpp b/test/src/metal/number/min.cpp index e440b963..5e213636 100644 --- a/test/src/metal/number/min.cpp +++ b/test/src/metal/number/min.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::min), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::min), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/mod.cpp b/test/src/metal/number/mod.cpp index 946fd7c5..7ee4e839 100644 --- a/test/src/metal/number/mod.cpp +++ b/test/src/metal/number/mod.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::mod), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::mod), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/mul.cpp b/test/src/metal/number/mul.cpp index 9267599a..d52d5599 100644 --- a/test/src/metal/number/mul.cpp +++ b/test/src/metal/number/mul.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::mul), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::mul), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/neg.cpp b/test/src/metal/number/neg.cpp index c4d8093e..545f59a9 100644 --- a/test/src/metal/number/neg.cpp +++ b/test/src/metal/number/neg.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::neg), (metal::number<-M>)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::neg), (metal::number<-M>)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/not.cpp b/test/src/metal/number/not.cpp index 67a5ac72..6c7a27fd 100644 --- a/test/src/metal/number/not.cpp +++ b/test/src/metal/number/not.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::not_), (BOOL(!M))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::not_), (BOOL(!M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/number.cpp b/test/src/metal/number/number.cpp index 525dbdc4..a1b02fdf 100644 --- a/test/src/metal/number/number.cpp +++ b/test/src/metal/number/number.cpp @@ -9,13 +9,13 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_number), (FALSE)); \ - CHECK((metal::is_number), (TRUE)); \ + CHECK((metal::is_number), (FALSE)); \ + CHECK((metal::is_number), (TRUE)); \ CHECK((metal::is_number), (FALSE)); \ CHECK((metal::is_number), (FALSE)); \ CHECK((metal::is_number), (FALSE)); \ - CHECK((metal::is_number), (FALSE)); \ - CHECK((metal::is_number), (FALSE)); \ + CHECK((metal::is_number), (FALSE)); \ + CHECK((metal::is_number), (FALSE)); \ CHECK((metal::is_number>), (TRUE)); \ CHECK((metal::is_number>), (TRUE)); \ CHECK((metal::is_number), (TRUE)); \ diff --git a/test/src/metal/number/or.cpp b/test/src/metal/number/or.cpp index acbbb61f..de8bc78b 100644 --- a/test/src/metal/number/or.cpp +++ b/test/src/metal/number/or.cpp @@ -11,50 +11,50 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::or_), (BOOL(M || N > 1))); \ - CHECK((metal::or_), (BOOL(N && M))); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::or_), (BOOL(M || N > 1))); \ + CHECK((metal::or_), (BOOL(N && M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/pow.cpp b/test/src/metal/number/pow.cpp index 9be0debd..895a4083 100644 --- a/test/src/metal/number/pow.cpp +++ b/test/src/metal/number/pow.cpp @@ -11,50 +11,50 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M), metal::number<-N>>), (BOOL(M || !N))); \ - CHECK((metal::pow), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M), metal::number<-N>>), (BOOL(M || !N))); \ + CHECK((metal::pow), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/number/sub.cpp b/test/src/metal/number/sub.cpp index 7d3c5762..fde6848f 100644 --- a/test/src/metal/number/sub.cpp +++ b/test/src/metal/number/sub.cpp @@ -11,49 +11,49 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, VAL(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) VALS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, NUM(M) COMMA(N) LBDS(N)>), (BOOL(!N))); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) VALUES(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) PAIRS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LISTS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) MAPS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, NUMBER(M) COMMA(N) LAMBDAS(N)>), (BOOL(!N))); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, PAIR(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, PAIR(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, LIST(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LIST(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LIST(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) PAIRS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) LISTS(N)>), (FALSE)); \ CHECK((metal::is_invocable, MAP(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, MAP(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(M) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) VALS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) NUMS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) PAIRS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LISTS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) MAPS(N)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_) COMMA(N) LBDS(N)>), (FALSE)); \ - CHECK((metal::sub), (metal::number)); \ + CHECK((metal::is_invocable, MAP(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(M) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) VALUES(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) NUMBERS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) PAIRS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LISTS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) MAPS(N)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_) COMMA(N) LAMBDAS(N)>), (FALSE)); \ + CHECK((metal::sub), (metal::number)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/pair/first.cpp b/test/src/metal/pair/first.cpp index f353d9cf..fbdfe7fd 100644 --- a/test/src/metal/pair/first.cpp +++ b/test/src/metal/pair/first.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(M == 2))); \ CHECK((metal::is_invocable, MAP(M)>), (BOOL(M == 2))); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::first), (NUM(M))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::first), (NUMBER(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/pair/pair.cpp b/test/src/metal/pair/pair.cpp index 7a8dc580..e6576fb6 100644 --- a/test/src/metal/pair/pair.cpp +++ b/test/src/metal/pair/pair.cpp @@ -11,61 +11,61 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), PAIR(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), LIST(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, VAL(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), PAIR(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), LIST(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), PAIR(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), LIST(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), MAP(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), PAIR(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), LIST(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), MAP(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, PAIR(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, PAIR(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LIST(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), NUM(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LIST(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), NUMBER(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), PAIR(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), LIST(N)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, MAP(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), VAL(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), PAIR(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), LIST(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M), LBD(_)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), NUM(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), PAIR(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), LIST(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), MAP(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(N)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_), LBD(_)>), (TRUE)); \ - CHECK((metal::is_pair), (FALSE)); \ - CHECK((metal::is_pair), (FALSE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, MAP(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), VALUE(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), PAIR(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LIST(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), MAP(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), NUMBER(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), PAIR(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LIST(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), MAP(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(N)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_), LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_pair), (FALSE)); \ + CHECK((metal::is_pair), (FALSE)); \ CHECK((metal::is_pair), (TRUE)); \ CHECK((metal::is_pair), (BOOL(N == 2))); \ CHECK((metal::is_pair), (BOOL(N == 2))); \ - CHECK((metal::is_pair), (FALSE)); \ - CHECK((metal::is_pair), (FALSE)); \ + CHECK((metal::is_pair), (FALSE)); \ + CHECK((metal::is_pair), (FALSE)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/pair/second.cpp b/test/src/metal/pair/second.cpp index 03270b45..9034732d 100644 --- a/test/src/metal/pair/second.cpp +++ b/test/src/metal/pair/second.cpp @@ -11,14 +11,14 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (FALSE)); \ - CHECK((metal::is_invocable, NUM(M)>), (FALSE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (FALSE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (FALSE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (BOOL(M == 2))); \ CHECK((metal::is_invocable, MAP(M)>), (BOOL(M == 2))); \ - CHECK((metal::is_invocable, LBD(M)>), (FALSE)); \ - CHECK((metal::is_invocable, LBD(_)>), (FALSE)); \ - CHECK((metal::second), (VAL(M))); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (FALSE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (FALSE)); \ + CHECK((metal::second), (VALUE(M))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/value/distinct.cpp b/test/src/metal/value/distinct.cpp index 69732bec..ff985746 100644 --- a/test/src/metal/value/distinct.cpp +++ b/test/src/metal/value/distinct.cpp @@ -11,44 +11,44 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::distinct), (BOOL(!M || !N))); \ - CHECK((metal::distinct), (BOOL(M < 2))); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::distinct), (BOOL(!M || !N))); \ + CHECK((metal::distinct), (BOOL(M < 2))); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/value/same.cpp b/test/src/metal/value/same.cpp index 495daee9..14a8ea70 100644 --- a/test/src/metal/value/same.cpp +++ b/test/src/metal/value/same.cpp @@ -11,44 +11,44 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) VALS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) NUMS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) VALUES(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) NUMBERS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) PAIRS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LISTS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) VALS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) NUMS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ - CHECK((metal::is_invocable COMMA(OR(M, N)) LBDS(M) COMMA(AND(M, N)) LBDS(N)>), (TRUE)); \ - CHECK((metal::same), (BOOL(M < 2 && N < 2))); \ - CHECK((metal::same), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) MAPS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) VALUES(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) NUMBERS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) PAIRS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) LISTS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) MAPS(N)>), (TRUE)); \ + CHECK((metal::is_invocable COMMA(OR(M, N)) LAMBDAS(M) COMMA(AND(M, N)) LAMBDAS(N)>), (TRUE)); \ + CHECK((metal::same), (BOOL(M < 2 && N < 2))); \ + CHECK((metal::same), (TRUE)); \ /**/ GEN(MATRIX) diff --git a/test/src/metal/value/value.cpp b/test/src/metal/value/value.cpp index 48621816..4f0dceae 100644 --- a/test/src/metal/value/value.cpp +++ b/test/src/metal/value/value.cpp @@ -11,20 +11,20 @@ #include "test.hpp" #define MATRIX(M, N) \ - CHECK((metal::is_invocable, VAL(M)>), (TRUE)); \ - CHECK((metal::is_invocable, NUM(M)>), (TRUE)); \ + CHECK((metal::is_invocable, VALUE(M)>), (TRUE)); \ + CHECK((metal::is_invocable, NUMBER(M)>), (TRUE)); \ CHECK((metal::is_invocable, PAIR(M)>), (TRUE)); \ CHECK((metal::is_invocable, LIST(M)>), (TRUE)); \ CHECK((metal::is_invocable, MAP(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(M)>), (TRUE)); \ - CHECK((metal::is_invocable, LBD(_)>), (TRUE)); \ - CHECK((metal::is_value), (TRUE)); \ - CHECK((metal::is_value), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(M)>), (TRUE)); \ + CHECK((metal::is_invocable, LAMBDA(_)>), (TRUE)); \ + CHECK((metal::is_value), (TRUE)); \ + CHECK((metal::is_value), (TRUE)); \ CHECK((metal::is_value), (TRUE)); \ CHECK((metal::is_value), (TRUE)); \ CHECK((metal::is_value), (TRUE)); \ - CHECK((metal::is_value), (TRUE)); \ - CHECK((metal::is_value), (TRUE)); \ + CHECK((metal::is_value), (TRUE)); \ + CHECK((metal::is_value), (TRUE)); \ CHECK((metal::value<>), (metal::nil)); \ /**/ From 6538eb47435d1fdac64ed2bc701cee7c1de7a88e Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Tue, 6 Sep 2016 22:19:24 -0300 Subject: [PATCH 2/7] implement fold_right explicitly as a reversed fold_left --- include/metal/detail/fold_cons.hpp | 156 ------------------------- include/metal/list/fold_left.hpp | 175 +++++++++++++++++++++++++---- include/metal/list/fold_right.hpp | 132 +--------------------- 3 files changed, 156 insertions(+), 307 deletions(-) delete mode 100644 include/metal/detail/fold_cons.hpp diff --git a/include/metal/detail/fold_cons.hpp b/include/metal/detail/fold_cons.hpp deleted file mode 100644 index 41dcd271..00000000 --- a/include/metal/detail/fold_cons.hpp +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright Bruno Dutra 2015-2016 -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt - -#ifndef METAL_DETAIL_FOLD_CONS_HPP -#define METAL_DETAIL_FOLD_CONS_HPP - -#include -#include -#include -#include - -namespace metal -{ - namespace detail - { - template - struct _fold_cons - {}; - - template< - typename _00, typename _01, typename _02, typename _03, - typename _04, typename _05, typename _06, typename _07, - typename _08, typename _09, typename _10, typename _11, - typename _12, typename _13, typename _14, typename _15, - typename _16, typename _17, typename _18, typename _19, - typename _20, typename _21, typename _22, typename _23, - typename _24, typename _25, typename _26, typename _27, - typename _28, typename _29, typename _30, typename _31, - typename _32, typename _33, typename _34, typename _35, - typename _36, typename _37, typename _38, typename _39, - typename _40, typename _41, typename _42, typename _43, - typename _44, typename _45, typename _46, typename _47, - typename _48, typename _49, typename _50, typename _51, - typename _52, typename _53, typename _54, typename _55, - typename _56, typename _57, typename _58, typename _59, - typename _60, typename _61, typename _62, typename _63, - typename _64, typename _65, typename _66, typename _67, - typename _68, typename _69, typename _70, typename _71, - typename _72, typename _73, typename _74, typename _75, - typename _76, typename _77, typename _78, typename _79, - typename _80, typename _81, typename _82, typename _83, - typename _84, typename _85, typename _86, typename _87, - typename _88, typename _89, typename _90, typename _91, - typename _92, typename _93, typename _94, typename _95, - typename _96, typename _97, typename _98, typename _99, - typename tail, - typename state, template class expr - > - struct _fold_cons< - list< - _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, - _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, - _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, - _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, - _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, - _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, - _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, - _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, - _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, - _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, tail - >, - state, - lambda, - is_value< - expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, - _10>, _11>, _12>, _13>, _14>, _15>, _16>, _17>, _18>, _19>, - _20>, _21>, _22>, _23>, _24>, _25>, _26>, _27>, _28>, _29>, - _30>, _31>, _32>, _33>, _34>, _35>, _36>, _37>, _38>, _39>, - _40>, _41>, _42>, _43>, _44>, _45>, _46>, _47>, _48>, _49>, - _50>, _51>, _52>, _53>, _54>, _55>, _56>, _57>, _58>, _59>, - _60>, _61>, _62>, _63>, _64>, _65>, _66>, _67>, _68>, _69>, - _70>, _71>, _72>, _73>, _74>, _75>, _76>, _77>, _78>, _79>, - _80>, _81>, _82>, _83>, _84>, _85>, _86>, _87>, _88>, _89>, - _90>, _91>, _92>, _93>, _94>, _95>, _96>, _97>, _98>, _99> - > - > : - _fold_cons< - tail, - expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, - _10>, _11>, _12>, _13>, _14>, _15>, _16>, _17>, _18>, _19>, - _20>, _21>, _22>, _23>, _24>, _25>, _26>, _27>, _28>, _29>, - _30>, _31>, _32>, _33>, _34>, _35>, _36>, _37>, _38>, _39>, - _40>, _41>, _42>, _43>, _44>, _45>, _46>, _47>, _48>, _49>, - _50>, _51>, _52>, _53>, _54>, _55>, _56>, _57>, _58>, _59>, - _60>, _61>, _62>, _63>, _64>, _65>, _66>, _67>, _68>, _69>, - _70>, _71>, _72>, _73>, _74>, _75>, _76>, _77>, _78>, _79>, - _80>, _81>, _82>, _83>, _84>, _85>, _86>, _87>, _88>, _89>, - _90>, _91>, _92>, _93>, _94>, _95>, _96>, _97>, _98>, _99>, - lambda - > - {}; - - template< - typename _00, typename _01, typename _02, typename _03, - typename _04, typename _05, typename _06, typename _07, - typename _08, typename _09, typename tail, - typename state, template class expr - > - struct _fold_cons< - list<_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, tail>, - state, - lambda, - is_value< - expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09> - > - > : - _fold_cons< - tail, - expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, - lambda - > - {}; - - template< - typename head, typename tail, - typename state, template class expr - > - struct _fold_cons, state, lambda, - is_value> - > : - _fold_cons, lambda> - {}; - - template class expr> - struct _fold_cons, state, lambda> - { - using type = state; - }; - } -} - -#endif - diff --git a/include/metal/list/fold_left.hpp b/include/metal/list/fold_left.hpp index 47a25e5d..8cf0c7f1 100644 --- a/include/metal/list/fold_left.hpp +++ b/include/metal/list/fold_left.hpp @@ -24,21 +24,157 @@ namespace metal } #include +#include #include - -#include +#include namespace metal { namespace detail { + template + struct _fold_left_impl + {}; + + template< + typename _00, typename _01, typename _02, typename _03, + typename _04, typename _05, typename _06, typename _07, + typename _08, typename _09, typename _10, typename _11, + typename _12, typename _13, typename _14, typename _15, + typename _16, typename _17, typename _18, typename _19, + typename _20, typename _21, typename _22, typename _23, + typename _24, typename _25, typename _26, typename _27, + typename _28, typename _29, typename _30, typename _31, + typename _32, typename _33, typename _34, typename _35, + typename _36, typename _37, typename _38, typename _39, + typename _40, typename _41, typename _42, typename _43, + typename _44, typename _45, typename _46, typename _47, + typename _48, typename _49, typename _50, typename _51, + typename _52, typename _53, typename _54, typename _55, + typename _56, typename _57, typename _58, typename _59, + typename _60, typename _61, typename _62, typename _63, + typename _64, typename _65, typename _66, typename _67, + typename _68, typename _69, typename _70, typename _71, + typename _72, typename _73, typename _74, typename _75, + typename _76, typename _77, typename _78, typename _79, + typename _80, typename _81, typename _82, typename _83, + typename _84, typename _85, typename _86, typename _87, + typename _88, typename _89, typename _90, typename _91, + typename _92, typename _93, typename _94, typename _95, + typename _96, typename _97, typename _98, typename _99, + typename tail, + typename state, template class expr + > + struct _fold_left_impl< + list< + _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, + _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, + _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, + _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, + _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, + _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, + _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, + _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, + _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, + _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, tail + >, + state, + lambda, + is_value< + expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, + _10>, _11>, _12>, _13>, _14>, _15>, _16>, _17>, _18>, _19>, + _20>, _21>, _22>, _23>, _24>, _25>, _26>, _27>, _28>, _29>, + _30>, _31>, _32>, _33>, _34>, _35>, _36>, _37>, _38>, _39>, + _40>, _41>, _42>, _43>, _44>, _45>, _46>, _47>, _48>, _49>, + _50>, _51>, _52>, _53>, _54>, _55>, _56>, _57>, _58>, _59>, + _60>, _61>, _62>, _63>, _64>, _65>, _66>, _67>, _68>, _69>, + _70>, _71>, _72>, _73>, _74>, _75>, _76>, _77>, _78>, _79>, + _80>, _81>, _82>, _83>, _84>, _85>, _86>, _87>, _88>, _89>, + _90>, _91>, _92>, _93>, _94>, _95>, _96>, _97>, _98>, _99> + > + > : + _fold_left_impl< + tail, + expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, + _10>, _11>, _12>, _13>, _14>, _15>, _16>, _17>, _18>, _19>, + _20>, _21>, _22>, _23>, _24>, _25>, _26>, _27>, _28>, _29>, + _30>, _31>, _32>, _33>, _34>, _35>, _36>, _37>, _38>, _39>, + _40>, _41>, _42>, _43>, _44>, _45>, _46>, _47>, _48>, _49>, + _50>, _51>, _52>, _53>, _54>, _55>, _56>, _57>, _58>, _59>, + _60>, _61>, _62>, _63>, _64>, _65>, _66>, _67>, _68>, _69>, + _70>, _71>, _72>, _73>, _74>, _75>, _76>, _77>, _78>, _79>, + _80>, _81>, _82>, _83>, _84>, _85>, _86>, _87>, _88>, _89>, + _90>, _91>, _92>, _93>, _94>, _95>, _96>, _97>, _98>, _99>, + lambda + > + {}; + + template< + typename _00, typename _01, typename _02, typename _03, + typename _04, typename _05, typename _06, typename _07, + typename _08, typename _09, typename tail, + typename state, template class expr + > + struct _fold_left_impl< + list<_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, tail>, + state, + lambda, + is_value< + expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09> + > + > : + _fold_left_impl< + tail, + expr, _01>, _02>, _03>, _04>, _05>, _06>, _07>, _08>, _09>, + lambda + > + {}; + + template< + typename head, typename tail, + typename state, template class expr + > + struct _fold_left_impl, state, lambda, + is_value> + > : + _fold_left_impl, lambda> + {}; + + template class expr> + struct _fold_left_impl, state, lambda> + { + using type = state; + }; + template - struct _cons_left_impl : - _cons_left_impl<(n >= 100) ? 100 : (n >= 10) ? 10 : (n >= 1)> + struct _cons_impl : + _cons_impl<(n >= 100) ? 100 : (n >= 10) ? 10 : (n >= 1)> {}; template<> - struct _cons_left_impl<100> + struct _cons_impl<100> { template< typename _00, typename _01, typename _02, typename _03, @@ -79,14 +215,12 @@ namespace metal _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, - typename _cons_left_impl< - sizeof...(tail) - >::template type + typename _cons_impl::template type >; }; template<> - struct _cons_left_impl<10> + struct _cons_impl<10> { template< typename _00, typename _01, typename _02, typename _03, @@ -95,41 +229,36 @@ namespace metal > using type = list< _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, - typename _cons_left_impl< - sizeof...(tail) - >::template type + typename _cons_impl::template type >; }; template<> - struct _cons_left_impl<1> + struct _cons_impl<1> { template using type = list< head, - typename _cons_left_impl< - sizeof...(tail) - >::template type + typename _cons_impl::template type >; }; template<> - struct _cons_left_impl<0> + struct _cons_impl<0> { template using type = list<>; }; template - struct _cons_left + struct _cons { - using type = typename _cons_left_impl< - sizeof...(vals) - >::template type; + using type = + typename _cons_impl::template type; }; template - using cons_left = typename _cons_left::type; + using cons = typename _cons::type; template struct _fold_left @@ -137,7 +266,7 @@ namespace metal template struct _fold_left, state, lbd> : - _fold_cons, state, lbd> + _fold_left_impl, state, lbd> {}; } } diff --git a/include/metal/list/fold_right.hpp b/include/metal/list/fold_right.hpp index ff2e6cc5..fa32a053 100644 --- a/include/metal/list/fold_right.hpp +++ b/include/metal/list/fold_right.hpp @@ -7,141 +7,17 @@ #include +#include +#include + namespace metal { - namespace detail - { - template - struct _fold_right; - } - /// \ingroup list /// /// ### Description /// ... template - using fold_right = typename detail::_fold_right::type; -} - -#include -#include - -#include - -namespace metal -{ - namespace detail - { - template - struct _cons_right_impl : - _cons_right_impl<(n >= 100) ? 100 : (n >= 10) ? 10 : (n >= 1)> - {}; - - template<> - struct _cons_right_impl<100> - { - template< - typename _, - typename _00, typename _01, typename _02, typename _03, - typename _04, typename _05, typename _06, typename _07, - typename _08, typename _09, typename _10, typename _11, - typename _12, typename _13, typename _14, typename _15, - typename _16, typename _17, typename _18, typename _19, - typename _20, typename _21, typename _22, typename _23, - typename _24, typename _25, typename _26, typename _27, - typename _28, typename _29, typename _30, typename _31, - typename _32, typename _33, typename _34, typename _35, - typename _36, typename _37, typename _38, typename _39, - typename _40, typename _41, typename _42, typename _43, - typename _44, typename _45, typename _46, typename _47, - typename _48, typename _49, typename _50, typename _51, - typename _52, typename _53, typename _54, typename _55, - typename _56, typename _57, typename _58, typename _59, - typename _60, typename _61, typename _62, typename _63, - typename _64, typename _65, typename _66, typename _67, - typename _68, typename _69, typename _70, typename _71, - typename _72, typename _73, typename _74, typename _75, - typename _76, typename _77, typename _78, typename _79, - typename _80, typename _81, typename _82, typename _83, - typename _84, typename _85, typename _86, typename _87, - typename _88, typename _89, typename _90, typename _91, - typename _92, typename _93, typename _94, typename _95, - typename _96, typename _97, typename _98, typename _99, - typename... tail - > - using type = typename _cons_right_impl< - sizeof...(tail) - >::template type< - list< - _99, _98, _97, _96, _95, _94, _93, _92, _91, _90, - _89, _88, _87, _86, _85, _84, _83, _82, _81, _80, - _79, _78, _77, _76, _75, _74, _73, _72, _71, _70, - _69, _68, _67, _66, _65, _64, _63, _62, _61, _60, - _59, _58, _57, _56, _55, _54, _53, _52, _51, _50, - _49, _48, _47, _46, _45, _44, _43, _42, _41, _40, - _39, _38, _37, _36, _35, _34, _33, _32, _31, _30, - _29, _28, _27, _26, _25, _24, _23, _22, _21, _20, - _19, _18, _17, _16, _15, _14, _13, _12, _11, _10, - _09, _08, _07, _06, _05, _04, _03, _02, _01, _00, - _ - >, - tail... - >; - }; - - template<> - struct _cons_right_impl<10> - { - template< - typename _, - typename _00, typename _01, typename _02, typename _03, - typename _04, typename _05, typename _06, typename _07, - typename _08, typename _09, typename... tail - > - using type = typename _cons_right_impl< - sizeof...(tail) - >::template type< - list<_09, _08, _07, _06, _05, _04, _03, _02, _01, _00, _>, - tail... - >; - }; - - template<> - struct _cons_right_impl<1> - { - template - using type = typename _cons_right_impl< - sizeof...(tail) - >::template type, tail...>; - }; - - template<> - struct _cons_right_impl<0> - { - template - using type = _; - }; - - template - struct _cons_right - { - using type = typename _cons_right_impl< - sizeof...(vals) - >::template type, vals...>; - }; - - template - using cons_right = typename _cons_right::type; - - template - struct _fold_right - {}; - - template - struct _fold_right, state, lbd> : - _fold_cons, state, lbd> - {}; - } + using fold_right = metal::fold_left, state, lbd>; } #endif From f0c1038d1db6962fbda44efd2e4a635e376e9e9e Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Tue, 6 Sep 2016 00:42:35 -0300 Subject: [PATCH 3/7] [doc] add a section dedicated to SFINAE-friendliness --- doc/Doxyfile.in | 2 ++ doc/manual.md | 31 ++++++++++++++++++++++++++++++- example/src/sfinae.cpp | 25 +++++++++++++++++++++++++ include/metal/value/value.hpp | 3 +-- 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 example/src/sfinae.cpp diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 3e6ada9e..cb90faf5 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -249,6 +249,8 @@ ALIASES +=pairs="\ref pair \"Pairs\"" ALIASES +=map="\ref map" ALIASES +=maps="\ref map \"Maps\"" +ALIASES +=SFINAE="\ref SFINAE \"SFINAE\"" + ALIASES +=semantics="\par Semantics" ALIASES +=tip{1}="
Tip
\1
" diff --git a/doc/manual.md b/doc/manual.md index aa299898..cde8dac3 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -398,6 +398,33 @@ A [Map] is a [List] of [Pairs], whose first elements are all distinct, that is metal::map, metal::is_map, metal::keys, metal::values +A Word on SFINAE-Friendliness {#SFINAE} +================================================================================ + +An [Expression] is said to be SFINAE-friendly when it is carefully designed so +as never to prevent the [SFINAE] rule to be triggered. In general, such +[Expressions] may only trigger template substitution errors at the point of +instantiation of the *signature* of a type, which includes the instantiation of +alias templates and default template arguments. + +SFINAE-friendly [Expressions] are exceedingly powerful, because they may be used +to drive overload resolution, much like [`std::enable_if`][enable_if] does. +For that reason all [Expressions] within `namespace metal` are guaranteed to be +themselves SFINAE-friendly. + +\snippet sfinae.cpp SFINAE + +Conversely, an SFINAE-unfriendly [Expression] produces so called *hard errors*, +which require the compilation to halt immediately. Examples of *hard errors* +are failed `static_assert`'ions or template substitution errors at the point of +instantiation of the nested members of a type. + +SFINAE-unfriendly [Expressions] are very inconvenient, because they force +compilation to halt when they are not selected by overload resolution, thereby +hindering the usage of the entire overloaded set. For that reason +SFINAE-unfriendly [Expressions] should always be avoided. + + Metal in Action {#metal_in_action} ================================================================================ @@ -605,7 +632,7 @@ And ignores digit separators too. Church Booleans {#church_booleans} -------------------------------------------------------------------------------- -TODO +[TODO] [Value]: #value [Values]: #value @@ -646,7 +673,9 @@ TODO [constexpr]: http://en.cppreference.com/w/cpp/language/constexpr [tuple]: http://en.cppreference.com/w/cpp/utility/tuple [get]: http://en.cppreference.com/w/cpp/utility/tuple/get +[enable_if]: http://en.cppreference.com/w/cpp/types/enable_if [literal]: http://en.cppreference.com/w/cpp/language/user_literal +[SFINAE]: http://en.cppreference.com/w/cpp/language/sfinae [CMake]: http://cmake.org/ [Doxygen]: http://doxygen.org/ diff --git a/example/src/sfinae.cpp b/example/src/sfinae.cpp new file mode 100644 index 00000000..88a913cd --- /dev/null +++ b/example/src/sfinae.cpp @@ -0,0 +1,25 @@ +// Copyright Bruno Dutra 2015-2016 +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt + +#include + +#include + +#include "example.hpp" + +/// [SFINAE] +template +constexpr metal::if_, metal::int_> make() { + return num::value; +} // instantiated for Numbers only + +template +constexpr metal::apply, seq> make() { + return {}; +} // instantiated for Lists only + +static_assert(make>() == 42, ""); +static_assert(make>() == std::tuple{}, ""); +/// [SFINAE] + diff --git a/include/metal/value/value.hpp b/include/metal/value/value.hpp index b1298784..29a52d8d 100644 --- a/include/metal/value/value.hpp +++ b/include/metal/value/value.hpp @@ -24,8 +24,7 @@ namespace metal /// ### Description /// A tautological predicate that checks whether some type is a \value. /// - /// \tip{Use `metal::is_value` to trigger [SFINAE].} - /// [SFINAE]: http://en.cppreference.com/w/cpp/language/sfinae + /// \tip{Use `metal::is_value` to trigger \SFINAE.} /// /// ### Usage /// For any \value `val` From d08bb4f93ebf24f53b8727271cad23ca05d53a95 Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Wed, 7 Sep 2016 12:32:12 -0300 Subject: [PATCH 4/7] [doc] fix minor issues --- doc/manual.md | 11 +++++------ example/src/literal.cpp | 2 +- include/metal/value/same.hpp | 2 +- include/metal/value/value.hpp | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/manual.md b/doc/manual.md index cde8dac3..c86f10e9 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -486,8 +486,8 @@ At a first glance it might be tempting to try something like this \snippet literal.cpp naive_2 } -but do not forget why we're here to begin with, that is, recall we can't -instantiate a template using a non-constexpr variable as argument! +but let us not forget why we're here to begin with, that is, recall we can't +instantiate a template using a non-`constexpr` variable as argument! At this point, a watchful reader might argue that in theory there is no real reason for this to be rejected, since the literal value must always be known at @@ -535,8 +535,8 @@ individual digits according to the radix. To parse characters into their corresponding numerical value, we must first remove all digit separators. That can be easily accomplished using `metal::remove`, which takes a [List] `l` -and a [Value] `v` and returns another [List] that contains every element from -`l` and in the same order, except for those that are identical to `v`. +and a [Value] `val` and returns another [List] that contains every element from +`l` and in the same order, except for those that are identical to `val`. \snippet literal.cpp remove @@ -550,8 +550,7 @@ another [List] containing the results of invoking `lbd` for each element in `l`. \snippet literal.cpp transform -Notice how integral values of type `char` are translated into their actual -numerical representation. +Notice how characters are translated into their actual numerical representation. So there it is diff --git a/example/src/literal.cpp b/example/src/literal.cpp index 615dfc44..6c4f31f9 100644 --- a/example/src/literal.cpp +++ b/example/src/literal.cpp @@ -307,7 +307,6 @@ struct AugmentedTuple : return std::get(*this); } }; -///[augmented_tuple] #else ///[augmented_tuple] template @@ -322,6 +321,7 @@ struct AugmentedTuple : return std::get(*this); } }; +///[augmented_tuple] #endif ///[teaser_1] diff --git a/include/metal/value/same.hpp b/include/metal/value/same.hpp index b9cd5620..1b8f7ff0 100644 --- a/include/metal/value/same.hpp +++ b/include/metal/value/same.hpp @@ -18,7 +18,7 @@ namespace metal /// \ingroup value /// /// ### Description - /// Checks whether \values are identical. + /// Checks whether all \values are identical. /// /// ### Usage /// For any \values `val_1, ..., val_n` diff --git a/include/metal/value/value.hpp b/include/metal/value/value.hpp index 29a52d8d..0bf3a827 100644 --- a/include/metal/value/value.hpp +++ b/include/metal/value/value.hpp @@ -57,7 +57,7 @@ namespace metal /// `::type`, unless `metal::value` is [empty](\ref nil), in which case it /// is undefined. /// - /// \tip{Use `metal::value` to prevent template pattern matching.} + /// \tip{Use `metal::value` to prevent undesired template pattern matching.} /// /// ### Usage /// For any \value `val` From 0818f048375f13118484d7c6b31021ecde127f01 Mon Sep 17 00:00:00 2001 From: Bruno Dutra Date: Wed, 7 Sep 2016 14:36:30 -0300 Subject: [PATCH 5/7] [doc] add google analytics tracking code --- doc/header.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/header.html b/doc/header.html index 1ca9259c..a769e241 100644 --- a/doc/header.html +++ b/doc/header.html @@ -32,6 +32,16 @@ + +