3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/placeholders.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Metafunctions / Composition and Argument Binding / Placeholders |
namespace[placeholders](./placeholders.html){
typedef_unspecified__;
typedef[arg](./arg.html)<1>[\_1](./placeholders.html);
typedef[arg](./arg.html)<2>[\_2](./placeholders.html);_..._typedef[arg](./arg.html)<_n_> __n_;
}
using[placeholders](./placeholders.html)::_;
using[placeholders](./placeholders.html)::[\_1](./placeholders.html);
using[placeholders](./placeholders.html)::[\_2](./placeholders.html);_..._using[placeholders](./placeholders.html)::__n_;
A placeholder in a form _n is simply a synonym for the corresponding arg<n> specialization. The unnamed placeholder _ (underscore) carries special meaning in bind and lambda expressions, and does not have defined semantics outside of these contexts.
Placeholder names can be made available in the user namespace through using namespace mpl::placeholders; directive.
#include <[boost/mpl/placeholders.hpp](../../../../boost/mpl/placeholders.hpp)>
[Note: The include might be omitted when using placeholders to construct a Lambda Expression for passing it to MPL's own algorithm or metafunction: any library component that is documented to accept a lambda expression makes the placeholders implicitly available for the user code — end note]
None.
For any integral constant n in the range [1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY] and arbitrary types a1,... an:
typedef[apply\_wrap](./apply-wrap.html)_n_<__n_,a1,_..._a_n_>::type x;
| Return type: |
A type.
| | Semantics: |
Equivalent to
typedef[apply\_wrap](./apply-wrap.html)_n_<[arg](./arg.html)<_n_>,a1,_..._a_n_>::type x;
|
typedef[apply\_wrap](./apply-wrap.html)5<[\_1](./placeholders.html),bool,char,short,int,long >::type t1;
typedef[apply\_wrap](./apply-wrap.html)5<[\_3](./placeholders.html),bool,char,short,int,long >::type t3;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< t1, bool > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< t3, short > ));
Composition and Argument Binding, arg, lambda, bind, apply, apply_wrap
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams 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) |