⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 metafunctionclass.rst

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 RST
字号:
.. Metafunctions/Concepts//Metafunction Class |20.. Copyright Aleksey Gurtovoy, David Abrahams 2007... 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)Metafunction Class==================Summary-------A *metafunction class* is a certain form of metafunction representation that enables higher-order metaprogramming. More precisely, it's a classwith a publicly-accessible nested |metafunction| called ``apply``. Correspondingly, a metafunction class invocation is defined as invocationof its nested ``apply`` metafunction.Expression requirements-----------------------|In the following table...| ``f`` is a |Metafunction Class|.+-------------------------------+---------------------------+---------------------------+| Expression                    | Type                      | Complexity                |+===============================+===========================+===========================+| ``f::apply::type``            | Any type                  | Unspecified.              |+-------------------------------+---------------------------+---------------------------+| ``f::apply<>::type``          | Any type                  | Unspecified.              |+-------------------------------+---------------------------+---------------------------+| ``f::apply<a1,...an>::type``  | Any type                  | Unspecified.              |+-------------------------------+---------------------------+---------------------------+Expression semantics--------------------.. parsed-literal::    typedef f::apply::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... ..................................................................................... parsed-literal::    typedef f::apply<>::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... ..................................................................................... parsed-literal::    typedef f::apply<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------* |always|* |arg|* |quote|* |numeric_cast|* |unpack_args|See also--------|Metafunctions|, |Metafunction|, |Lambda Expression|, |Invocation|, |apply_wrap|, |bind|, |quote|

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -