mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-30 12:57:23 +02:00
Whitespace cleanup and formatting fixes in docs.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
|
||||
[section:adaptor Iterator Adaptor]
|
||||
|
||||
The `iterator_adaptor` class template adapts some `Base` [#base]_
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:archetypes Iterator Archetypes]
|
||||
|
||||
The `iterator_archetype` class constructs a minimal implementation of
|
||||
@ -156,5 +155,4 @@ the iterator concept specified by `AccessCategory` and
|
||||
arguments. `iterator_archetype` does not model any other access
|
||||
concepts or any more derived traversal concepts.
|
||||
|
||||
|
||||
[endsect]
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:concepts Iterator Concepts]
|
||||
|
||||
[section:access Access]
|
||||
@ -326,13 +325,13 @@ constant object of type `Distance`.
|
||||
[pre: there exists a value `n` of `Distance` such that `a + n == b`. `b == a + (b - a)`.]
|
||||
]
|
||||
[
|
||||
[`a\[n\]`]
|
||||
[`a[n]`]
|
||||
[convertible to T]
|
||||
[`*(a + n)`]
|
||||
[pre: a is a *Readable Iterator*]
|
||||
]
|
||||
[
|
||||
[`a\[n\] = v`]
|
||||
[`a[n] = v`]
|
||||
[convertible to T]
|
||||
[`*(a + n) = v`]
|
||||
[pre: a is a *Writable iterator*]
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:counting Counting Iterator]
|
||||
|
||||
A `counting_iterator` adapts an object by adding an `operator*` that
|
||||
@ -36,8 +35,10 @@ into the first array via indirection through the second array.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
indirectly printing out the numbers from 0 to 7
|
||||
0 1 2 3 4 5 6
|
||||
]
|
||||
|
||||
The source code for this example can be found [example_link counting_iterator_example.cpp..here].
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:facade Iterator Facade]
|
||||
|
||||
While the iterator interface is rich, there is a core subset of the
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:facade_tutorial Tutorial]
|
||||
|
||||
In this section we'll walk through the implementation of a few
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:filter Filter Iterator]
|
||||
|
||||
The filter iterator adaptor creates a view of an iterator range in
|
||||
@ -19,7 +18,6 @@ This example uses `filter_iterator` and then
|
||||
array of integers. Then `make_filter_iterator` is is used to output
|
||||
the integers greater than `-2`.
|
||||
|
||||
|
||||
struct is_positive_number {
|
||||
bool operator()(int x) { return 0 < x; }
|
||||
};
|
||||
@ -70,10 +68,11 @@ the integers greater than `-2`.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
4 5 8
|
||||
4 5 8
|
||||
0 -1 4 5 8
|
||||
|
||||
]
|
||||
|
||||
The source code for this example can be found [example_link filter_iterator_example.cpp..here].
|
||||
|
||||
@ -238,5 +237,4 @@ operations.
|
||||
or `m_pred(*m_iter) == true`.[br]
|
||||
[*Returns: ] `*this`
|
||||
|
||||
|
||||
[endsect]
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:function_output Function Output Iterator]
|
||||
|
||||
The function output iterator adaptor makes it easier to create custom
|
||||
|
@ -66,10 +66,11 @@ using the `make_indirect_iterator` helper function.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
a,b,c,d,e,f,g,
|
||||
b,c,d,e,f,g,h,
|
||||
a,b,c,d,e,f,g,
|
||||
|
||||
]
|
||||
|
||||
The source code for this example can be found
|
||||
[example_link indirect_iterator_example.cpp..here].
|
||||
|
@ -305,4 +305,3 @@ library you see today.
|
||||
Patterns, C++ Report, February 1995, pp. 24-27.]
|
||||
|
||||
[endsect]
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:iterator_traits Iterator Traits]
|
||||
|
||||
`std::iterator_traits` provides access to five associated types
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:permutation Permutation Iterator]
|
||||
|
||||
The permutation iterator adaptor provides a permuted view of a given
|
||||
@ -75,13 +74,14 @@ past-the-end iterator to the indices.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
The original range is : 0 1 2 3 4 5 6 7 8 9
|
||||
The reindexing scheme is : 9 8 7 6
|
||||
The permutated range is : 9 8 7 6
|
||||
Elements at even indices in the permutation : 9 7
|
||||
Permutation backwards : 6 7 8 9
|
||||
Iterate backward with stride 2 : 6 8
|
||||
|
||||
]
|
||||
|
||||
The source code for this example can be found
|
||||
[example_link permutation_iter_example.cpp..here].
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:reverse Reverse Iterator]
|
||||
|
||||
The reverse iterator adaptor iterates through the adapted iterator
|
||||
@ -9,7 +8,6 @@ range in the opposite direction.
|
||||
The following example prints an array of characters in reverse order
|
||||
using `reverse_iterator`.
|
||||
|
||||
|
||||
char letters_[] = "hello world!";
|
||||
const int N = sizeof(letters_)/sizeof(char) - 1;
|
||||
typedef char* base_iterator;
|
||||
@ -35,10 +33,11 @@ using `reverse_iterator`.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
original sequence of letters: hello world!
|
||||
sequence in reverse order: !dlrow olleh
|
||||
sequence in double-reversed (normal) order: hello world!
|
||||
|
||||
]
|
||||
|
||||
The source code for this example can be found
|
||||
[example_link reverse_iterator_example.cpp..here].
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:shared_container Shared Container Iterator]
|
||||
|
||||
Defined in header [@../../../boost/shared_container_iterator.hpp `boost/shared_container_iterator.hpp`].
|
||||
@ -97,7 +96,9 @@ the underlying vector and thereby extend the container's lifetime.
|
||||
|
||||
The output from this part is:
|
||||
|
||||
[pre
|
||||
0,1,2,3,4,5,
|
||||
]
|
||||
|
||||
[table Template Parameters
|
||||
[[Parameter][Description]]
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:specialized Specialized Adaptors]
|
||||
|
||||
[include ./counting_iterator.qbk]
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:transform Transform Iterator]
|
||||
|
||||
The transform iterator adapts an iterator by modifying the
|
||||
@ -37,11 +36,12 @@ in this example.
|
||||
|
||||
The output is:
|
||||
|
||||
[pre
|
||||
multiplying the array by 2:
|
||||
2 4 6 8 10 12 14 16
|
||||
adding 4 to each element in the array:
|
||||
5 6 7 8 9 10 11 12
|
||||
|
||||
]
|
||||
|
||||
The source code for this example can be found
|
||||
[example_link transform_iterator_example.cpp..here].
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[section:zip Zip Iterator]
|
||||
|
||||
The zip iterator provides the ability to parallel-iterate
|
||||
|
Reference in New Issue
Block a user