//// Copyright 2017 Peter Dimov Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt //// [#bind] # Bind, :toc: :toc-title: :idprefix: ## mp_arg template struct mp_arg; `mp_arg` is a quoted metafunction whose nested template `fn` returns the `I`-th zero-based element of `T...`. ## _1, ..., _9 using _1 = mp_arg<0>; using _2 = mp_arg<1>; using _3 = mp_arg<2>; using _4 = mp_arg<3>; using _5 = mp_arg<4>; using _6 = mp_arg<5>; using _7 = mp_arg<6>; using _8 = mp_arg<7>; using _9 = mp_arg<8>; `_1` to `_9` are placeholder types, the equivalent to the placeholders of `boost::bind`. ## mp_bind template class F, class... T> struct mp_bind; `mp_bind` is a quoted metafunction that implements the type-based equivalent of `boost::bind`. Its nested template `fn` returns `F`, where `V...` is `T...` with the placeholders replaced by the corresponding element of `U...` and the `mp_bind`, `mp_bind_front`, and `mp_bind_back` expressions replaced with their corresponding evaluations against `U...`. For example, `mp_bind>::fn` is `F>`. ## mp_bind_q template using mp_bind_q = mp_bind; As `mp_bind`, but takes a quoted metafunction. ## mp_bind_front template class F, class... T> struct mp_bind_front; `mp_bind_front` binds the leftmost arguments of `F` to `T...`. Its nested template `fn` returns `F`. ## mp_bind_front_q template using mp_bind_front_q = mp_bind_front; As `mp_bind_front`, but takes a quoted metafunction. ## mp_bind_back template class F, class... T> struct mp_bind_back; `mp_bind_back` binds the rightmost arguments of `F` to `T...`. Its nested template `fn` returns `F`. ## mp_bind_back_q template using mp_bind_back_q = mp_bind_back; As `mp_bind_back`, but takes a quoted metafunction.