[boost][range] - Resolution of Trac ticket 4355. Made the naming of the returned types from range adaptors consistent and documented.

[SVN r67420]
This commit is contained in:
Neil Groves
2010-12-22 23:42:02 +00:00
parent d68174a51d
commit dfa0764d53
127 changed files with 630 additions and 576 deletions

View File

@ -15,6 +15,7 @@
* [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `bi_pred(x,y)` is `true`.
* [*Throws:] Whatever the copy constructor of `bi_pred` might throw.
* [*Range Category:] __single_pass_range__
* [*Return Type:] `boost::adjacent_filtered_range<typeof(rng)>`
* [*Returned Range Category:] The minimum of the range category of `rng` and __forward_range__
[section:adjacent_filtered_example adjacent_filtered example]

View File

@ -15,6 +15,7 @@
* [*Postcondition:] For all adjacent elements `[x]` in the returned range, `pred(x)` is `true`.
* [*Throws:] Whatever the copy constructor of `pred` might throw.
* [*Range Category:] __forward_range__
* [*Range Return Type:] `boost::filtered_range<typeof(rng)>`
* [*Returned Range Category:] The minimum of the range category of `rng` and __bidirectional_range__
[section:filtered_example filtered example]

View File

@ -13,6 +13,7 @@
* [*Returns:] A range adapted to return both the element and the associated index. The returned range consists of iterators that have in addition to the usual iterator member functions an `index()` member function that returns the appropriate index for the element in the sequence corresponding with the iterator.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] `boost::indexed_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`
[section:indexed_example indexed example]

View File

@ -14,6 +14,7 @@
* [*Precondition:] The `value_type` of the range defines unary `operator*()`
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `*y` where `y` is the corresponding element in the original range.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] `boost::indirected_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`
[section:indirected_example indirected example]

View File

@ -14,6 +14,7 @@
* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.first` where `y` is the corresponding element in the original range.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] `boost::select_first_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:map_keys_example map_keys example]

View File

@ -14,6 +14,7 @@
* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] for constant ranges, `boost::select_second_const<typeof(rng)>` otherwise `boost:select_second_mutable<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:map_values_example map_values example]

View File

@ -16,6 +16,7 @@
* `old_value` is convertible to the `value_type` of the range.
* [*Postcondition:] For all elements `x` in the returned range, the value `x` is equal to the value of `(y == old_value) ? new_value : y` where `y` is the corresponding element in the original range.
* [*Range Category:] __forward_range__
* [*Range Return Type:] `boost::replaced_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:replaced_example replaced example]

View File

@ -16,6 +16,7 @@
* `new_value` is convertible to the `value_type` of the range.
* [*Postconditions:] For all elements `x` in the returned range, the value `x` is equal to the value of `pred(y) ? new_value : y` where `y` is the corresponding element in the original range.
* [*Range Category:] __forward_range__
* [*Range Return Type:] `boost::replaced_if_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:replaced_if_example replaced_if example]

View File

@ -13,6 +13,7 @@
* [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`.
* [*Range Category:] __bidirectional_range__
* [*Range Return Type:] `boost::reversed_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:reversed_example reversed example]

View File

@ -14,6 +14,7 @@
* [*Precondition:] `0 <= n && n <= m && m < distance(rng)`
* [*Returns:] `make_range(rng, n, m)`
* [*Range Category:] __random_access_range__
* [*Range Return Type:] `boost::sliced_range<typeof(rng)>`
* [*Returned Range Category:] __random_access_range__
[section:sliced_example sliced example]

View File

@ -41,6 +41,7 @@
* [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `regex_token_iterator`. The first iterator in the range would be constructed by forwarding all the arguments of `tokenized()` to the `regex_token_iterator` constructor.
* [*Throws:] Whatever constructing and copying equivalent `regex_token_iterator`s might throw.
* [*Range Category:] __random_access_range__
* [*Range Return Type:] `boost::tokenized_range<typeof(rng)>`
* [*Returned Range Category:] __random_access_range__
[endsect]

View File

@ -15,6 +15,7 @@
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `fun(y)` where `y` is the corresponding element in the original range.
* [*Throws:] Whatever the copy-constructor of `fun` might throw.
* [*Range Category:] __single_pass_range__
* [*Range Return Type:] `boost::transformed_range<typeof(rng)>`
* [*Returned Range Category:] The range category of `rng`.
[section:transformed_example transformed example]

View File

@ -14,6 +14,7 @@
* [*Precondition:] The `value_type` of the range is comparable with `operator==()`.
* [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `x==y` is false.
* [*Range Category:] __forward_range__
* [*Range Return Type:] `boost::uniqued_range<typeof(rng)>`
* [*Returned Range Category:] The minimum of the range concept of `rng` and __forward_range__.
[section:uniqued_example uniqued example]