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

📄 algorithms.rst

📁 C++的一个好库。。。现在很流行
💻 RST
字号:

The MPL provides a broad range of fundamental algorithms aimed to 
satisfy the majority of sequential compile-time data processing 
needs. The algorithms include compile-time counterparts
of many of the STL algorithms, iteration algorithms borrowed from 
functional programming languages, and more.

Unlike the algorithms in the C++ Standard Library, which operate on
implict *iterator ranges*, the majority of MPL counterparts take
and return *sequences*. This derivation is not dictated by the 
functional nature of C++ compile-time computations per se, but
rather by a desire to improve general usability of the library,
making programming with compile-time data structures as enjoyable 
as possible.

.. This can be seen as a further generalization and extension of 
   the STL's conceptual framework.

In the spirit of the STL, MPL algorithms are *generic*, meaning 
that they are not tied to particular sequence class 
implementations, and can operate on a wide range of arguments as 
long as they satisfy the documented requirements. The requirements
are formulated in terms of concepts. Under the hood, 
algorithms are decoupled from concrete sequence 
implementations by operating on |iterators|.

All MPL algorithms can be sorted into three 
major categories: iteration algorithms, querying algorithms, and 
transformation algorithms. The transformation algorithms introduce 
an associated |Inserter| concept, a rough equivalent for the notion of 
|Output Iterator| in the Standard Library. Moreover, every 
transformation algorithm provides a ``reverse_`` counterpart, 
allowing for a wider range of efficient transformations |--| a
common functionality documented by the |Reversible Algorithm| 
concept.


.. |Output Iterator| replace:: `Output Iterator <http://www.sgi.com/tech/stl/OutputIterator.html>`_
.. |sequence algorithms| replace:: `sequence algorithms`__
__ `Algorithms`_

⌨️ 快捷键说明

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