◆ _1
using metal::_1 = typedef metal::arg<1U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _2
using metal::_2 = typedef metal::arg<2U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _3
using metal::_3 = typedef metal::arg<3U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _4
using metal::_4 = typedef metal::arg<4U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _5
using metal::_5 = typedef metal::arg<5U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _6
using metal::_6 = typedef metal::arg<6U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _7
using metal::_7 = typedef metal::arg<7U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _8
using metal::_8 = typedef metal::arg<8U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ _9
using metal::_9 = typedef metal::arg<9U> |
#include <metal/lambda/arg.hpp>
Description
Predefined placeholder.
◆ always
using metal::always = typedef typename detail::_always<val>::type |
#include <metal/lambda/always.hpp>
Description
Lifts a Value to an n-ary Lambda that always evaluates to that Value, regardless of the argument(s) it's invoked with.
Usage
For any and Value val
- Returns
- : Lambda
- Semantics:
- Equivalent to whereusing result = metal::lambda<expr>;
expr
is an Expression such thattemplate<class...>using expr = val;
Example
See Also
◆ apply
using metal::apply = typedef typename detail::_apply<lbd, seq>::type |
#include <metal/lambda/apply.hpp>
Description
Invokes a Lambda with the Values contained in a List.
Usage
- Returns
- : Value
- Semantics:
- If
l
contains elementsl[0], ..., l[m-1]
, thenusing result = metal::invoke<lbd, l[0], ..., l[m-1]>;
Example
See Also
◆ arg
using metal::arg = typedef typename detail::_arg<n>::type |
#include <metal/lambda/arg.hpp>
Description
A parametric Lambda that selects the n-th argument it is invoked with.
Usage
For any nonzero positive integral value n
- Returns
- : Lambda
- Semantics:
- Equivalent to whereusing result = metal::lambda<expr>;
expr
is an Expression such thatexpr<val_0, ..., val_n-1, ..., val_m-1>
yieldsval_n-1
.
Example
See Also
◆ as_lambda
using metal::as_lambda = typedef typename detail::_as_lambda<val>::type |
#include <metal/lambda/lambda.hpp>
Description
Given any Value that is a specialization of a template class or union whose template parameters are all themselves Values, constructs a Lambda that contains that template.
Usage
For any Value val
- Returns
- : Lambda
Example
See Also
◆ bind
using metal::bind = typedef typename detail::_bind<lbd, vals...>::type |
#include <metal/lambda/bind.hpp>
Description
Provides higher-order composition of Lambdas.
Usage
For any Lambdas lbd
and lbd_0, ..., lbd_n-1
- Returns
- : Lambda
- Semantics:
- If
lbd
holds Expressionf
and, likewise,lbd_0, ..., lbd_n-1
hold Expressionsf_0, ..., f_n-1
, thenwhereusing result = metal::lambda<g>;g
is an Expression such thattemplate<class... args>using g = f<f_0<args...>, ...<args...>, f_n-1<args...>>;
Example
See Also
◆ invoke
using metal::invoke = typedef metal::apply<lbd, metal::list<vals...> > |
#include <metal/lambda/invoke.hpp>
Description
Invokes a Lambda with the given Values as arguments.
Usage
For any Lambda lbd
and Values val_0, ..., val_n-1
- Returns
- : Value
- Semantics:
- If
lbd
holds Expressionexpr
, thenusing result = expr<val_0, ..., val_n-1>;
Example
See Also
- See also
- lambda, is_invocable
◆ is_invocable
using metal::is_invocable = typedef same<std::false_type, typename std::is_base_of<value<>, detail::caller<invoke, lbd, vals...> >::type> |
#include <metal/lambda/is_invocable.hpp>
Description
Checks whether a Lambda is invocable with some Values.
Usage
For any Lambda lbd
and Values val_0, ..., val_n-1
- Returns
- : Number
- Semantics:
- If
lbd
holds Expressionexpr
, andexpr<val_0, ..., val_n-1>
is well defined after template substitution, thenotherwiseusing result = metal::true_;using result = metal::false_;
Example
See Also
◆ is_lambda
using metal::is_lambda = typedef typename detail::_is_lambda<val>::type |
#include <metal/lambda/lambda.hpp>
Description
Checks whether some Value is a Lambda.
Usage
For any Value val
- Returns
- : Number
- Semantics:
- If
val
is a Lambda, thenotherwiseusing result = metal::true_;using result = metal::false_;
Example
See Also
◆ lambda
using metal::lambda = typedef { } |
#include <metal/lambda/lambda.hpp>
Description
Constructs a Lambda out of an Expression.
Usage
For any Expression expr
- Returns
- : Lambda
See Also
- See also
- is_lambda
◆ lazy
using metal::lazy = typedef metal::bind<metal::lambda<metal::eval>, metal::lambda<expr> > |
#include <metal/lambda/lazy.hpp>
Description
Constructs a Lambda out of a lazy expression, that is, an Expression whose return Value is defined as a nested typename type
.
Usage
For any Expression expr
- Returns
- : Lambda
- Semantics:
- Equivalent to whereusing result = metal::lambda<eager>;
eager
is an Expression such thattemplate<class... args>using eager = typename expr<args...>::type;
Example
See Also
◆ partial
using metal::partial = typedef typename detail::_partial<lbd, vals...>::type |
#include <metal/lambda/partial.hpp>
Description
Partially invokes a Lambda with some Values.
Usage
For any Lambda lbd
and Values val_0, ..., val_n-1
- Returns
- : Lambda
- Semantics:
- If
lbd
holds Expressionf
, thenwhereusing result = metal::lambda<g>;g
is an Expression such thattemplate<class... args>using g = f<val_0, ..., val_n-1, args...>;
Example
See Also
◆ trait
using metal::trait = typedef metal::bind<metal::lambda<metal::as_number>, metal::lambda<expr> > |
#include <metal/lambda/trait.hpp>
Description
Constructs a predicate out of a trait, that is a Lambda that evaluates to a Number, out of an Expression that defines a nested integral constant value
convertible to metal::int_.
Usage
For any Expression expr
- Returns
- : Lambda
- Semantics:
- Equivalent to whereusing result = metal::lambda<pred>;
pred
is an Expression such thattemplate<class... args>