]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpl/doc/src/refmanual/Algorithms.rst
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / mpl / doc / src / refmanual / Algorithms.rst
CommitLineData
7c673cae
FG
1
2The MPL provides a broad range of fundamental algorithms aimed to
3satisfy the majority of sequential compile-time data processing
4needs. The algorithms include compile-time counterparts
5of many of the STL algorithms, iteration algorithms borrowed from
6functional programming languages, and more.
7
8Unlike the algorithms in the C++ Standard Library, which operate on
9implict *iterator ranges*, the majority of MPL counterparts take
10and return *sequences*. This derivation is not dictated by the
11functional nature of C++ compile-time computations per se, but
12rather by a desire to improve general usability of the library,
13making programming with compile-time data structures as enjoyable
14as possible.
15
16.. This can be seen as a further generalization and extension of
17 the STL's conceptual framework.
18
19In the spirit of the STL, MPL algorithms are *generic*, meaning
20that they are not tied to particular sequence class
21implementations, and can operate on a wide range of arguments as
22long as they satisfy the documented requirements. The requirements
23are formulated in terms of concepts. Under the hood,
24algorithms are decoupled from concrete sequence
25implementations by operating on |iterators|.
26
27All MPL algorithms can be sorted into three
28major categories: iteration algorithms, querying algorithms, and
29transformation algorithms. The transformation algorithms introduce
30an associated |Inserter| concept, a rough equivalent for the notion of
31|Output Iterator| in the Standard Library. Moreover, every
32transformation algorithm provides a ``reverse_`` counterpart,
33allowing for a wider range of efficient transformations |--| a
34common functionality documented by the |Reversible Algorithm|
35concept.
36
37
38.. |Output Iterator| replace:: `Output Iterator <http://www.sgi.com/tech/stl/OutputIterator.html>`__
39.. |sequence algorithms| replace:: `sequence algorithms`_
40.. _`sequence algorithms`: `Algorithms`_
41
42
43