diff --git a/doc/html/index.html b/doc/html/index.html index f6095bd..e164ebd 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@
Copyright © 2003 -2010 Thorsten Ottosen, Neil Groves
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -142,7 +142,7 @@Last revised: April 28, 2010 at 17:51:33 GMT |
+Last revised: April 28, 2010 at 19:00:21 GMT |
@@ -75,7 +75,7 @@ Traversal Iterator.
diff --git a/doc/html/range/concepts/concept_checking.html b/doc/html/range/concepts/concept_checking.html index 30d3850..b9db1e4 100644 --- a/doc/html/range/concepts/concept_checking.html +++ b/doc/html/range/concepts/concept_checking.html @@ -79,7 +79,7 @@
diff --git a/doc/html/range/concepts/forward_range.html b/doc/html/range/concepts/forward_range.html index 61ec9e8..a57c6ce 100644 --- a/doc/html/range/concepts/forward_range.html +++ b/doc/html/range/concepts/forward_range.html @@ -27,7 +27,7 @@ Forward Range
@@ -73,14 +73,14 @@ Traversal Iterator.
diff --git a/doc/html/range/concepts/random_access_range.html b/doc/html/range/concepts/random_access_range.html index 379410e..6c88e2a 100644 --- a/doc/html/range/concepts/random_access_range.html +++ b/doc/html/range/concepts/random_access_range.html @@ -27,7 +27,7 @@ Random Access Range
@@ -35,7 +35,7 @@ Access Traversal Iterator.
boost::size(a)
completes in amortized constant time.
@@ -73,7 +73,7 @@ Pass Iterator.
diff --git a/doc/html/range/history_ack.html b/doc/html/range/history_ack.html index 37d497d..9d5d3d6 100644 --- a/doc/html/range/history_ack.html +++ b/doc/html/range/history_ack.html @@ -26,7 +26,7 @@ History and Acknowledgement
- Below are given a small example (the complete example can be found here - ): -
+-
// -// example: extracting bounds in a generic algorithm -// -template< class ForwardReadableRange, class T > -inline typename boost::range_iterator< ForwardReadableRange >::type -find( ForwardReadableRange& c, const T& value ) -{ - return std::find( boost::begin( c ), boost::end( c ), value ); -} - -template< class ForwardReadableRange, class T > -inline typename boost::range_iterator< const ForwardReadableRange >::type -find( const ForwardReadableRange& c, const T& value ) -{ - return std::find( boost::begin( c ), boost::end( c ), value ); -} - -// -// replace first value and return its index -// -template< class ForwardReadableWriteableRange, class T > -inline typename boost::range_size< ForwardReadableWriteableRange >::type -my_generic_replace( ForwardReadableWriteableRange& c, const T& value, const T& replacement ) -{ - typename boost::range_iterator< ForwardReadableWriteableRange >::type found = find( c, value ); - - if( found != boost::end( c ) ) - *found = replacement; - return std::distance( boost::begin( c ), found ); -} - -// -// usage -// -const int N = 5; -std::vector<int> my_vector; -int values[] = { 1,2,3,4,5,6,7,8,9 }; - -my_vector.assign( values, boost::end( values ) ); -typedef std::vector<int>::iterator iterator; -std::pair<iterator,iterator> my_view( boost::begin( my_vector ), - boost::begin( my_vector ) + N ); -char str_val[] = "a string"; -char* str = str_val; - -std::cout << my_generic_replace( my_vector, 4, 2 ); -std::cout << my_generic_replace( my_view, 4, 2 ); -std::cout << my_generic_replace( str, 'a', 'b' ); - -// prints '3', '5' and '0' -+
using namespace boost; +using namespace boost::adaptors; +for_each( my_map | map_values, fn ); +
+
+ +
+using namespace boost; +using namespace boost::adaptors; +for_each( my_map | map_keys, fn ); ++
+
+target
+ + +
+using namespace boost; +using namespace boost::adaptors; +// Assume that is_even is a predicate that has been implemented elsewhere... +push_back(target, my_map | map_values | filtered(is_even()) | reversed); +
- By using the free-standing functions and metafunctions,
- the code automatically works for all the types supported by this library; now
- and in the future. Notice that we have to provide two versions of find()
since
- we cannot forward a non-const rvalue with reference arguments (see this article
- about The
- Forwarding Problem ).
diff --git a/doc/html/range/reference/adaptors/adaptors_reference.html b/doc/html/range/reference/adaptors/adaptors_reference.html deleted file mode 100644 index d284888..0000000 --- a/doc/html/range/reference/adaptors/adaptors_reference.html +++ /dev/null @@ -1,75 +0,0 @@ - -
- -![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- | - |
operator|()
.
rng
- and Bidirectional
- Range.
+ and __forward_passrange_.
@@ -48,7 +48,7 @@
@@ -60,14 +60,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/heap_algorithm.hpp
diff --git a/doc/html/range/reference/algorithms/heap/pop_heap.html b/doc/html/range/reference/algorithms/heap/pop_heap.html index 6cf064d..dece502 100644 --- a/doc/html/range/reference/algorithms/heap/pop_heap.html +++ b/doc/html/range/reference/algorithms/heap/pop_heap.html @@ -27,7 +27,7 @@ pop_heap
@@ -48,7 +48,7 @@
@@ -62,14 +62,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/heap_algorithm.hpp
diff --git a/doc/html/range/reference/algorithms/heap/push_heap.html b/doc/html/range/reference/algorithms/heap/push_heap.html index f4497b6..ac81f7c 100644 --- a/doc/html/range/reference/algorithms/heap/push_heap.html +++ b/doc/html/range/reference/algorithms/heap/push_heap.html @@ -27,7 +27,7 @@ push_heap
@@ -48,7 +48,7 @@
@@ -62,14 +62,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/heap_algorithm.hpp
diff --git a/doc/html/range/reference/algorithms/heap/sort_heap.html b/doc/html/range/reference/algorithms/heap/sort_heap.html index c5bb9b3..90695dd 100644 --- a/doc/html/range/reference/algorithms/heap/sort_heap.html +++ b/doc/html/range/reference/algorithms/heap/sort_heap.html @@ -27,7 +27,7 @@ sort_heap
@@ -48,7 +48,7 @@
@@ -61,14 +61,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/heap_algorithm.hpp
rng
is a heap.
diff --git a/doc/html/range/reference/algorithms/mutating/copy.html b/doc/html/range/reference/algorithms/mutating/copy.html index 854c4ac..c4bcea4 100644 --- a/doc/html/range/reference/algorithms/mutating/copy.html +++ b/doc/html/range/reference/algorithms/mutating/copy.html @@ -27,7 +27,7 @@ copy
@@ -39,7 +39,7 @@
@@ -50,14 +50,14 @@ distance(source_rng)
Defined in the header file boost/range/algorithm/copy.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/copy_backward.html b/doc/html/range/reference/algorithms/mutating/copy_backward.html index c1d1266..4c90f5e 100644 --- a/doc/html/range/reference/algorithms/mutating/copy_backward.html +++ b/doc/html/range/reference/algorithms/mutating/copy_backward.html @@ -28,7 +28,7 @@ copy_backward
@@ -42,7 +42,7 @@
@@ -60,14 +60,14 @@ denotes the end of the output sequence.
Defined in the header file boost/range/algorithm/copy_backward.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/fill.html b/doc/html/range/reference/algorithms/mutating/fill.html index 5f5da38..11b5e4d 100644 --- a/doc/html/range/reference/algorithms/mutating/fill.html +++ b/doc/html/range/reference/algorithms/mutating/fill.html @@ -27,7 +27,7 @@ fill
@@ -39,7 +39,7 @@
@@ -48,14 +48,14 @@
in the range rng
.
Defined in the header file boost/range/algorithm/fill.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/fill_n.html b/doc/html/range/reference/algorithms/mutating/fill_n.html index 5d09a06..f4fa658 100644 --- a/doc/html/range/reference/algorithms/mutating/fill_n.html +++ b/doc/html/range/reference/algorithms/mutating/fill_n.html @@ -27,7 +27,7 @@ fill_n
@@ -39,7 +39,7 @@
@@ -47,14 +47,14 @@
val
to n
elements in the range rng
begining with boost::begin(rng)
.
Defined in the header file boost/range/algorithm/fill_n.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/generate.html b/doc/html/range/reference/algorithms/mutating/generate.html index 7bdf2ff..75d71e8 100644 --- a/doc/html/range/reference/algorithms/mutating/generate.html +++ b/doc/html/range/reference/algorithms/mutating/generate.html @@ -27,7 +27,7 @@ generate
@@ -42,7 +42,7 @@
@@ -52,14 +52,14 @@ Returns the resultant range.
Defined in the header file boost/range/algorithm/generate.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/inplace_merge.html b/doc/html/range/reference/algorithms/mutating/inplace_merge.html index 8d4d6c5..acd871d 100644 --- a/doc/html/range/reference/algorithms/mutating/inplace_merge.html +++ b/doc/html/range/reference/algorithms/mutating/inplace_merge.html @@ -28,7 +28,7 @@ inplace_merge
@@ -59,7 +59,7 @@
@@ -72,14 +72,14 @@ input range is preserved.
Defined in the header file boost/range/algorithm/inplace_merge.hpp
@@ -116,11 +116,11 @@ argument types.
diff --git a/doc/html/range/reference/algorithms/mutating/merge.html b/doc/html/range/reference/algorithms/mutating/merge.html index d66fc41..b068a7e 100644 --- a/doc/html/range/reference/algorithms/mutating/merge.html +++ b/doc/html/range/reference/algorithms/mutating/merge.html @@ -27,7 +27,7 @@ merge
@@ -56,7 +56,7 @@
@@ -75,14 +75,14 @@
version uses the predicate instead of operator<()
.
Defined in the header file boost/range/algorithm/merge.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/nth_element.html b/doc/html/range/reference/algorithms/mutating/nth_element.html index cd13253..9814a4e 100644 --- a/doc/html/range/reference/algorithms/mutating/nth_element.html +++ b/doc/html/range/reference/algorithms/mutating/nth_element.html @@ -28,7 +28,7 @@ nth_element
@@ -59,7 +59,7 @@
@@ -70,14 +70,14 @@
is the same as the element that would be in that position if rng
has been sorted.
Defined in the header file boost/range/algorithm/nth_element.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/partial_sort.html b/doc/html/range/reference/algorithms/mutating/partial_sort.html index 7938cd3..5ae4453 100644 --- a/doc/html/range/reference/algorithms/mutating/partial_sort.html +++ b/doc/html/range/reference/algorithms/mutating/partial_sort.html @@ -28,7 +28,7 @@ partial_sort
@@ -59,7 +59,7 @@
@@ -75,14 +75,14 @@ predicate instead.
Defined in the header file boost/range/algorithm/partial_sort.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/partition.html b/doc/html/range/reference/algorithms/mutating/partition.html index 79bd88c..7514afe 100644 --- a/doc/html/range/reference/algorithms/mutating/partition.html +++ b/doc/html/range/reference/algorithms/mutating/partition.html @@ -27,7 +27,7 @@ partition
@@ -66,7 +66,7 @@
@@ -80,14 +80,14 @@ corresponds to the middle iterator.
Defined in the header file boost/range/algorithm/partition.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/random_shuffle.html b/doc/html/range/reference/algorithms/mutating/random_shuffle.html index d94fc5a..0481481 100644 --- a/doc/html/range/reference/algorithms/mutating/random_shuffle.html +++ b/doc/html/range/reference/algorithms/mutating/random_shuffle.html @@ -28,7 +28,7 @@ random_shuffle
@@ -49,7 +49,7 @@
@@ -61,14 +61,14 @@ the shuffles range.
Defined in the header file boost/range/algorithm/random_shuffle.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/remove.html b/doc/html/range/reference/algorithms/mutating/remove.html index de178ea..6491a8e 100644 --- a/doc/html/range/reference/algorithms/mutating/remove.html +++ b/doc/html/range/reference/algorithms/mutating/remove.html @@ -27,7 +27,7 @@ remove
@@ -66,7 +66,7 @@
@@ -83,14 +83,14 @@ are dereferenceable, but the elements are unspecified.
Defined in the header file boost/range/algorithm/remove.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy.html b/doc/html/range/reference/algorithms/mutating/remove_copy.html index b775716..67afb34 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_copy.html +++ b/doc/html/range/reference/algorithms/mutating/remove_copy.html @@ -28,7 +28,7 @@ remove_copy
@@ -45,7 +45,7 @@
@@ -54,14 +54,14 @@
rng
for which x == val
is false
.
Defined in the header file boost/range/algorithm/remove_copy.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy_if.html b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html index 3f25b68..404c434 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_copy_if.html +++ b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html @@ -28,7 +28,7 @@ remove_copy_if
@@ -45,7 +45,7 @@
@@ -55,14 +55,14 @@
is false
.
Defined in the header file boost/range/algorithm/remove_copy_if.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/remove_if.html b/doc/html/range/reference/algorithms/mutating/remove_if.html index 95a933c..de07e74 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_if.html +++ b/doc/html/range/reference/algorithms/mutating/remove_if.html @@ -27,7 +27,7 @@ remove_if
@@ -66,7 +66,7 @@
@@ -82,14 +82,14 @@ are unspecified.
Defined in the header file boost/range/algorithm/remove_if.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/replace.html b/doc/html/range/reference/algorithms/mutating/replace.html index abbffc3..60ee7e6 100644 --- a/doc/html/range/reference/algorithms/mutating/replace.html +++ b/doc/html/range/reference/algorithms/mutating/replace.html @@ -27,7 +27,7 @@ replace
@@ -48,7 +48,7 @@
@@ -57,14 +57,14 @@
Return a reference to rng
.
Defined in the header file boost/range/algorithm/replace.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy.html b/doc/html/range/reference/algorithms/mutating/replace_copy.html index a5678bd..5b5e346 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_copy.html +++ b/doc/html/range/reference/algorithms/mutating/replace_copy.html @@ -28,7 +28,7 @@ replace_copy
@@ -41,7 +41,7 @@
@@ -54,14 +54,14 @@ x.
Defined in the header file boost/range/algorithm/replace_copy.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy_if.html b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html index 17607de..3c97ba1 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_copy_if.html +++ b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html @@ -28,7 +28,7 @@ replace_copy_if
@@ -41,7 +41,7 @@
@@ -52,14 +52,14 @@ : x.
Defined in the header file boost/range/algorithm/replace_copy_if.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/replace_if.html b/doc/html/range/reference/algorithms/mutating/replace_if.html index 110c753..ec5325b 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_if.html +++ b/doc/html/range/reference/algorithms/mutating/replace_if.html @@ -28,7 +28,7 @@ replace_if
@@ -43,7 +43,7 @@
@@ -52,14 +52,14 @@
Returns a reference to rng
.
Defined in the header file boost/range/algorithm/replace_if.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/reverse.html b/doc/html/range/reference/algorithms/mutating/reverse.html index 0ae4ef5..ab30425 100644 --- a/doc/html/range/reference/algorithms/mutating/reverse.html +++ b/doc/html/range/reference/algorithms/mutating/reverse.html @@ -27,7 +27,7 @@ reverse
@@ -42,7 +42,7 @@
@@ -50,14 +50,14 @@ Returns a reference to the reversed range.
Defined in the header file boost/range/algorithm/reverse.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/reverse_copy.html b/doc/html/range/reference/algorithms/mutating/reverse_copy.html index 34a4b9a..4f0a397 100644 --- a/doc/html/range/reference/algorithms/mutating/reverse_copy.html +++ b/doc/html/range/reference/algorithms/mutating/reverse_copy.html @@ -28,7 +28,7 @@ reverse_copy
@@ -40,7 +40,7 @@
@@ -50,14 +50,14 @@ Returns the output iterator one passed the last copied element.
Defined in the header file boost/range/algorithm/reverse_copy.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/rotate.html b/doc/html/range/reference/algorithms/mutating/rotate.html index b0dc3e4..71ed099 100644 --- a/doc/html/range/reference/algorithms/mutating/rotate.html +++ b/doc/html/range/reference/algorithms/mutating/rotate.html @@ -27,7 +27,7 @@ rotate
@@ -44,7 +44,7 @@
@@ -53,14 +53,14 @@
and [middle, end(rng))
. Returns a reference to rng
.
Defined in the header file boost/range/algorithm/rotate.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/rotate_copy.html b/doc/html/range/reference/algorithms/mutating/rotate_copy.html index 293f540..bbf8b8a 100644 --- a/doc/html/range/reference/algorithms/mutating/rotate_copy.html +++ b/doc/html/range/reference/algorithms/mutating/rotate_copy.html @@ -28,7 +28,7 @@ rotate_copy
@@ -43,7 +43,7 @@
@@ -52,14 +52,14 @@
and [middle, end(rng))
to out
.
Defined in the header file boost/range/algorithm/rotate_copy.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/sort.html b/doc/html/range/reference/algorithms/mutating/sort.html index ffa09ad..3ec9dd9 100644 --- a/doc/html/range/reference/algorithms/mutating/sort.html +++ b/doc/html/range/reference/algorithms/mutating/sort.html @@ -27,7 +27,7 @@ sort
@@ -48,7 +48,7 @@
@@ -71,14 +71,14 @@
[x,y]
, pred(y, x) == false
.
Defined in the header file boost/range/algorithm/sort.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/stable_partition.html b/doc/html/range/reference/algorithms/mutating/stable_partition.html index c12efc0..582128a 100644 --- a/doc/html/range/reference/algorithms/mutating/stable_partition.html +++ b/doc/html/range/reference/algorithms/mutating/stable_partition.html @@ -28,7 +28,7 @@ stable_partition
@@ -61,7 +61,7 @@
@@ -83,14 +83,14 @@
the iterator to the first element that fails to satisfy pred
.
Defined in the header file boost/range/algorithm/stable_partition.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/stable_sort.html b/doc/html/range/reference/algorithms/mutating/stable_sort.html index 7f4e1a5..79b0551 100644 --- a/doc/html/range/reference/algorithms/mutating/stable_sort.html +++ b/doc/html/range/reference/algorithms/mutating/stable_sort.html @@ -28,7 +28,7 @@ stable_sort
@@ -49,7 +49,7 @@
@@ -72,14 +72,14 @@
[x,y]
, pred(y,x) == false
.
Defined in the header file boost/range/algorithm/stable_sort.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/swap_ranges.html b/doc/html/range/reference/algorithms/mutating/swap_ranges.html index a9fc9fa..3a26dc8 100644 --- a/doc/html/range/reference/algorithms/mutating/swap_ranges.html +++ b/doc/html/range/reference/algorithms/mutating/swap_ranges.html @@ -28,7 +28,7 @@ swap_ranges
@@ -40,7 +40,7 @@
@@ -50,14 +50,14 @@
Returns a reference to rng2
.
Defined in the header file boost/range/algorithm/swap_ranges.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/transform.html b/doc/html/range/reference/algorithms/mutating/transform.html index 9247576..22bc5a3 100644 --- a/doc/html/range/reference/algorithms/mutating/transform.html +++ b/doc/html/range/reference/algorithms/mutating/transform.html @@ -27,7 +27,7 @@ transform
@@ -56,7 +56,7 @@
@@ -92,14 +92,14 @@
The return value is out + min(distance(rng1), distance(rng2))
.
Defined in the header file boost/range/algorithm/transform.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/unique.html b/doc/html/range/reference/algorithms/mutating/unique.html index 961a44f..a2351e6 100644 --- a/doc/html/range/reference/algorithms/mutating/unique.html +++ b/doc/html/range/reference/algorithms/mutating/unique.html @@ -27,7 +27,7 @@ unique
@@ -68,7 +68,7 @@
@@ -86,14 +86,14 @@ type.
Defined in the header file boost/range/algorithm/unique.hpp
diff --git a/doc/html/range/reference/algorithms/mutating/unique_copy.html b/doc/html/range/reference/algorithms/mutating/unique_copy.html index e0de9fc..d3ab9b1 100644 --- a/doc/html/range/reference/algorithms/mutating/unique_copy.html +++ b/doc/html/range/reference/algorithms/mutating/unique_copy.html @@ -28,7 +28,7 @@ unique_copy
@@ -43,7 +43,7 @@
@@ -56,14 +56,14 @@ value type.
Defined in the header file boost/range/algorithm/unique_copy.hpp
diff --git a/doc/html/range/reference/algorithms/new/copy_n.html b/doc/html/range/reference/algorithms/new/copy_n.html index b84b29e..3990a4a 100644 --- a/doc/html/range/reference/algorithms/new/copy_n.html +++ b/doc/html/range/reference/algorithms/new/copy_n.html @@ -27,7 +27,7 @@ copy_n
@@ -39,7 +39,7 @@
@@ -53,14 +53,14 @@
from [boost::begin(rng), boost::begin(rng) + n)
to the range [out, out + n)
Defined in the header file boost/range/algorithm_ext/copy_n.hpp
diff --git a/doc/html/range/reference/algorithms/new/erase.html b/doc/html/range/reference/algorithms/new/erase.html index 47a5197..e36ab86 100644 --- a/doc/html/range/reference/algorithms/new/erase.html +++ b/doc/html/range/reference/algorithms/new/erase.html @@ -27,7 +27,7 @@ erase
@@ -41,7 +41,7 @@
@@ -58,14 +58,14 @@
the frequently used combination equivalent to target.erase(std::remove_if(target.begin(), target.end(), pred), target.end());
Defined in the header file boost/range/algorithm_ext/erase.hpp
diff --git a/doc/html/range/reference/algorithms/new/for_each.html b/doc/html/range/reference/algorithms/new/for_each.html index c9c5db1..c618c69 100644 --- a/doc/html/range/reference/algorithms/new/for_each.html +++ b/doc/html/range/reference/algorithms/new/for_each.html @@ -27,7 +27,7 @@ for_each
@@ -72,7 +72,7 @@
@@ -88,14 +88,14 @@ It is safe to call this function with unequal length ranges.
Defined in the header file boost/range/algorithm_ext/for_each.hpp
diff --git a/doc/html/range/reference/algorithms/new/insert.html b/doc/html/range/reference/algorithms/new/insert.html index 013ca65..457cdeb 100644 --- a/doc/html/range/reference/algorithms/new/insert.html +++ b/doc/html/range/reference/algorithms/new/insert.html @@ -27,7 +27,7 @@ insert
@@ -44,7 +44,7 @@
@@ -54,14 +54,14 @@
target
.
Defined in the header file boost/range/algorithm_ext/insert.hpp
diff --git a/doc/html/range/reference/algorithms/new/iota.html b/doc/html/range/reference/algorithms/new/iota.html index 00613b2..d9a0bff 100644 --- a/doc/html/range/reference/algorithms/new/iota.html +++ b/doc/html/range/reference/algorithms/new/iota.html @@ -27,7 +27,7 @@ iota
@@ -39,7 +39,7 @@
@@ -50,14 +50,14 @@ + boost::distance(boost::begin(rng), it)
Defined in the header file boost/range/algorithm_ext/iota.hpp
diff --git a/doc/html/range/reference/algorithms/new/is_sorted.html b/doc/html/range/reference/algorithms/new/is_sorted.html index 167665d..fd3db29 100644 --- a/doc/html/range/reference/algorithms/new/is_sorted.html +++ b/doc/html/range/reference/algorithms/new/is_sorted.html @@ -27,7 +27,7 @@ is_sorted
@@ -42,7 +42,7 @@
@@ -58,14 +58,14 @@
is true
.
Defined in the header file boost/range/algorithm_ext/is_sorted.hpp
diff --git a/doc/html/range/reference/algorithms/new/overwrite.html b/doc/html/range/reference/algorithms/new/overwrite.html index 3ef0cfb..54ac945 100644 --- a/doc/html/range/reference/algorithms/new/overwrite.html +++ b/doc/html/range/reference/algorithms/new/overwrite.html @@ -27,7 +27,7 @@ overwrite
@@ -43,7 +43,7 @@
@@ -52,14 +52,14 @@
into the range to
.
Defined in the header file boost/range/algorithm_ext/overwrite.hpp
diff --git a/doc/html/range/reference/algorithms/new/push_back.html b/doc/html/range/reference/algorithms/new/push_back.html index b5a0ff1..6c28ea9 100644 --- a/doc/html/range/reference/algorithms/new/push_back.html +++ b/doc/html/range/reference/algorithms/new/push_back.html @@ -27,7 +27,7 @@ push_back
@@ -43,7 +43,7 @@
@@ -52,14 +52,14 @@
to the back of the container target
.
Defined in the header file boost/range/algorithm_ext/push_back.hpp
diff --git a/doc/html/range/reference/algorithms/new/push_front.html b/doc/html/range/reference/algorithms/new/push_front.html index a8b3381..41303af 100644 --- a/doc/html/range/reference/algorithms/new/push_front.html +++ b/doc/html/range/reference/algorithms/new/push_front.html @@ -27,7 +27,7 @@ push_front
@@ -43,7 +43,7 @@
@@ -52,14 +52,14 @@
to the front of the container target
.
Defined in the header file boost/range/algorithm_ext/push_front.hpp
diff --git a/doc/html/range/reference/algorithms/new/remove_erase.html b/doc/html/range/reference/algorithms/new/remove_erase.html index 6dd59be..06ee9d1 100644 --- a/doc/html/range/reference/algorithms/new/remove_erase.html +++ b/doc/html/range/reference/algorithms/new/remove_erase.html @@ -27,7 +27,7 @@ remove_erase
@@ -40,7 +40,7 @@
@@ -50,14 +50,14 @@ algorithm which merely rearranges elements.
Defined in the header file boost/range/algorithm_ext/erase.hpp
diff --git a/doc/html/range/reference/algorithms/new/remove_erase_if.html b/doc/html/range/reference/algorithms/new/remove_erase_if.html index ab20e8f..f4c21e4 100644 --- a/doc/html/range/reference/algorithms/new/remove_erase_if.html +++ b/doc/html/range/reference/algorithms/new/remove_erase_if.html @@ -28,7 +28,7 @@ remove_erase_if
@@ -41,7 +41,7 @@
@@ -52,14 +52,14 @@ algorithm which merely rearranges elements.
Defined in the header file boost/range/algorithm_ext/erase.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html index 4bece6d..96a5042 100644 --- a/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html +++ b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html @@ -28,7 +28,7 @@ adjacent_find
@@ -77,7 +77,7 @@
@@ -98,14 +98,14 @@
is true
.
Defined in the header file boost/range/algorithm/adjacent_find.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/binary_search.html b/doc/html/range/reference/algorithms/non_mutating/binary_search.html index fcbbbbb..27d20df 100644 --- a/doc/html/range/reference/algorithms/non_mutating/binary_search.html +++ b/doc/html/range/reference/algorithms/non_mutating/binary_search.html @@ -28,7 +28,7 @@ binary_search
@@ -43,7 +43,7 @@
@@ -53,14 +53,14 @@
range rng
.
Defined in the header file boost/range/algorithm/binary_search.hpp
@@ -129,7 +129,7 @@
order according to the function object pred
.
diff --git a/doc/html/range/reference/algorithms/non_mutating/count.html b/doc/html/range/reference/algorithms/non_mutating/count.html index e1b7195..bb284dd 100644 --- a/doc/html/range/reference/algorithms/non_mutating/count.html +++ b/doc/html/range/reference/algorithms/non_mutating/count.html @@ -27,7 +27,7 @@ count
@@ -44,7 +44,7 @@
@@ -54,14 +54,14 @@
is true
.
Defined in the header file boost/range/algorithm/count.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/count_if.html b/doc/html/range/reference/algorithms/non_mutating/count_if.html index 53b05ad..a52d12e 100644 --- a/doc/html/range/reference/algorithms/non_mutating/count_if.html +++ b/doc/html/range/reference/algorithms/non_mutating/count_if.html @@ -28,7 +28,7 @@ count_if
@@ -41,7 +41,7 @@
@@ -51,14 +51,14 @@
is true
.
Defined in the header file boost/range/algorithm/count_if.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/equal.html b/doc/html/range/reference/algorithms/non_mutating/equal.html index 6f0e022..42b1e37 100644 --- a/doc/html/range/reference/algorithms/non_mutating/equal.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal.html @@ -27,7 +27,7 @@ equal
@@ -52,7 +52,7 @@
@@ -70,14 +70,14 @@
considered equal in the predicate version if pred(x,y)
is true
.
Defined in the header file boost/range/algorithm/equal.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/equal_range.html b/doc/html/range/reference/algorithms/non_mutating/equal_range.html index 7aa0fc1..3927bf3 100644 --- a/doc/html/range/reference/algorithms/non_mutating/equal_range.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal_range.html @@ -28,7 +28,7 @@ equal_range
@@ -71,7 +71,7 @@
@@ -85,14 +85,14 @@
is determined by pred
.
Defined in the header file boost/range/algorithm/equal_range.hpp
@@ -155,7 +155,7 @@
is ordered in ascending order according to pred
.
diff --git a/doc/html/range/reference/algorithms/non_mutating/find.html b/doc/html/range/reference/algorithms/non_mutating/find.html index 485e44a..a0071e5 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find.html +++ b/doc/html/range/reference/algorithms/non_mutating/find.html @@ -27,7 +27,7 @@ find
@@ -48,7 +48,7 @@
@@ -59,14 +59,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/find.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/find_end.html b/doc/html/range/reference/algorithms/non_mutating/find_end.html index f11bb47..74ea668 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_end.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_end.html @@ -28,7 +28,7 @@ find_end
@@ -66,7 +66,7 @@
@@ -81,14 +81,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/find_end.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/find_first_of.html b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html index 972690f..0709e1e 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_first_of.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html @@ -28,7 +28,7 @@ find_first_of
@@ -66,7 +66,7 @@
@@ -86,14 +86,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/find_first_of.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/find_if.html b/doc/html/range/reference/algorithms/non_mutating/find_if.html index 59ab8d3..e57f94b 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_if.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_if.html @@ -28,7 +28,7 @@ find_if
@@ -49,7 +49,7 @@
@@ -64,14 +64,14 @@ defines found in the same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/find_if.hpp
@@ -98,7 +98,7 @@
rng
, *i
is in the domain of UnaryPredicate
.
diff --git a/doc/html/range/reference/algorithms/non_mutating/for_each.html b/doc/html/range/reference/algorithms/non_mutating/for_each.html index 7d8792f..f8cb0c0 100644 --- a/doc/html/range/reference/algorithms/non_mutating/for_each.html +++ b/doc/html/range/reference/algorithms/non_mutating/for_each.html @@ -28,7 +28,7 @@ for_each
@@ -49,7 +49,7 @@
@@ -59,14 +59,14 @@
fun(x)
.
Defined in the header file boost/range/algorithm/for_each.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html index e3e37ef..fd3973d 100644 --- a/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html +++ b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html @@ -28,7 +28,7 @@ lexicographical_compare
@@ -53,7 +53,7 @@
@@ -73,14 +73,14 @@ predicate versions.
Defined in the header file boost/range/algorithm/lexicographical_compare.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/lower_bound.html b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html index f18a5bc..7eff1d3 100644 --- a/doc/html/range/reference/algorithms/non_mutating/lower_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html @@ -28,7 +28,7 @@ lower_bound
@@ -49,7 +49,7 @@
@@ -72,14 +72,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/lower_bound.hpp
@@ -148,7 +148,7 @@
order according to pred
.
diff --git a/doc/html/range/reference/algorithms/non_mutating/max_element.html b/doc/html/range/reference/algorithms/non_mutating/max_element.html index 9216f88..2ffa24d 100644 --- a/doc/html/range/reference/algorithms/non_mutating/max_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/max_element.html @@ -28,7 +28,7 @@ max_element
@@ -84,7 +84,7 @@
@@ -98,14 +98,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/max_element.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/min_element.html b/doc/html/range/reference/algorithms/non_mutating/min_element.html index 4abd6a8..577ace5 100644 --- a/doc/html/range/reference/algorithms/non_mutating/min_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/min_element.html @@ -28,7 +28,7 @@ min_element
@@ -84,7 +84,7 @@
@@ -98,14 +98,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/min_element.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/mismatch.html b/doc/html/range/reference/algorithms/non_mutating/mismatch.html index d740dce..a18e3ef 100644 --- a/doc/html/range/reference/algorithms/non_mutating/mismatch.html +++ b/doc/html/range/reference/algorithms/non_mutating/mismatch.html @@ -28,7 +28,7 @@ mismatch
@@ -106,7 +106,7 @@
@@ -118,14 +118,14 @@
Equality is determined by operator==
for non-predicate versions of mismatch
, and by satisfying pred
in the predicate versions.
Defined in the header file boost/range/algorithm/mismatch.hpp
distance(rng2) >= distance(rng1)
diff --git a/doc/html/range/reference/algorithms/non_mutating/search.html b/doc/html/range/reference/algorithms/non_mutating/search.html index 9746802..fadef01 100644 --- a/doc/html/range/reference/algorithms/non_mutating/search.html +++ b/doc/html/range/reference/algorithms/non_mutating/search.html @@ -28,7 +28,7 @@ search
@@ -96,7 +96,7 @@
@@ -115,14 +115,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/search.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/search_n.html b/doc/html/range/reference/algorithms/non_mutating/search_n.html index 2b94b7f..92b2fe3 100644 --- a/doc/html/range/reference/algorithms/non_mutating/search_n.html +++ b/doc/html/range/reference/algorithms/non_mutating/search_n.html @@ -28,7 +28,7 @@ search_n
@@ -55,7 +55,7 @@
@@ -64,14 +64,14 @@ and by a predicate when one is supplied.
Defined in the header file boost/range/algorithm/search_n.hpp
diff --git a/doc/html/range/reference/algorithms/non_mutating/upper_bound.html b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html index 1bf73d6..c2ba3ee 100644 --- a/doc/html/range/reference/algorithms/non_mutating/upper_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html @@ -28,7 +28,7 @@ upper_bound
@@ -49,7 +49,7 @@
@@ -71,14 +71,14 @@ same manner as the returned iterator described above.
Defined in the header file boost/range/algorithm/upper_bound.hpp
@@ -147,7 +147,7 @@
order according to pred
.
diff --git a/doc/html/range/reference/algorithms/numeric/accumulate.html b/doc/html/range/reference/algorithms/numeric/accumulate.html index 4ba0962..bbea87e 100644 --- a/doc/html/range/reference/algorithms/numeric/accumulate.html +++ b/doc/html/range/reference/algorithms/numeric/accumulate.html @@ -27,7 +27,7 @@ accumulate
@@ -52,7 +52,7 @@
@@ -63,18 +63,18 @@ The return value is the resultant value of the above algorithm.
Defined in the header file boost/range/numeric.hpp
diff --git a/doc/html/range/reference/algorithms/numeric/adjacent_difference.html b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html index 5dff5f8..578a8f0 100644 --- a/doc/html/range/reference/algorithms/numeric/adjacent_difference.html +++ b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html @@ -28,7 +28,7 @@ adjacent_difference
@@ -55,7 +55,7 @@
@@ -69,18 +69,18 @@
instead of operator-()
.
Defined in the header file boost/range/numeric.hpp
@@ -154,7 +154,7 @@ + distance(rng)) is a valid range.
diff --git a/doc/html/range/reference/algorithms/numeric/inner_product.html b/doc/html/range/reference/algorithms/numeric/inner_product.html index 7872880..e9284df 100644 --- a/doc/html/range/reference/algorithms/numeric/inner_product.html +++ b/doc/html/range/reference/algorithms/numeric/inner_product.html @@ -28,7 +28,7 @@ inner_product
@@ -54,7 +54,7 @@
@@ -67,18 +67,18 @@ algorithm please see inner_product.
Defined in the header file boost/range/numeric.hpp
distance(rng2) >= distance(rng1)
is a valid range.
diff --git a/doc/html/range/reference/algorithms/numeric/partial_sum.html b/doc/html/range/reference/algorithms/numeric/partial_sum.html index cddd838..e0d1cb3 100644 --- a/doc/html/range/reference/algorithms/numeric/partial_sum.html +++ b/doc/html/range/reference/algorithms/numeric/partial_sum.html @@ -28,7 +28,7 @@ partial_sum
@@ -49,7 +49,7 @@
@@ -58,18 +58,18 @@
in the same manner as std::partial_sum(boost::begin(rng), boost::end(rng), out_it)
. See partial_sum.
Defined in the header file boost/range/numeric.hpp
@@ -136,7 +136,7 @@ + distance(rng)) is a valid range.
diff --git a/doc/html/range/reference/algorithms/permutation/next_permutation.html b/doc/html/range/reference/algorithms/permutation/next_permutation.html index 3f23383..f6838ea 100644 --- a/doc/html/range/reference/algorithms/permutation/next_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/next_permutation.html @@ -28,7 +28,7 @@ next_permutation
@@ -49,7 +49,7 @@
@@ -67,14 +67,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/permutation.hpp
diff --git a/doc/html/range/reference/algorithms/permutation/prev_permutation.html b/doc/html/range/reference/algorithms/permutation/prev_permutation.html index 3cb4d46..bf1e432 100644 --- a/doc/html/range/reference/algorithms/permutation/prev_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/prev_permutation.html @@ -28,7 +28,7 @@ prev_permutation
@@ -49,7 +49,7 @@
@@ -67,14 +67,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/permutation.hpp
diff --git a/doc/html/range/reference/algorithms/set/includes.html b/doc/html/range/reference/algorithms/set/includes.html index d03a126..45df74c 100644 --- a/doc/html/range/reference/algorithms/set/includes.html +++ b/doc/html/range/reference/algorithms/set/includes.html @@ -27,7 +27,7 @@ includes
@@ -47,7 +47,7 @@
@@ -59,14 +59,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/set_algorithm.hpp
@@ -162,7 +162,7 @@
according to pred
.
diff --git a/doc/html/range/reference/algorithms/set/set_difference.html b/doc/html/range/reference/algorithms/set/set_difference.html index 3084d87..5e8f31e 100644 --- a/doc/html/range/reference/algorithms/set/set_difference.html +++ b/doc/html/range/reference/algorithms/set/set_difference.html @@ -27,7 +27,7 @@ set_difference
@@ -56,7 +56,7 @@
@@ -70,14 +70,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/set_algorithm.hpp
@@ -181,7 +181,7 @@
according to pred
.
diff --git a/doc/html/range/reference/algorithms/set/set_intersection.html b/doc/html/range/reference/algorithms/set/set_intersection.html index a817f35..924d5d5 100644 --- a/doc/html/range/reference/algorithms/set/set_intersection.html +++ b/doc/html/range/reference/algorithms/set/set_intersection.html @@ -28,7 +28,7 @@ set_intersection
@@ -57,7 +57,7 @@
@@ -71,14 +71,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/set_algorithm.hpp
@@ -182,7 +182,7 @@
according to pred
.
diff --git a/doc/html/range/reference/algorithms/set/set_symmetric_difference.html b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html index 659877c..ab6aec1 100644 --- a/doc/html/range/reference/algorithms/set/set_symmetric_difference.html +++ b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html @@ -28,7 +28,7 @@ set_symmetric_difference
@@ -59,7 +59,7 @@
@@ -75,14 +75,14 @@ the predicate versions.
Defined in the header file boost/range/algorithm/set_algorithm.hpp
@@ -186,7 +186,7 @@
according to pred
.
diff --git a/doc/html/range/reference/algorithms/set/set_union.html b/doc/html/range/reference/algorithms/set/set_union.html index ccc1783..31d8005 100644 --- a/doc/html/range/reference/algorithms/set/set_union.html +++ b/doc/html/range/reference/algorithms/set/set_union.html @@ -27,7 +27,7 @@ set_union
@@ -56,7 +56,7 @@
@@ -69,14 +69,14 @@ in the predicate versions.
Defined in the header file boost/range/algorithm/set_algorithm.hpp
@@ -180,7 +180,7 @@
according to pred
.
diff --git a/doc/html/range/reference/concept_implementation/semantics.html b/doc/html/range/reference/concept_implementation/semantics.html index 1493f51..59e2d98 100644 --- a/doc/html/range/reference/concept_implementation/semantics.html +++ b/doc/html/range/reference/concept_implementation/semantics.html @@ -31,7 +31,7 @@
![]() |
- Boost.Range |
-
adjacent_filtered
--rng | boost::adaptors::adjacent_filtered( bi_pred ) --boost::make_adjacent_filtered_range( rng, bi_pred ) --
bi_pred
.
- [x,y]
in the returned range,
- bi_pred(x,y)
is true
.
- - #include <boost/range/adaptor/adjacent_filtered.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <functional> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::vector<int> input; - input += 1,1,2,2,2,3,4,5,6; - - boost::copy( - input | adjacent_filtered(std::not_equal_to<int>()), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This would produce the output:
- 1,2,3,4,5,6
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
copied
--rng | boost::adaptors::copied( n, m )-boost::make_copied_range( rng, n, m )-
0 <= n && n <= m && m < distance(rng)
- iterator_range
that holds the sliced range
- [n,m)
of the original range.
- - #include <boost/range/adaptor/copied.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9,10; - - boost::copy( - input | copied(1, 5), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This would produce the output:
- 2,3,4,5
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
filtered
--rng | boost::adaptors::filtered( pred )-boost::make_filtered_range( rng, pred )-
pred
.
- x
in the returned range,
- pred(x)
is true
- - #include <boost/range/adaptor/filtered.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - struct is_even - { - bool operator()(int x) const { return x % 2 == 0; } - }; - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9; - - boost::copy( - input | filtered(is_even()), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This would produce the output:
- 2,4,6,8
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
indexed
--rng | boost::adaptors::indexed-boost::make_indexed_range( rng )-
index()
member function that returns the appropriate
- index for the element in the sequence corresponding with the
- iterator.
- - #include <boost/range/adaptor/indexed.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - template<class Iterator> - void display_element_and_index(Iterator first, Iterator last) - { - for (Iterator it = first; it != last; ++it) - { - std::cout << "Element = " << *it - << " Index = " << it.index() << std::endl; - } - } - - template<class SinglePassRange> - void display_element_and_index(const SinglePassRange& rng) - { - display_element_and_index(boost::begin(rng), boost::end(rng)); - } - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::vector<int> input; - input += 10,20,30,40,50,60,70,80,90; - - display_element_and_index( input | indexed(0) ); - - return 0; - } --
- This produces the output:
-
- Element = 10 Index = 0
-
- Element = 20 Index = 1
- Element = 30 Index = 2
- Element = 40 Index = 3
- Element = 50 Index = 4
- Element = 60 Index = 5
- Element = 70 Index = 6
- Element = 80 Index = 7
- Element = 90 Index = 8
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
indirected
--rng | boost::adaptors::indirected-boost::make_indirected_range( rng )-
operator*()
- x
in the returned range,
- x
is the result of *y
where
- y
is the corresponding element in the original range.
- - #include <boost/range/adaptor/indirected.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/shared_ptr.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - - std::vector<boost::shared_ptr<int> > input; - - for (int i = 0; i < 10; ++i) - input.push_back(boost::shared_ptr<int>(new int(i))); - - boost::copy( - input | indirected, - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
- 0,1,2,3,4,5,6,7,8,9
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
map_keys
--rng | boost::adaptors::map_keys-boost::make_map_key_range( rng )-
x
in the returned range,
- x
is the result of y.first
where
- y
is the corresponding element in the original range.
- - #include <boost/range/adaptor/map.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <map> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::map<int,int> input; - for (int i = 0; i < 10; ++i) - input.insert(std::make_pair(i, i * 10)); - - boost::copy( - input | map_keys, - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 0,1,2,3,4,5,6,7,8,9
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
map_values
--rng | boost::adaptors::map_values-boost::make_map_value_range( rng )-
x
in the returned range,
- x
is the result of y.second
where
- y
is the corresponding element in the original range.
- - #include <boost/range/adaptor/map.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <map> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::map<int,int> input; - for (int i = 0; i < 10; ++i) - input.insert(std::make_pair(i, i * 10)); - - boost::copy( - input | map_values, - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 0,10,20,30,40,50,60,70,80,90
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
replaced
--rng | boost::adaptors::replaced( new_value, old_value )-boost::make_replaced_range( rng, new_value, old_value )-
new_value
is convertible to the value-type of
- the range.
- old_value
is convertible to the value-type of
- the range.
- 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.
- - #include <boost/range/adaptor/replaced.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,2,5,2,7,2,9; - - boost::copy( - input | replaced(2, 10), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 1,10,3,10,5,10,7,10,9
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
replaced_if
--rng | boost::adaptors::replaced_if( pred, new_value )-boost::make_replaced_if_range( rng, pred, new_value )-
pred
.
- new_value
is convertible to the value-type
- of the range.
- [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.
- - #include <boost/range/adaptor/replaced_if.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - struct is_even - { - bool operator()(int x) const { return x % 2 == 0; } - }; - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9; - - boost::copy( - input | replaced_if(is_even(), 10), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } - --
- This produces the output:
-
- 1,10,3,10,5,10,7,10,9
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
reversed
--rng | boost::adaptors::reversed-boost::make_reversed_range( rng )-
reverse_iterator
.
- - #include <boost/range/adaptor/reversed.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9; - - boost::copy( - input | reversed, - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 9,8,7,6,5,4,3,2,1
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
sliced
--rng | boost::adaptors::sliced( n, m )-boost::make_sliced_range( rng, n, m )-
0 <= n && n <= m && m < distance(rng)
- make_range(rng, n, m)
- - #include <boost/range/adaptor/sliced.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9; - - boost::copy( - input | sliced(2, 5), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 3,4,5
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
strided
--rng | boost::adaptors::strided( n )-boost::make_strided_range( rng, n )-
0 <= n && n <= distance(rng)
- rng
where traversal is performed in steps of n
.
- - #include <boost/range/adaptor/strided.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9,10; - - boost::copy( - input | strided(2), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 1,3,5,7,9
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
tokenized
--rng | boost::adaptors::tokenized( regex )-rng | boost::adaptors::tokenized( regex, i )-rng | boost::adaptors::tokenized( regex, rndRng )-rng | boost::adaptors::tokenized( regex, i, flags )-rng | boost::adaptors::tokenized( regex, rndRng, flags )-boost::make_tokenized_range( rng, regex, i, flags )-boost::make_tokenized_range( rng, regex, rngRng, flags )-
T
denote
- typename range_value< decltype(rng) >::type
,
- then regex
has the type
- basic_regex<T>
or is
- implicitly convertible to one of these types.
- i
has the type int
.
- rndRng
is int
.
- flags
has the type
- regex_constants::syntax_option_type
.
- 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.
- regex_token_iterator
s might throw.
- - #include <boost/range/adaptor/tokenized.hpp> - #include <boost/range/algorithm_ext/push_back.hpp> - #include <boost/assert.hpp> - #include <algorithm> - #include <string> - #include <vector> - - int main(int argc, const char* argv) - { - using namespace boost::adaptors; - - std::string input = "a b c d e f g hijklmnopqrstuvwxyz"; - std::vector< boost::sub_match< std::string::iterator > > result; - boost::push_back(result, input | tokenized(boost::regex("\\b"))); - - BOOST_ASSERT( boost::size(result) == 16u ); - - return 0; - } -- -
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
transformed
--rng | boost::adaptors::transformed( fun )-boost::make_transformed_range( rng, fun )-
x
in the returned range,
- x
is the result of fun(y)
where
- y
is the corresponding element in the original range.
- fun
might throw.
- - #include <boost/range/adaptor/transformed.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/range/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - struct double_int - { - typedef int result_type; - int operator()(int x) const { return x * 2; } - }; - - int main(int argc, const char* argv[]) - { - using namespace boost::adaptors; - using namespace boost::assign; - - std::vector<int> input; - input += 1,2,3,4,5,6,7,8,9,10; - - boost::copy( - input | transformed(double_int()), - std::ostream_iterator<int>(std::cout, ",")); - - return 0; - } --
- This produces the output:
-
- 2,4,6,8,10,12,14,16,18,20
-
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -![]() |
- Boost.Range |
-
uniqued
--rng | boost::adaptors::uniqued-boost::make_uniqued_range( rng )-
operator==()
.
- [x,y]
in the returned range,
- x==y
is false.
- - #include <boost/range/adaptor/uniqued.hpp> - #include <boost/range/algorithm/copy.hpp> - #include <boost/assign.hpp> - #include <algorithm> - #include <iostream> - #include <vector> - - int main(int argc, const char* argv) - { - using namespace boost::assign; - using namespace boost::adaptors; - - std::vector<int> input; - input += 1,1,2,2,2,3,4,5,6; - - boost::copy( - input | uniqued, - std::ostream_iterator<int>(std::cout, ",") ); - - return 0; - } --
- This would produce the output:
- 1,2,3,4,5,6
-
- (C) Copyright Neil Groves 2009 - (C) Copyright Thorsten Ottosen 2003-2004 -
- -