1 .. Metafunctions/Concepts//Metafunction Class |20
9 A *metafunction class* is a certain form of metafunction representation
10 that enables higher-order metaprogramming. More precisely, it's a class
11 with a publicly-accessible nested |metafunction| called ``apply``.
12 Correspondingly, a metafunction class invocation is defined as invocation
13 of its nested ``apply`` metafunction.
16 Expression requirements
17 -----------------------
19 |In the following table...| ``f`` is a |Metafunction Class|.
21 +-------------------------------+---------------------------+---------------------------+
22 | Expression | Type | Complexity |
23 +===============================+===========================+===========================+
24 | ``f::apply::type`` | Any type | Unspecified. |
25 +-------------------------------+---------------------------+---------------------------+
26 | ``f::apply<>::type`` | Any type | Unspecified. |
27 +-------------------------------+---------------------------+---------------------------+
28 | ``f::apply<a1,...an>::type`` | Any type | Unspecified. |
29 +-------------------------------+---------------------------+---------------------------+
37 typedef f::apply::type x;
40 ``f`` is a nullary |Metafunction Class|; ``f::apply::type`` is a *type-name*.
43 ``x`` is the result of the metafunction class invocation.
46 .. ...................................................................................
50 typedef f::apply<>::type x;
53 ``f`` is a nullary |Metafunction Class|; ``f::apply<>::type`` is a *type-name*.
56 ``x`` is the result of the metafunction class invocation.
59 .. ...................................................................................
63 typedef f::apply<a1,\ |...|\ a\ *n*\>::type x;
66 ``f`` is an *n*-ary metafunction class; ``apply`` is a |Metafunction|.
69 ``x`` is the result of the metafunction class
70 invocation with the actual arguments |a1...an|.
86 |Metafunctions|, |Metafunction|, |Lambda Expression|, |Invocation|, |apply_wrap|, |bind|, |quote|
89 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
90 Distributed under the Boost Software License, Version 1.0. (See accompanying
91 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)