?? metafunctions-trivial.rst
字號:
The MPL provides a number of |Trivial Metafunction|\ s that a nothing more than
thin wrappers for a differently-named class nested type members. While important
in the context of `in-place metafunction composition`__, these metafunctions have
so little to them that presenting them in the same format as the rest of the
compoments in this manual would result in more boilerplate syntactic baggage than
the 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -