File size: 814 Bytes
8ae5fc5 | 1 2 3 4 5 6 7 8 9 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 | #ifndef METAL_LAMBDA_INVOKE_HPP
#define METAL_LAMBDA_INVOKE_HPP
#include "../config.hpp"
#include "../lambda/apply.hpp"
#include "../list/list.hpp"
namespace metal {
/// \ingroup lambda
///
/// ### Description
/// Invokes a \lambda with the given \values as arguments.
///
/// ### Usage
/// For any \lambda `lbd` and \values `val_0, ..., val_n-1`
/// \code
/// using result = metal::invoke<lbd, val_0, ..., val_n-1>;
/// \endcode
///
/// \returns: \value
/// \semantics:
/// If `lbd` holds \expression `expr`, then
/// \code
/// using result = expr<val_0, ..., val_n-1>;
/// \endcode
///
/// ### Example
/// \snippet lambda.cpp invoke
///
/// ### See Also
/// \see lambda, is_invocable
template <class lbd, class... vals>
using invoke = metal::apply<lbd, metal::list<vals...>>;
}
#endif
|