#ifndef METAL_LAMBDA_BIND_HPP #define METAL_LAMBDA_BIND_HPP #include "../config.hpp" namespace metal { /// \cond namespace detail { template struct _bind; } /// \endcond /// \ingroup lambda /// /// ### Description /// Provides higher-order composition of \lambdas. /// /// \tip{Use metal::arg as a placeholder for the n-th argument.} /// /// ### Usage /// For any \lambdas `lbd` and `lbd_0, ..., lbd_n-1` /// \code /// using result = metal::bind; /// \endcode /// /// \returns: \lambda /// \semantics: /// If `lbd` holds \expression `f` and, likewise, `lbd_0, ..., lbd_n-1` /// hold \expressions `f_0, ..., f_n-1`, then /// \code /// using result = metal::lambda; /// \endcode /// where `g` is an \expression such that /// \code /// template /// using g = f, ..., f_n-1>; /// \endcode /// /// ### Example /// \snippet lambda.cpp bind /// /// ### See Also /// \see lambda, invoke, arg, always template using bind = typename detail::_bind::type; } #include "../detail/sfinae.hpp" #include "../lambda/lambda.hpp" namespace metal { /// \cond namespace detail { template struct _bind_impl { template