Back to Arangodb

Metafunction Class

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/metafunction-class.html

3.12.9.13.0 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Metafunctions / Concepts / Metafunction Class |

Metafunction Class

Summary

A metafunction class is a certain form of metafunction representation that enables higher-order metaprogramming. More precisely, it's a class with a publicly-accessible nested Metafunction called apply. Correspondingly, a metafunction class invocation is defined as invocation of its nested apply metafunction.

Expression requirements

In the following table and subsequent specifications, f is a Metafunction Class.

ExpressionTypeComplexity
f::apply::typeAny typeUnspecified.
f::apply<>::typeAny typeUnspecified.
f::apply<a1,...an>::typeAny typeUnspecified.

Expression semantics

typedef f::[apply](./apply.html)::type x;

| Precondition: | f is a nullary Metafunction Class; f::apply::type is a type-name. | | Semantics: | x is the result of the metafunction class invocation. |

typedef f::[apply](./apply.html)<>::type x;

| Precondition: | f is a nullary Metafunction Class; f::apply<>::type is a type-name. | | Semantics: | x is the result of the metafunction class invocation. |

typedef f::[apply](./apply.html)<a1,_..._a_n_>::type x;

| Precondition: | f is an n-ary metafunction class; apply is a Metafunction. | | Semantics: | x is the result of the metafunction class invocation with the actual arguments a1,... an. |

Models

See also

Metafunctions, Metafunction, Lambda Expression, invocation, apply_wrap, bind, quote

| 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) |