◆ distinct
using metal::distinct = typedef typename detail::_distinct<vals...>::type |
#include <metal/value/distinct.hpp>
Description
Checks whether no Values are identical.
Usage
For any Values val_0, ..., val_n-1
- Returns
- : Number
- Semantics:
- If at least two Values in
val_0, ..., val_n-1
are identical to each other, thenotherwiseusing result = metal::false_;using result = metal::true_;
Example
See Also
- See also
- same
◆ eval
using metal::eval = typedef typename val::type |
#include <metal/value/eval.hpp>
Description
Evaluates lazy constructs by retrieving their nested typename type
.
Usage
For any Value val
- Returns
- : Value
- Semantics:
- Equivalent to using result = typename val::type;
Example
See Also
◆ fold_left
using metal::fold_left = typedef detail::call<detail::_fold_left<lbd>::template type, vals...> |
#include <metal/value/fold_left.hpp>
Description
Computes the recursive invocation of a binary Lambda with the result of the previous invocation and each Value, from the first to the last.
Usage
For any Lambda lbd
, and Values val_0, ..., val_n-1
- Returns
- : Value
- Semantics:
- Equivalent to whereusing result =lbd(... lbd(lbd(val_0, val_1), val_2), ..., val_n-1)
lbd(x, y)
stands formetal::invoke<lbd, x, y>
.
Example
See Also
- See also
- fold_right
◆ fold_right
using metal::fold_right = typedef detail::call<detail::_fold_right<lbd>::template type, vals...> |
#include <metal/value/fold_right.hpp>
Description
Computes the recursive invocation of a binary Lambda with the result of the previous invocation and each Value, from the last to the first.
Usage
For any Lambda lbd
, and Values val_0, ..., val_n-1
- Returns
- : Value
- Semantics:
- Equivalent to whereusing result =lbd(val_0, ..., lbd(val_n-3, lbd(val_n-2, val_n-1)), ...)
lbd(x, y)
stands formetal::invoke<lbd, x, y>
.
Example
See Also
- See also
- fold_right
◆ identity
using metal::identity = typedef val |
#include <metal/value/identity.hpp>
Description
The identity Expression.
Usage
For any Value val
- Returns
- : Value
- Semantics:
- Equivalent to using result = val;
Example
See Also
◆ is_value
using metal::is_value = typedef metal::true_ |
#include <metal/value/value.hpp>
Description
A tautological predicate that checks whether some type is a Value.
metal::is_value
to trigger SFINAE.Usage
For any Value val
- Returns
- : Number
- Semantics:
- Equivalent to using result = metal::true_;
Example
See Also
◆ nil
using metal::nil = typedef metal::value<> |
#include <metal/value/value.hpp>
Description
An empty metal::value
.
Usage
- Returns
- : Value
- Semantics:
- Equivalent to using result = {};
See Also
◆ same
using metal::same = typedef typename detail::_same<vals...>::type |
#include <metal/value/same.hpp>
Description
Checks whether all Values are identical.
Usage
For any Values val_0, ..., val_n-1
- Returns
- : Number
- Semantics:
- If at least two Values in
val_0, ..., val_n-1
are not identical to each other, thenotherwiseusing result = metal::false_;using result = metal::true_;
Example
See Also
- See also
- distinct
◆ value
using metal::value = typedef { using type = val |
#include <metal/value/value.hpp>
Description
Constructs a Value that is guaranteed not to be a Number, or a Lambda or a List, out of any other Value.
The original Value may be retrieved back by naming the nested typename type
, unless metal::value
is empty, in which case type
is undefined.
metal::value
to prevent undesired template pattern matching.Usage
For any Value val
- Returns
- : Value
- Semantics:
- Equivalent to using result = { using type = val; };