metafunctions-trivial.rst
来自「Boost provides free peer-reviewed portab」· RST 代码 · 共 67 行
RST
67 行
.. 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)The MPL provides a number of |Trivial Metafunction|\ s that a nothing more thanthin wrappers for a differently-named class nested type members. While importantin the context of `in-place metafunction composition`__, these metafunctions haveso little to them that presenting them in the same format as the rest of thecompoments in this manual would result in more boilerplate syntactic baggage thanthe actual content. To avoid this problem, we instead factor out the common metafunctions' requirements into the `corresponding concept`__ and gather all of them in a single place |--| this subsection |--| in a compact table form that is presented below.__ `Composition and Argument Binding`___ `Trivial Metafunction`_Trivial Metafunctions Summary=============================In the following table, ``x`` is an arbitrary class type... |first| replace:: |``first``|__.. |``first``| replace:: :refentry:`first`__ `trivial-first`_.. |second| replace:: |``second``|__.. |``second``| replace:: :refentry:`second`__ `trivial-second`_.. |base| replace:: |``base``|__.. |``base``| replace:: :refentry:`base`__ `trivial-base`_.. _`trivial-first`:.. _`trivial-second`:.. _`trivial-base`:+---------------------------+-------------------------------------------+| Metafunction | Header |+===========================+===========================================+| ``first<x>::type`` | ``#include <boost/mpl/pair.hpp>`` |+---------------------------+-------------------------------------------+| ``second<x>::type`` | ``#include <boost/mpl/pair.hpp>`` |+---------------------------+-------------------------------------------+| ``base<x>::type`` | ``#include <boost/mpl/base.hpp>`` |+---------------------------+-------------------------------------------+See Also--------|Metafunctions|, |Trivial Metafunction|.. |Trivial Metafunctions| replace:: `Trivial Metafunctions`____ `Trivial`_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?