mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 12:27:42 +02:00
Boost.Range added unit tests for extended algorithms.
Put the extended algorithms into boost::range in a similar manner to the standard algorithms. Added iota as an extended algorithm. Fixed defects in the extended algorithms brought to light by the new unit tests. [SVN r61042]
This commit is contained in:
28
doc/reference/algorithm_ext/iota.qbk
Normal file
28
doc/reference/algorithm_ext/iota.qbk
Normal file
@ -0,0 +1,28 @@
|
||||
[section:for_each for_each]
|
||||
|
||||
[heading Prototype]
|
||||
|
||||
``
|
||||
template<class SinglePassRange, class Value>
|
||||
iota(SinglePassRange& rng, Value x);
|
||||
``
|
||||
|
||||
[heading Description]
|
||||
|
||||
`iota` traverses forward through `rng`, each element `y` in `rng` is assigned a value equivalent
|
||||
to `x + boost::distance(boost::begin(rng), it)`
|
||||
|
||||
[heading Definition]
|
||||
|
||||
Defined in the header file `boost/range/algorithm_ext/iota.hpp`
|
||||
|
||||
[heading Requirements]
|
||||
|
||||
# `SinglePassRange` is a model of the __single_pass_range__ Concept.
|
||||
# `Value` is a model of the `Incrementable` Concept.
|
||||
|
||||
[heading Complexity]
|
||||
|
||||
Linear. Exactly `distance(rng)` assignments into `rng`.
|
||||
|
||||
[endsect]
|
@ -144,6 +144,7 @@ and there is no need to worry about generating an invalid range. Furthermore, if
|
||||
[include algorithm_ext/erase.qbk]
|
||||
[include algorithm_ext/for_each.qbk]
|
||||
[include algorithm_ext/insert.qbk]
|
||||
[include algorithm_ext/iota.qbk]
|
||||
[include algorithm_ext/overwrite.qbk]
|
||||
[include algorithm_ext/push_back.qbk]
|
||||
[include algorithm_ext/push_front.qbk]
|
||||
|
Reference in New Issue
Block a user