diff --git a/doc/boost_range.qbk b/doc/boost_range.qbk index 1d56b82..80bbf06 100644 --- a/doc/boost_range.qbk +++ b/doc/boost_range.qbk @@ -33,36 +33,131 @@ [def __bidirectional_range__ [link range.concepts.bidirectional_range Bidirectional Range]] [def __random_access_range__ [link range.concepts.random_access_range Random Access Range]] -[def __iterator_range__ [link range.utilities.iterator_range `iterator_range`]] -[def __sub_range__ [link range.utilities.sub_range `sub_range`]] +[def __iterator_range__ [link range.reference.utilities.iterator_range `iterator_range`]] +[def __sub_range__ [link range.reference.utilities.sub_range `sub_range`]] [def __minimal_interface__ [link range.reference.extending minimal interface]] -[def __range_result_iterator__ [link range.reference.semantics.metafunctions `range_result_iterator`]] +[def __range_result_iterator__ [link range.reference.concept_implementation.semantics.metafunctions `range_result_iterator`]] [def __extending_for_udts__ [link range.reference.extending Extending the library for UDTs]] -[def __implementation_of_metafunctions__ [link range.reference.semantics.metafunctions Implementation of metafunctions]] -[def __implementation_of_functions__ [link range.reference.semantics.functions Implementation of functions]] +[def __implementation_of_metafunctions__ [link range.reference.concept_implementation.semantics.metafunctions Implementation of metafunctions]] +[def __implementation_of_functions__ [link range.reference.concept_implementation.semantics.functions Implementation of functions]] -[def __range_value__ [link range.reference.semantics.metafunctions `range_value`]] -[def __range_iterator__ [link range.reference.semantics.metafunctions `range_iterator`]] -[def __range_difference__ [link range.reference.semantics.metafunctions `range_difference`]] -[def __range_pointer__ [link range.reference.semantics.metafunctions `range_pointer`]] -[def __range_category__ [link range.reference.semantics.metafunctions `range_category`]] -[def __range_reverse_iterator__ [link range.reference.semantics.metafunctions `range_reverse_iterator`]] -[def __begin__ [link range.reference.semantics.functions `begin`]] -[def __const_begin__ [link range.reference.semantics.functions `const_begin`]] -[def __end__ [link range.reference.semantics.functions `end`]] -[def __const_end__ [link range.reference.semantics.functions `const_end`]] -[def __empty__ [link range.reference.semantics.functions `empty`]] -[def __distance__ [link range.reference.semantics.functions `distance`]] -[def __size__ [link range.reference.semantics.functions `size`]] -[def __rbegin__ [link range.reference.semantics.functions `rbegin`]] -[def __const_rbegin__ [link range.reference.semantics.functions `const_rbegin`]] -[def __rend__ [link range.reference.semantics.functions `rend`]] -[def __const_rend__ [link range.reference.semantics.functions `const_rend`]] -[def __as_array__ [link range.reference.semantics.functions `as_array`]] -[def __as_literal__ [link range.reference.semantics.functions `as_literal`]] +[def __range_value__ [link range.reference.concept_implementation.semantics.metafunctions `range_value`]] +[def __range_iterator__ [link range.reference.concept_implementation.semantics.metafunctions `range_iterator`]] +[def __range_difference__ [link range.reference.concept_implementation.semantics.metafunctions `range_difference`]] +[def __range_pointer__ [link range.reference.concept_implementation.semantics.metafunctions `range_pointer`]] +[def __range_category__ [link range.reference.concept_implementation.semantics.metafunctions `range_category`]] +[def __range_reverse_iterator__ [link range.reference.concept_implementation.semantics.metafunctions `range_reverse_iterator`]] +[def __begin__ [link range.reference.concept_implementation.semantics.functions `begin`]] +[def __const_begin__ [link range.reference.concept_implementation.semantics.functions `const_begin`]] +[def __end__ [link range.reference.concept_implementation.semantics.functions `end`]] +[def __const_end__ [link range.reference.concept_implementation.semantics.functions `const_end`]] +[def __empty__ [link range.reference.concept_implementation.semantics.functions `empty`]] +[def __distance__ [link range.reference.concept_implementation.semantics.functions `distance`]] +[def __size__ [link range.reference.concept_implementation.semantics.functions `size`]] +[def __rbegin__ [link range.reference.concept_implementation.semantics.functions `rbegin`]] +[def __const_rbegin__ [link range.reference.concept_implementation.semantics.functions `const_rbegin`]] +[def __rend__ [link range.reference.concept_implementation.semantics.functions `rend`]] +[def __const_rend__ [link range.reference.concept_implementation.semantics.functions `const_rend`]] +[def __as_array__ [link range.reference.concept_implementation.semantics.functions `as_array`]] +[def __as_literal__ [link range.reference.concept_implementation.semantics.functions `as_literal`]] +[def __counting_range__ [link range.reference.ranges.counting_range `counting_range`]] +[def __irange__ [link range.reference.ranges.irange `irange`]] +[def __istream_range__ [link range.reference.ranges.istream_range `istream_range`]] +[def __join__ [link range.reference.utilities.join `join`]] -[def __range_adaptors__ [link range.reference.adaptors Range adaptors]] -[def __range_algorithms__ [link range.reference.algorithms Range algorithms]] +[def __range_adaptors__ [link range.reference.adaptors Range adaptors]] +[def __range_adaptors_adjacent_filtered__ [link range.reference.adaptors.reference.adjacent_filtered adjacent_filtered]] +[def __range_adaptors_copied__ [link range.reference.adaptors.reference.copied copied]] +[def __range_adaptors_filtered__ [link range.reference.adaptors.reference.filtered filtered]] +[def __range_adaptors_indexed__ [link range.reference.adaptors.reference.indexed indexed]] +[def __range_adaptors_indirected__ [link range.reference.adaptors.reference.indirected indirected]] +[def __range_adaptors_map_keys__ [link range.reference.adaptors.reference.map_keys map_keys]] +[def __range_adaptors_map_values__ [link range.reference.adaptors.reference.map_values map_values]] +[def __range_adaptors_replaced__ [link range.reference.adaptors.reference.replaced replaced]] +[def __range_adaptors_replaced_if__ [link range.reference.adaptors.reference.replaced_if replaced_if]] +[def __range_adaptors_reversed__ [link range.reference.adaptors.reference.reversed reversed]] +[def __range_adaptors_sliced__ [link range.reference.adaptors.reference.sliced sliced]] +[def __range_adaptors_strided__ [link range.reference.adaptors.reference.strided strided]] +[def __range_adaptors_tokenized__ [link range.reference.adaptors.reference.tokenized tokenized]] +[def __range_adaptors_transformed__ [link range.reference.adaptors.reference.transformed transformed]] +[def __range_adaptors_uniqued__ [link range.reference.adaptors.reference.uniqued uniqued]] + + +[def __range_algorithms__ [link range.reference.algorithms Range algorithms]] +[def __range_algorithms_adjacent_find__ [link range.reference.algorithms.non_mutating.adjacent_find adjacent_find]] +[def __range_algorithms_binary_search__ [link range.reference.algorithms.non_mutating.binary_search binary_search]] +[def __range_algorithms_count__ [link range.reference.algorithms.non_mutating.count count]] +[def __range_algorithms_count_if__ [link range.reference.algorithms.non_mutating.count_if count_if]] +[def __range_algorithms_equal__ [link range.reference.algorithms.non_mutating.equal equal]] +[def __range_algorithms_equal_range__ [link range.reference.algorithms.non_mutating.equal_range equal_range]] +[def __range_algorithms_for_each__ [link range.reference.algorithms.non_mutating.for_each for_each]] +[def __range_algorithms_find__ [link range.reference.algorithms.non_mutating.find find]] +[def __range_algorithms_find_end__ [link range.reference.algorithms.non_mutating.find_end find_end]] +[def __range_algorithms_find_first_of__ [link range.reference.algorithms.non_mutating.find_first_of find_first_of]] +[def __range_algorithms_find_if__ [link range.reference.algorithms.non_mutating.find_if find_if]] +[def __range_algorithms_lexicographical_compare__ [link range.reference.algorithms.non_mutating.lexicographical_compare lexicographical_compare]] +[def __range_algorithms_lower_bound__ [link range.reference.algorithms.non_mutating.lower_bound lower_bound]] +[def __range_algorithms_max_element__ [link range.reference.algorithms.non_mutating.max_element max_element]] +[def __range_algorithms_min_element__ [link range.reference.algorithms.non_mutating.min_element min_element]] +[def __range_algorithms_mismatch__ [link range.reference.algorithms.non_mutating.mismatch mismatch]] +[def __range_algorithms_search__ [link range.reference.algorithms.non_mutating.search search]] +[def __range_algorithms_search_n__ [link range.reference.algorithms.non_mutating.search_n search_n]] +[def __range_algorithms_upper_bound__ [link range.reference.algorithms.non_mutating.upper_bound upper_bound]] + +[def __range_algorithms_copy__ [link range.reference.algorithms.mutating.copy copy]] +[def __range_algorithms_copy_backward__ [link range.reference.algorithms.mutating.copy_backward copy_backward]] +[def __range_algorithms_fill__ [link range.reference.algorithms.mutating.fill fill]] +[def __range_algorithms_fill_n__ [link range.reference.algorithms.mutating.fill_n fill_n]] +[def __range_algorithms_generate__ [link range.reference.algorithms.mutating.generate generate]] +[def __range_algorithms_inplace_merge__ [link range.reference.algorithms.mutating.inplace_merge inplace_merge]] +[def __range_algorithms_merge__ [link range.reference.algorithms.mutating.merge merge]] +[def __range_algorithms_nth_element__ [link range.reference.algorithms.mutating.nth_element nth_element]] +[def __range_algorithms_partial_sort__ [link range.reference.algorithms.mutating.partial_sort partial_sort]] +[def __range_algorithms_partition__ [link range.reference.algorithms.mutating.partition partition]] +[def __range_algorithms_random_shuffle__ [link range.reference.algorithms.mutating.random_shuffle random_shuffle]] +[def __range_algorithms_remove__ [link range.reference.algorithms.mutating.remove remove]] +[def __range_algorithms_remove_copy__ [link range.reference.algorithms.mutating.remove_copy remove_copy]] +[def __range_algorithms_remove_copy_if__ [link range.reference.algorithms.mutating.remove_copy_if remove_copy_if]] +[def __range_algorithms_remove_if__ [link range.reference.algorithms.mutating.remove_if remove_if]] +[def __range_algorithms_replace__ [link range.reference.algorithms.mutating.replace replace]] +[def __range_algorithms_replace_copy__ [link range.reference.algorithms.mutating.replace_copy replace_copy]] +[def __range_algorithms_replace_copy_if__ [link range.reference.algorithms.mutating.replace_copy_if replace_copy_if]] +[def __range_algorithms_replace_if__ [link range.reference.algorithms.mutating.replace_if replace_if]] +[def __range_algorithms_reverse__ [link range.reference.algorithms.mutating.reverse reverse]] +[def __range_algorithms_reverse_copy__ [link range.reference.algorithms.mutating.reverse_copy reverse_copy]] +[def __range_algorithms_rotate__ [link range.reference.algorithms.mutating.rotate rotate]] +[def __range_algorithms_rotate_copy__ [link range.reference.algorithms.mutating.rotate_copy rotate_copy]] +[def __range_algorithms_sort__ [link range.reference.algorithms.mutating.sort sort]] +[def __range_algorithms_stable_partition__ [link range.reference.algorithms.mutating.stable_partition stable_partition]] +[def __range_algorithms_stable_sort__ [link range.reference.algorithms.mutating.stable_sort stable_sort]] +[def __range_algorithms_swap_ranges__ [link range.reference.algorithms.mutating.swap_ranges swap_ranges]] +[def __range_algorithms_transform__ [link range.reference.algorithms.mutating.transform transform]] +[def __range_algorithms_unique__ [link range.reference.algorithms.mutating.unique unique]] +[def __range_algorithms_unique_copy__ [link range.reference.algorithms.mutating.unique_copy unique_copy]] + +[def __range_algorithms_includes__ [link range.reference.algorithms.set.includes includes]] +[def __range_algorithms_set_union__ [link range.reference.algorithms.set.set_union set_union]] +[def __range_algorithms_set_intersection__ [link range.reference.algorithms.set.set_intersection set_intersection]] +[def __range_algorithms_set_difference__ [link range.reference.algorithms.set.set_difference set_difference]] +[def __range_algorithms_set_symmetric_difference__ [link range.reference.algorithms.set.set_symmetric_difference set_symmetric_difference]] + +[def __range_algorithms_push_heap__ [link range.reference.algorithms.heap.push_heap push_heap]] +[def __range_algorithms_pop_heap__ [link range.reference.algorithms.heap.pop_heap pop_heap]] +[def __range_algorithms_make_heap__ [link range.reference.algorithms.heap.make_heap make_heap]] +[def __range_algorithms_sort_heap__ [link range.reference.algorithms.heap.sort_heap sort_heap]] + +[def __range_algorithms_next_permutation__ [link range.reference.algorithms.permutation.next_permutation next_permutation]] +[def __range_algorithms_prev_permutation__ [link range.reference.algorithms.permutation.prev_permutation prev_permutation]] + +[def __range_algorithm_ext_copy_n__ [link range.reference.algorithms.new.copy_n copy_n]] +[def __range_algorithm_ext_erase__ [link range.reference.algorithms.new.erase erase]] +[def __range_algorithm_ext_for_each__ [link range.reference.algorithms.new.for_each for_each]] +[def __range_algorithm_ext_insert__ [link range.reference.algorithms.new.insert insert]] +[def __range_algorithm_ext_iota__ [link range.reference.algorithms.new.iota iota]] +[def __range_algorithm_ext_is_sorted__ [link range.reference.algorithms.new.is_sorted is_sorted]] +[def __range_algorithm_ext_overwrite__ [link range.reference.algorithms.new.overwrite overwrite]] +[def __range_algorithm_ext_push_back__ [link range.reference.algorithms.new.push_back push_back]] +[def __range_algorithm_ext_push_front__ [link range.reference.algorithms.new.push_front push_front]] [def __single_pass_iterator__ [@boost:/libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators Single Pass Iterator]] [def __forward_traversal_iterator__ [@boost:/libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators Forward Traversal Iterator]] @@ -80,11 +175,15 @@ [def __sgi_inner_product__ [@http://www.sgi.com/tech/stl/inner_product.html inner_product]] [def __sgi_partial_sum__ [@http://www.sgi.com/tech/stl/partial_sum.html partial_sum]] -Boost.Range is a collection of concepts and utilities that are particularly useful for specifying and implementing generic algorithms. +Boost.Range is a collection of concepts and utilities, range-based algorithms, +as well as range adaptors that allow for efficient and expressive code. + +Using Boost.Range inplace of the standard library alternatives results in more +readable code and in many cases greater efficiency. + [include introduction.qbk] [include concepts.qbk] [include reference.qbk] -[include utilities.qbk] [include style.qbk] [include headers.qbk] [include examples.qbk] diff --git a/doc/headers.qbk b/doc/headers.qbk index 9e29745..0013853 100644 --- a/doc/headers.qbk +++ b/doc/headers.qbk @@ -1,5 +1,6 @@ [section Library Headers] +[section General] [table [[Header ] [Includes ] [Related Concept ]] [[`` ] [everything from Boost.Range version 1 (Boost versions 1.42 and below). Includes the core range functions and metafunctinos, but excludes Range Adaptors and Range Algorithms. ] [- ]] @@ -23,7 +24,115 @@ [[`` ] [__iterator_range__ ] [- ]] [[`` ] [__sub_range__ ] [- ]] [[`` ] [__range_concepts__ ] [- ]] + [[`` ] [every range adaptor ] [- ]] + [[`` ] [every range equivalent of an STL algorithm ] [- ]] + [[`` ] [every range algorithm that is an extension of the STL algorithms ] [- ]] + [[`` ] [ __counting_range__ ] [-]] + [[`` ] [ __istream_range__ ] [-]] + [[`` ] [ __irange__ ] [-]] + [[`` ] [ __join__ ] [-]] ] +[endsect] + +[section Adaptors] +[table + [[Header ][Includes ]] + [[``] [__range_adaptors_adjacent_filtered__ ]] + [[``] [__range_adaptors_copied__]] + [[``] [__range_adaptors_filtered__]] + [[``] [__range_adaptors_indexed__]] + [[``] [__range_adaptors_map_keys__ __range_adaptors_map_values__]] + [[``] [__range_adaptors_replaced__]] + [[``] [__range_adaptors_replaced_if__]] + [[``] [__range_adaptors_reversed__]] + [[``] [__range_adaptors_sliced__]] + [[``] [__range_adaptors_strided__]] + [[``] [__range_adaptors_tokenized__]] + [[``] [__range_adaptors_transformed__]] + [[``] [__range_adaptors_uniqued__]] +] +[endsect] + +[section Algorithm] +[table + [[Header ][Includes ]] + [[``] [__range_algorithms_adjacent_find__]] + [[``] [__range_algorithms_binary_search__]] + [[``] [__range_algorithms_copy__]] + [[``] [__range_algorithms_copy_backward__]] + [[``] [__range_algorithms_count__]] + [[``] [__range_algorithms_count_if__]] + [[``] [__range_algorithms_equal__]] + [[``] [__range_algorithms_equal_range__]] + [[``] [__range_algorithms_fill__]] + [[``] [__range_algorithms_fill_n__]] + [[``] [__range_algorithms_find__]] + [[``] [__range_algorithms_find_end__]] + [[``] [__range_algorithms_find_first_of__]] + [[``] [__range_algorithms_find_if__]] + [[``] [__range_algorithms_for_each__]] + [[``] [__range_algorithms_generate__]] + [[``] [__range_algorithms_push_heap__ + __range_algorithms_pop_heap__ + __range_algorithms_make_heap__ + __range_algorithms_sort_heap__]] + [[``] [__range_algorithms_inplace_merge__]] + [[``] [__range_algorithms_lexicographical_compare__]] + [[``] [__range_algorithms_lower_bound__]] + [[``] [__range_algorithms_max_element__]] + [[``] [__range_algorithms_merge__]] + [[``] [__range_algorithms_min_element__]] + [[``] [__range_algorithms_mismatch__]] + [[``] [__range_algorithms_nth_element__]] + [[``] [__range_algorithms_partial_sort__]] + [[``] [__range_algorithms_partition__]] + [[``] [__range_algorithms_next_permutation__ + __range_algorithms_prev_permutation__]] + [[``] [__range_algorithms_random_shuffle__]] + [[``] [__range_algorithms_remove__]] + [[``] [__range_algorithms_remove_copy__]] + [[``] [__range_algorithms_remove_copy_if__]] + [[``] [__range_algorithms_remove_if__]] + [[``] [__range_algorithms_replace__]] + [[``] [__range_algorithms_replace_copy__]] + [[``] [__range_algorithms_replace_copy_if__]] + [[``] [__range_algorithms_replace_if__]] + [[``] [__range_algorithms_reverse__]] + [[``] [__range_algorithms_reverse_copy__]] + [[``] [__range_algorithms_rotate__]] + [[``] [__range_algorithms_rotate_copy__]] + [[``] [__range_algorithms_search__]] + [[``] [__range_algorithms_search_n__]] + [[``] [__range_algorithms_includes__ + __range_algorithms_set_union__ + __range_algorithms_set_intersection__ + __range_algorithms_set_difference__ + __range_algorithms_set_symmetric_difference__]] + [[``] [__range_algorithms_sort__]] + [[``] [__range_algorithms_stable_partition__]] + [[``] [__range_algorithms_swap_ranges__]] + [[``] [__range_algorithms_transform__]] + [[``] [__range_algorithms_unique__]] + [[``] [__range_algorithms_unique_copy__]] + [[``] [__range_algorithms_upper_bound__]] +] +[endsect] + +[section Algorithm Extensions] +[table + [[Header ][Includes ]] + [[``] [__range_algorithm_ext_copy_n__]] + [[``] [__range_algorithm_ext_erase__]] + [[``] [__range_algorithm_ext_for_each__]] + [[``] [__range_algorithm_ext_insert__]] + [[``] [__range_algorithm_ext_iota__]] + [[``] [__range_algorithm_ext_is_sorted__]] + [[``] [__range_algorithm_ext_overwrite__]] + [[``] [__range_algorithm_ext_push_back__]] + [[``] [__range_algorithm_ext_push_front__]] +] +[endsect] [endsect] diff --git a/doc/history_ack.qbk b/doc/history_ack.qbk index 4d4b103..545b3ab 100644 --- a/doc/history_ack.qbk +++ b/doc/history_ack.qbk @@ -1,12 +1,13 @@ [section:history_ack History and Acknowledgement] +[heading Version 1 - before Boost 1.43] The library have been under way for a long time. Dietmar Kühl originally intended to submit an `array_traits` class template which had most of the functionality present now, but only for arrays and standard containers. Meanwhile work on algorithms for containers in various contexts showed the need for handling pairs of iterators, and string libraries needed special treatment of character arrays. In the end it made sense to formalize the minimal requirements of these similar concepts. And the results are the Range concepts found in this library. The term Range was adopted because of paragraph 24.1/7 from the C++ standard: -Most of the library's algorithmic templates that operate on data structures have interfaces that use ranges. A range is a pair of iterators that designate the beginning and end of the computation. A range [i, i) is an empty range; in general, a range [i, j) refers to the elements in the data structure starting with the one pointed to by i and up to but not including the one pointed to by j. Range [i, j) is valid if and only if j is reachable from i. The result of the application of functions in the library to invalid ranges is undefined. +Most of the library's algorithmic templates that operate on data structures have interfaces that use ranges. A range is a pair of iterators that designate the beginning and end of the computation. A range [i, i) is an empty range; in general, a range [i, j) refers to the elements in the data structure starting with the one pointed to by i and up to but not including the one pointed to by j. Range [i, j) is valid if and only if j is reachable from i. The result of the application of functions in the library to invalid ranges is undefined. Special thanks goes to @@ -14,9 +15,33 @@ Special thanks goes to * Pavel Vozenilek for help with porting the library * Jonathan Turkanis and John Torjo for help with documentation * Hartmut Kaiser for being review manager -* Jonathan Turkanis for porting the lib (as far sa possible) to vc6 and vc7. +* Jonathan Turkanis for porting the lib (as far sa possible) to vc6 and vc7. -The concept checks and their documentation was provided by Daniel Walker. +The concept checks and their documentation was provided by Daniel Walker. + +[heading Version 2 - Boost 1.43 and beyond] +This version introduced Range Adaptors and Range Algorithms. This version 2 is +the result of a merge of all of the RangeEx features into Boost.Range. + +There were an enormous number of very significant contributors through all +stages of this library. + +The people in the following list all made contributions in the form of reviews, +user feedback, design suggestions, or defect detection: + +* Thorsten Ottosen: review management, design advice, documentation feedback +* Eric Niebler: feedback +* Joel de Guzman: review +* Mathias Gaunard: review +* David Abrahams: implementation advice +* Robert Jones: defect reports, usage feedback +* Sean Parent: contributed experience from the Adobe range library +* Arno Schoedl: implementations, and review +* Rogier van Dalen: review +* Vincente Botet: review, documentation feedback + +Regardless of how I write this section it will never truly fairly capture the +gratitude that I feel to all who have contributed. Thank you everyone. [endsect] diff --git a/doc/html/index.html b/doc/html/index.html index 27ee9ba..f6095bd 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@

- Boost.Range is a collection of concepts and utilities that are particularly useful - for specifying and implementing generic algorithms. + Boost.Range is a collection of concepts and utilities, range-based algorithms, + as well as range adaptors that allow for efficient and expressive code. +

+

+ Using Boost.Range inplace of the standard library alternatives results in more + readable code and in many cases greater efficiency.

- +

Last revised: April 11, 2010 at 21:49:16 GMT

Last revised: April 28, 2010 at 17:51:33 GMT


diff --git a/doc/html/quickbook_HTML.manifest b/doc/html/quickbook_HTML.manifest index df8f151..7c5d13a 100644 --- a/doc/html/quickbook_HTML.manifest +++ b/doc/html/quickbook_HTML.manifest @@ -9,117 +9,134 @@ range/concepts/random_access_range.html range/concepts/concept_checking.html range/reference.html range/reference/overview.html -range/reference/synopsis.html -range/reference/semantics.html -range/reference/semantics/metafunctions.html -range/reference/semantics/functions.html +range/reference/concept_implementation.html +range/reference/concept_implementation/synopsis.html +range/reference/concept_implementation/semantics.html +range/reference/concept_implementation/semantics/metafunctions.html +range/reference/concept_implementation/semantics/functions.html range/reference/adaptors.html -range/reference/adaptors/adaptors_introduction.html -range/reference/adaptors/adaptors_synopsis.html -range/reference/adaptors/adaptors_general_requirements.html -range/reference/adaptors/adaptors_reference.html -range/reference/adaptors/adaptors_reference/adjacent_filtered.html -range/reference/adaptors/adaptors_reference/copied.html -range/reference/adaptors/adaptors_reference/filtered.html -range/reference/adaptors/adaptors_reference/indexed.html -range/reference/adaptors/adaptors_reference/indirected.html -range/reference/adaptors/adaptors_reference/map_keys.html -range/reference/adaptors/adaptors_reference/map_values.html -range/reference/adaptors/adaptors_reference/replaced.html -range/reference/adaptors/adaptors_reference/replaced_if.html -range/reference/adaptors/adaptors_reference/reversed.html -range/reference/adaptors/adaptors_reference/sliced.html -range/reference/adaptors/adaptors_reference/strided.html -range/reference/adaptors/adaptors_reference/tokenized.html -range/reference/adaptors/adaptors_reference/transformed.html -range/reference/adaptors/adaptors_reference/uniqued.html +range/reference/adaptors/introduction.html +range/reference/adaptors/general_requirements.html +range/reference/adaptors/reference.html +range/reference/adaptors/reference/adjacent_filtered.html +range/reference/adaptors/reference/copied.html +range/reference/adaptors/reference/filtered.html +range/reference/adaptors/reference/indexed.html +range/reference/adaptors/reference/indirected.html +range/reference/adaptors/reference/map_keys.html +range/reference/adaptors/reference/map_values.html +range/reference/adaptors/reference/replaced.html +range/reference/adaptors/reference/replaced_if.html +range/reference/adaptors/reference/reversed.html +range/reference/adaptors/reference/sliced.html +range/reference/adaptors/reference/strided.html +range/reference/adaptors/reference/tokenized.html +range/reference/adaptors/reference/transformed.html +range/reference/adaptors/reference/uniqued.html range/reference/algorithms.html range/reference/algorithms/range_algorithm_introduction.html -range/reference/algorithms/range_algorithm_mutating_algorithms.html -range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html -range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html -range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html -range/reference/algorithms/range_algorithm_mutating_algorithms/fill_n.html -range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html -range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html -range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html -range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html -range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html -range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html -range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html -range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html -range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html -range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html -range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html -range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html -range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html -range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html -range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html -range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html -range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html -range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html -range/reference/algorithms/set_algorithms.html -range/reference/algorithms/set_algorithms/includes.html -range/reference/algorithms/set_algorithms/set_union.html -range/reference/algorithms/set_algorithms/set_intersection.html -range/reference/algorithms/set_algorithms/set_difference.html -range/reference/algorithms/set_algorithms/set_symmetric_difference.html -range/reference/algorithms/heap_algorithms.html -range/reference/algorithms/heap_algorithms/push_heap.html -range/reference/algorithms/heap_algorithms/pop_heap.html -range/reference/algorithms/heap_algorithms/make_heap.html -range/reference/algorithms/heap_algorithms/sort_heap.html -range/reference/algorithms/permutation_algorithms.html -range/reference/algorithms/permutation_algorithms/next_permutation.html -range/reference/algorithms/permutation_algorithms/prev_permutation.html -range/reference/algorithms/range_algorithm_new_algorithms.html -range/reference/algorithms/range_algorithm_new_algorithms/erase.html -range/reference/algorithms/range_algorithm_new_algorithms/for_each.html -range/reference/algorithms/range_algorithm_new_algorithms/insert.html -range/reference/algorithms/range_algorithm_new_algorithms/iota.html -range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html -range/reference/algorithms/range_algorithm_new_algorithms/push_back.html -range/reference/algorithms/range_algorithm_new_algorithms/push_front.html -range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html -range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html -range/reference/algorithms/range_numeric.html -range/reference/algorithms/range_numeric/accumulate.html -range/reference/algorithms/range_numeric/adjacent_difference.html -range/reference/algorithms/range_numeric/inner_product.html -range/reference/algorithms/range_numeric/partial_sum.html +range/reference/algorithms/mutating.html +range/reference/algorithms/mutating/copy.html +range/reference/algorithms/mutating/copy_backward.html +range/reference/algorithms/mutating/fill.html +range/reference/algorithms/mutating/fill_n.html +range/reference/algorithms/mutating/generate.html +range/reference/algorithms/mutating/inplace_merge.html +range/reference/algorithms/mutating/merge.html +range/reference/algorithms/mutating/nth_element.html +range/reference/algorithms/mutating/partial_sort.html +range/reference/algorithms/mutating/partition.html +range/reference/algorithms/mutating/random_shuffle.html +range/reference/algorithms/mutating/remove.html +range/reference/algorithms/mutating/remove_copy.html +range/reference/algorithms/mutating/remove_copy_if.html +range/reference/algorithms/mutating/remove_if.html +range/reference/algorithms/mutating/replace.html +range/reference/algorithms/mutating/replace_copy.html +range/reference/algorithms/mutating/replace_copy_if.html +range/reference/algorithms/mutating/replace_if.html +range/reference/algorithms/mutating/reverse.html +range/reference/algorithms/mutating/reverse_copy.html +range/reference/algorithms/mutating/rotate.html +range/reference/algorithms/mutating/rotate_copy.html +range/reference/algorithms/mutating/sort.html +range/reference/algorithms/mutating/stable_partition.html +range/reference/algorithms/mutating/stable_sort.html +range/reference/algorithms/mutating/swap_ranges.html +range/reference/algorithms/mutating/transform.html +range/reference/algorithms/mutating/unique.html +range/reference/algorithms/mutating/unique_copy.html +range/reference/algorithms/non_mutating.html +range/reference/algorithms/non_mutating/adjacent_find.html +range/reference/algorithms/non_mutating/binary_search.html +range/reference/algorithms/non_mutating/count.html +range/reference/algorithms/non_mutating/count_if.html +range/reference/algorithms/non_mutating/equal.html +range/reference/algorithms/non_mutating/equal_range.html +range/reference/algorithms/non_mutating/for_each.html +range/reference/algorithms/non_mutating/find.html +range/reference/algorithms/non_mutating/find_end.html +range/reference/algorithms/non_mutating/find_first_of.html +range/reference/algorithms/non_mutating/find_if.html +range/reference/algorithms/non_mutating/lexicographical_compare.html +range/reference/algorithms/non_mutating/lower_bound.html +range/reference/algorithms/non_mutating/max_element.html +range/reference/algorithms/non_mutating/min_element.html +range/reference/algorithms/non_mutating/mismatch.html +range/reference/algorithms/non_mutating/search.html +range/reference/algorithms/non_mutating/search_n.html +range/reference/algorithms/non_mutating/upper_bound.html +range/reference/algorithms/set.html +range/reference/algorithms/set/includes.html +range/reference/algorithms/set/set_union.html +range/reference/algorithms/set/set_intersection.html +range/reference/algorithms/set/set_difference.html +range/reference/algorithms/set/set_symmetric_difference.html +range/reference/algorithms/heap.html +range/reference/algorithms/heap/push_heap.html +range/reference/algorithms/heap/pop_heap.html +range/reference/algorithms/heap/make_heap.html +range/reference/algorithms/heap/sort_heap.html +range/reference/algorithms/permutation.html +range/reference/algorithms/permutation/next_permutation.html +range/reference/algorithms/permutation/prev_permutation.html +range/reference/algorithms/new.html +range/reference/algorithms/new/copy_n.html +range/reference/algorithms/new/erase.html +range/reference/algorithms/new/for_each.html +range/reference/algorithms/new/insert.html +range/reference/algorithms/new/iota.html +range/reference/algorithms/new/is_sorted.html +range/reference/algorithms/new/overwrite.html +range/reference/algorithms/new/push_back.html +range/reference/algorithms/new/push_front.html +range/reference/algorithms/new/remove_erase.html +range/reference/algorithms/new/remove_erase_if.html +range/reference/algorithms/numeric.html +range/reference/algorithms/numeric/accumulate.html +range/reference/algorithms/numeric/adjacent_difference.html +range/reference/algorithms/numeric/inner_product.html +range/reference/algorithms/numeric/partial_sum.html range/reference/ranges.html range/reference/ranges/counting_range.html range/reference/ranges/istream_range.html range/reference/ranges/irange.html +range/reference/utilities.html +range/reference/utilities/iterator_range.html +range/reference/utilities/sub_range.html +range/reference/utilities/join.html range/reference/extending.html range/reference/extending/method_1.html range/reference/extending/method_2.html range/reference/extending/method_3.html range/reference/extending/method_3/method_3_1.html range/reference/extending/method_3/method_3_2.html -range/utilities.html -range/utilities/iterator_range.html -range/utilities/sub_range.html -range/utilities/join.html range/style_guide.html range/library_headers.html +range/library_headers/general.html +range/library_headers/adaptors.html +range/library_headers/algorithm.html +range/library_headers/algorithm_extensions.html range/examples.html range/mfc_atl.html range/mfc_atl/requirements.html diff --git a/doc/html/range/concepts/bidirectional_range.html b/doc/html/range/concepts/bidirectional_range.html index e3ae956..72c8c28 100644 --- a/doc/html/range/concepts/bidirectional_range.html +++ b/doc/html/range/concepts/bidirectional_range.html @@ -27,7 +27,7 @@ Bidirectional Range
- + Notation
@@ -65,7 +65,7 @@
- + Description

@@ -75,7 +75,7 @@ Traversal Iterator.

- + Refinement of
@@ -83,7 +83,7 @@ Forward Range

- + Associated types
@@ -136,7 +136,7 @@
- + Valid expressions
@@ -221,7 +221,7 @@
- + Complexity guarantees
@@ -232,7 +232,7 @@ Forward Range.

- + Invariants
@@ -272,15 +272,16 @@
- + See also

- Implementation of - metafunctions + Implementation + of metafunctions

- Implementation of functions + Implementation + of functions

diff --git a/doc/html/range/concepts/concept_checking.html b/doc/html/range/concepts/concept_checking.html index b5d5407..30d3850 100644 --- a/doc/html/range/concepts/concept_checking.html +++ b/doc/html/range/concepts/concept_checking.html @@ -79,7 +79,7 @@
- + See also

diff --git a/doc/html/range/concepts/forward_range.html b/doc/html/range/concepts/forward_range.html index 919f6dd..61ec9e8 100644 --- a/doc/html/range/concepts/forward_range.html +++ b/doc/html/range/concepts/forward_range.html @@ -27,7 +27,7 @@ Forward Range

- + Notation
@@ -65,7 +65,7 @@
- + Description

@@ -73,14 +73,14 @@ Traversal Iterator.

- + Refinement of

Single Pass Range

- + Associated types
@@ -132,15 +132,16 @@
- + See also

- Implementation of - metafunctions + Implementation + of metafunctions

- Implementation of functions + Implementation + of functions

diff --git a/doc/html/range/concepts/random_access_range.html b/doc/html/range/concepts/random_access_range.html index a695e97..379410e 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
- + Description

@@ -35,7 +35,7 @@ Access Traversal Iterator.

- + Refinement of
@@ -43,7 +43,7 @@ Bidirectional Range

- + Valid expressions
@@ -89,7 +89,7 @@
- + Expression semantics
@@ -139,7 +139,7 @@
- + Complexity guarantees
@@ -147,7 +147,7 @@ boost::size(a) completes in amortized constant time.

- + Invariants
diff --git a/doc/html/range/concepts/single_pass_range.html b/doc/html/range/concepts/single_pass_range.html index 5588147..32bcef4 100644 --- a/doc/html/range/concepts/single_pass_range.html +++ b/doc/html/range/concepts/single_pass_range.html @@ -27,7 +27,7 @@ Single Pass Range
- + Notation
@@ -65,7 +65,7 @@
- + Description

@@ -73,7 +73,7 @@ Pass Iterator.

- + Associated types
@@ -126,7 +126,7 @@
- + Valid expressions
@@ -198,7 +198,7 @@
- + Expression semantics
@@ -266,7 +266,7 @@
- + Complexity guarantees
@@ -276,7 +276,7 @@ constant time.

- + Invariants
@@ -316,18 +316,19 @@
- + See also

Extending the library for UDTs

- Implementation of - metafunctions + Implementation + of metafunctions

- Implementation of functions + Implementation + of functions

Container diff --git a/doc/html/range/examples.html b/doc/html/range/examples.html index b272df8..4be5b97 100644 --- a/doc/html/range/examples.html +++ b/doc/html/range/examples.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@


-PrevUpHomeNext +PrevUpHomeNext

@@ -56,7 +56,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/range/faq.html b/doc/html/range/faq.html index 0c9d40b..cb21529 100644 --- a/doc/html/range/faq.html +++ b/doc/html/range/faq.html @@ -46,10 +46,9 @@

- Note that an iterator_range is somewhat more + Note that an iterator_range is somewhat more convenient than a pair - and that a sub_range - does propagate const-ness. + and that a sub_range does propagate const-ness.

diff --git a/doc/html/range/history_ack.html b/doc/html/range/history_ack.html index 930b6b6..37d497d 100644 --- a/doc/html/range/history_ack.html +++ b/doc/html/range/history_ack.html @@ -25,6 +25,11 @@ +

+ + Version 1 - + before Boost 1.43 +

The library have been under way for a long time. Dietmar Kühl originally intended to submit an array_traits class @@ -73,6 +78,59 @@

The concept checks and their documentation was provided by Daniel Walker.

+

+ + Version + 2 - Boost 1.43 and beyond +

+

+ This version introduced Range Adaptors and Range Algorithms. This version 2 + is the result of a merge of all of the RangeEx features into Boost.Range. +

+

+ There were an enormous number of very significant contributors through all + stages of this library. +

+

+ The people in the following list all made contributions in the form of reviews, + user feedback, design suggestions, or defect detection: +

+
    +
  • + Thorsten Ottosen: review management, design advice, documentation feedback +
  • +
  • + Eric Niebler: feedback +
  • +
  • + Joel de Guzman: review +
  • +
  • + Mathias Gaunard: review +
  • +
  • + David Abrahams: implementation advice +
  • +
  • + Robert Jones: defect reports, usage feedback +
  • +
  • + Sean Parent: contributed experience from the Adobe range library +
  • +
  • + Arno Schoedl: implementations, and review +
  • +
  • + Rogier van Dalen: review +
  • +
  • + Vincente Botet: review, documentation feedback +
  • +
+

+ Regardless of how I write this section it will never truly fairly capture the + gratitude that I feel to all who have contributed. Thank you everyone. +

diff --git a/doc/html/range/library_headers.html b/doc/html/range/library_headers.html index 58ddcff..0e06413 100644 --- a/doc/html/range/library_headers.html +++ b/doc/html/range/library_headers.html @@ -7,7 +7,7 @@ - +
@@ -20,401 +20,19 @@

-PrevUpHomeNext +PrevUpHomeNext
-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Header -

-
-

- Includes -

-
-

- Related Concept -

-
-

- <boost/range.hpp> -

-
-

- everything from Boost.Range version 1 (Boost versions 1.42 and below). - Includes the core range functions and metafunctinos, but excludes - Range Adaptors and Range Algorithms. -

-
-

- - -

-
-

- <boost/range/metafunctions.hpp> -

-
-

- every metafunction -

-
-

- - -

-
-

- <boost/range/functions.hpp> -

-
-

- every function -

-
-

- - -

-
-

- <boost/range/value_type.hpp> -

-
-

- range_value -

-
-

- Single Pass Range -

-
-

- <boost/range/iterator.hpp> -

-
-

- range_iterator -

-
-

- Single Pass Range -

-
-

- <boost/range/difference_type.hpp> -

-
-

- range_difference -

-
-

- Forward Range -

-
-

- <boost/range/pointer.hpp> -

-
-

- range_pointer -

-
-

- - -

-
-

- <boost/range/category.hpp> -

-
-

- range_category -

-
-

- - -

-
-

- <boost/range/reverse_iterator.hpp> -

-
-

- range_reverse_iterator -

-
-

- Bidirectional - Range -

-
-

- <boost/range/begin.hpp> -

-
-

- begin and const_begin -

-
-

- Single Pass Range -

-
-

- <boost/range/end.hpp> -

-
-

- end and const_end -

-
-

- Single Pass Range -

-
-

- <boost/range/empty.hpp> -

-
-

- empty -

-
-

- Single Pass Range -

-
-

- <boost/range/distance.hpp> -

-
-

- distance -

-
-

- Forward Range -

-
-

- <boost/range/size.hpp> -

-
-

- size -

-
-

- Random Access - Range -

-
-

- <boost/range/rbegin.hpp> -

-
-

- rbegin and const_rbegin -

-
-

- Bidirectional - Range -

-
-

- <boost/range/rend.hpp> -

-
-

- rend and const_rend -

-
-

- Bidirectional - Range -

-
-

- <boost/range/as_array.hpp> -

-
-

- as_array -

-
-

- - -

-
-

- <boost/range/as_literal.hpp> -

-
-

- as_literal -

-
-

- - -

-
-

- <boost/range/iterator_range.hpp> -

-
-

- iterator_range -

-
-

- - -

-
-

- <boost/range/sub_range.hpp> -

-
-

- sub_range -

-
-

- - -

-
-

- <boost/range/concepts.hpp> -

-
-

- Range concepts -

-
-

- - -

-
+
@@ -426,7 +44,7 @@

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/range/library_headers/adaptors.html b/doc/html/range/library_headers/adaptors.html new file mode 100644 index 0000000..f8810a4 --- /dev/null +++ b/doc/html/range/library_headers/adaptors.html @@ -0,0 +1,232 @@ + + + +Adaptors + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

+ <boost/range/adaptor/adjacent_filtered.hpp> +

+
+

+ adjacent_filtered +

+
+

+ <boost/range/adaptor/copied.hpp> +

+
+

+ copied +

+
+

+ <boost/range/adaptor/filtered.hpp> +

+
+

+ filtered +

+
+

+ <boost/range/adaptor/indexed.hpp> +

+
+

+ indexed +

+
+

+ <boost/range/adaptor/indirected.hpp. +

+
+

+ indirected +

+
+

+ <boost/range/adaptor/map.hpp> +

+
+

+ map_keys + map_values +

+
+

+ <boost/range/adaptor/replaced.hpp> +

+
+

+ replaced +

+
+

+ <boost/range/adaptor/replaced_if.hpp> +

+
+

+ replaced_if +

+
+

+ <boost/range/adaptor/reversed.hpp> +

+
+

+ reversed +

+
+

+ <boost/range/adaptor/sliced.hpp> +

+
+

+ sliced +

+
+

+ <boost/range/adaptor/strided.hpp> +

+
+

+ strided +

+
+

+ <boost/range/adaptor/tokenized.hpp> +

+
+

+ tokenized +

+
+

+ <boost/range/adaptor/transformed.hpp> +

+
+

+ transformed +

+
+

+ <boost/range/adaptor/uniqued.hpp> +

+
+

+ uniqued +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/library_headers/algorithm.html b/doc/html/range/library_headers/algorithm.html new file mode 100644 index 0000000..6beb47e --- /dev/null +++ b/doc/html/range/library_headers/algorithm.html @@ -0,0 +1,683 @@ + + + +Algorithm + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

+ <boost/range/algorithm/adjacent_find.hpp> +

+
+

+ adjacent_find +

+
+

+ <boost/range/algorithm/binary_search.hpp> +

+
+

+ binary_search +

+
+

+ <boost/range/algorithm/copy.hpp> +

+
+

+ copy +

+
+

+ <boost/range/algorithm/copy_backward.hpp> +

+
+

+ copy_backward +

+
+

+ <boost/range/algorithm/count.hpp> +

+
+

+ count +

+
+

+ <boost/range/algorithm/count_if.hpp> +

+
+

+ count_if +

+
+

+ <boost/range/algorithm/equal.hpp> +

+
+

+ equal +

+
+

+ <boost/range/algorithm/equal_range.hpp> +

+
+

+ equal_range +

+
+

+ <boost/range/algorithm/fill.hpp> +

+
+

+ fill +

+
+

+ <boost/range/algorithm/fill_n.hpp> +

+
+

+ fill_n +

+
+

+ <boost/range/algorithm/find.hpp> +

+
+

+ find +

+
+

+ <boost/range/algorithm/find_end.hpp> +

+
+

+ find_end +

+
+

+ <boost/range/algorithm/find_first_of.hpp> +

+
+

+ find_first_of +

+
+

+ <boost/range/algorithm/find_if.hpp> +

+
+

+ find_if +

+
+

+ <boost/range/algorithm/for_each.hpp> +

+
+

+ for_each +

+
+

+ <boost/range/algorithm/generate.hpp> +

+
+

+ generate +

+
+

+ <boost/range/algorithm/heap_algorithm.hpp> +

+
+

+ push_heap + pop_heap + make_heap + sort_heap +

+
+

+ <boost/range/algorithm/inplace_merge.hpp> +

+
+

+ inplace_merge +

+
+

+ <boost/range/algorithm/lexicographical_compare.hpp> +

+
+

+ lexicographical_compare +

+
+

+ <boost/range/algorithm/lower_bound.hpp> +

+
+

+ lower_bound +

+
+

+ <boost/range/algorithm/max_element.hpp> +

+
+

+ max_element +

+
+

+ <boost/range/algorithm/merge.hpp> +

+
+

+ merge +

+
+

+ <boost/range/algorithm/min_element.hpp> +

+
+

+ min_element +

+
+

+ <boost/range/algorithm/mismatch.hpp> +

+
+

+ mismatch +

+
+

+ <boost/range/algorithm/nth_element.hpp> +

+
+

+ nth_element +

+
+

+ <boost/range/algorithm/partial_sort.hpp> +

+
+

+ partial_sort +

+
+

+ <boost/range/algorithm/partition.hpp> +

+
+

+ partition +

+
+

+ <boost/range/algorithm/permutation.hpp> +

+
+

+ next_permutation + prev_permutation +

+
+

+ <boost/range/algorithm/random_shuffle.hpp> +

+
+

+ random_shuffle +

+
+

+ <boost/range/algorithm/remove.hpp> +

+
+

+ remove +

+
+

+ <boost/range/algorithm/remove_copy.hpp> +

+
+

+ remove_copy +

+
+

+ <boost/range/algorithm/remove_copy_if.hpp> +

+
+

+ remove_copy_if +

+
+

+ <boost/range/algorithm/remove_if.hpp> +

+
+

+ remove_if +

+
+

+ <boost/range/algorithm/replace.hpp> +

+
+

+ replace +

+
+

+ <boost/range/algorithm/replace_copy.hpp> +

+
+

+ replace_copy +

+
+

+ <boost/range/algorithm/replace_copy_if.hpp> +

+
+

+ replace_copy_if +

+
+

+ <boost/range/algorithm/replace_if.hpp> +

+
+

+ replace_if +

+
+

+ <boost/range/algorithm/reverse.hpp> +

+
+

+ reverse +

+
+

+ <boost/range/algorithm/reverse_copy.hpp> +

+
+

+ reverse_copy +

+
+

+ <boost/range/algorithm/rotate.hpp> +

+
+

+ rotate +

+
+

+ <boost/range/algorithm/rotate_copy.hpp> +

+
+

+ rotate_copy +

+
+

+ <boost/range/algorithm/search.hpp> +

+
+

+ search +

+
+

+ <boost/range/algorithm/search_n.hpp> +

+
+

+ search_n +

+
+

+ <boost/range/algorithm/set_algorithm.hpp> +

+
+

+ includes + set_union + set_intersection + set_difference + set_symmetric_difference +

+
+

+ <boost/range/algorithm/sort.hpp> +

+
+

+ sort +

+
+

+ <boost/range/algorithm/stable_partition.hpp> +

+
+

+ stable_partition +

+
+

+ <boost/range/algorithm/swap_ranges.hpp> +

+
+

+ swap_ranges +

+
+

+ <boost/range/algorithm/transform.hpp> +

+
+

+ transform +

+
+

+ <boost/range/algorithm/unique.hpp> +

+
+

+ unique +

+
+

+ <boost/range/algorithm/unique_copy.hpp> +

+
+

+ unique_copy +

+
+

+ <boost/range/algorithm/upper_bound.hpp> +

+
+

+ upper_bound +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/library_headers/algorithm_extensions.html b/doc/html/range/library_headers/algorithm_extensions.html new file mode 100644 index 0000000..f3dd061 --- /dev/null +++ b/doc/html/range/library_headers/algorithm_extensions.html @@ -0,0 +1,172 @@ + + + +Algorithm Extensions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

+ <boost/range/algorithm_ext/copy_n.hpp> +

+
+

+ copy_n +

+
+

+ <boost/range/algorithm_ext/erase.hpp> +

+
+

+ erase +

+
+

+ <boost/range/algorithm_ext/for_each.hpp> +

+
+

+ for_each +

+
+

+ <boost/range/algorithm_ext/insert.hpp> +

+
+

+ insert +

+
+

+ <boost/range/algorithm_ext/iota.hpp> +

+
+

+ iota +

+
+

+ <boost/range/algorithm_ext/is_sorted.hpp> +

+
+

+ is_sorted +

+
+

+ <boost/range/algorithm_ext/overwrite.hpp> +

+
+

+ overwrite +

+
+

+ <boost/range/algorithm_ext/push_back.hpp> +

+
+

+ push_back +

+
+

+ <boost/range/algorithm_ext/push_front.hpp> +

+
+

+ push_front +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/library_headers/general.html b/doc/html/range/library_headers/general.html new file mode 100644 index 0000000..558fe74 --- /dev/null +++ b/doc/html/range/library_headers/general.html @@ -0,0 +1,551 @@ + + + +General + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

+ Related Concept +

+
+

+ <boost/range.hpp> +

+
+

+ everything from Boost.Range version 1 (Boost versions 1.42 and + below). Includes the core range functions and metafunctinos, but + excludes Range Adaptors and Range Algorithms. +

+
+

+ - +

+
+

+ <boost/range/metafunctions.hpp> +

+
+

+ every metafunction +

+
+

+ - +

+
+

+ <boost/range/functions.hpp> +

+
+

+ every function +

+
+

+ - +

+
+

+ <boost/range/value_type.hpp> +

+
+

+ range_value +

+
+

+ Single Pass Range +

+
+

+ <boost/range/iterator.hpp> +

+
+

+ range_iterator +

+
+

+ Single Pass Range +

+
+

+ <boost/range/difference_type.hpp> +

+
+

+ range_difference +

+
+

+ Forward Range +

+
+

+ <boost/range/pointer.hpp> +

+
+

+ range_pointer +

+
+

+ - +

+
+

+ <boost/range/category.hpp> +

+
+

+ range_category +

+
+

+ - +

+
+

+ <boost/range/reverse_iterator.hpp> +

+
+

+ range_reverse_iterator +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/begin.hpp> +

+
+

+ begin and const_begin +

+
+

+ Single Pass Range +

+
+

+ <boost/range/end.hpp> +

+
+

+ end and const_end +

+
+

+ Single Pass Range +

+
+

+ <boost/range/empty.hpp> +

+
+

+ empty +

+
+

+ Single Pass Range +

+
+

+ <boost/range/distance.hpp> +

+
+

+ distance +

+
+

+ Forward Range +

+
+

+ <boost/range/size.hpp> +

+
+

+ size +

+
+

+ Random Access + Range +

+
+

+ <boost/range/rbegin.hpp> +

+
+

+ rbegin and const_rbegin +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/rend.hpp> +

+
+

+ rend and const_rend +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/as_array.hpp> +

+
+

+ as_array +

+
+

+ - +

+
+

+ <boost/range/as_literal.hpp> +

+
+

+ as_literal +

+
+

+ - +

+
+

+ <boost/range/iterator_range.hpp> +

+
+

+ iterator_range +

+
+

+ - +

+
+

+ <boost/range/sub_range.hpp> +

+
+

+ sub_range +

+
+

+ - +

+
+

+ <boost/range/concepts.hpp> +

+
+

+ Range concepts +

+
+

+ - +

+
+

+ <boost/range/adaptors.hpp> +

+
+

+ every range adaptor +

+
+

+ - +

+
+

+ <boost/range/algorithm.hpp> +

+
+

+ every range equivalent of an STL algorithm +

+
+

+ - +

+
+

+ <boost/range/algorithm_ext.hpp> +

+
+

+ every range algorithm that is an extension of the STL algorithms +

+
+

+ - +

+
+

+ <boost/range/counting_range.hpp> +

+
+

+ counting_range +

+
+

+ - +

+
+

+ <boost/range/istream_range.hpp> +

+
+

+ istream_range +

+
+

+ - +

+
+

+ <boost/range/irange.hpp> +

+
+

+ irange +

+
+

+ - +

+
+

+ <boost/range/join.hpp> +

+
+

+ join +

+
+

+ - +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/mfc_atl.html b/doc/html/range/mfc_atl.html index 63558aa..c0f1c6d 100644 --- a/doc/html/range/mfc_atl.html +++ b/doc/html/range/mfc_atl.html @@ -34,7 +34,7 @@
References
- + Introduction

@@ -100,7 +100,7 @@

- + Overview

diff --git a/doc/html/range/portability.html b/doc/html/range/portability.html index 901e0b1..45d3a07 100644 --- a/doc/html/range/portability.html +++ b/doc/html/range/portability.html @@ -38,7 +38,7 @@

Notice also that some compilers cannot do function template ordering properly. - In that case one must rely of range_iterator and a single function + In that case one must rely of range_iterator and a single function definition instead of overloaded versions for const and non-const arguments. So if one cares about old compilers, one should not pass rvalues to the functions.

@@ -50,12 +50,14 @@ do not use built-in arrays,
  • - do not pass rvalues to begin(), - end() and iterator_range Range constructors + do not pass rvalues to begin(), + end() + and iterator_range Range constructors and assignment operators,
  • - use const_begin() and const_end() + use const_begin() + and const_end() whenever your code by intention is read-only; this will also solve most rvalue problems,
  • diff --git a/doc/html/range/reference.html b/doc/html/range/reference.html index 70c17dc..cbff24d 100644 --- a/doc/html/range/reference.html +++ b/doc/html/range/reference.html @@ -24,41 +24,37 @@
    Overview
    -
    Synopsis
    -
    Semantics
    +
    Range concept + implementation
    -
    Metafunctions
    -
    Functions
    +
    Synopsis
    +
    Semantics
    Range Adaptors
    -
    Introduction +
    Introduction and motivation
    -
    Synopsis
    -
    - General Requirements
    -
    Reference
    +
    General + Requirements
    +
    Reference
    Range Algorithm
    Introduction and motivation
    -
    - Mutating algorithms
    -
    - Non-mutating algorithms
    -
    Set algorithms
    -
    Heap algorithms
    -
    - Permutation algorithms
    -
    - New algorithms
    -
    Numeric +
    Mutating algorithms
    +
    Non-mutating algorithms
    +
    Set algorithms
    +
    Heap algorithms
    +
    Permutation + algorithms
    +
    New algorithms
    +
    Numeric algorithms
    Provided Ranges
    @@ -66,6 +62,12 @@
    istream_range
    irange
    +
    Utilities
    +
    +
    Class iterator_range
    +
    Class sub_range
    +
    Function join
    +
    Extending the library
    Method 1: provide diff --git a/doc/html/range/reference/adaptors.html b/doc/html/range/reference/adaptors.html index 5ab0ecd..b649558 100644 --- a/doc/html/range/reference/adaptors.html +++ b/doc/html/range/reference/adaptors.html @@ -6,8 +6,8 @@ - - + + @@ -20,19 +20,18 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -45,7 +44,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_introduction.html b/doc/html/range/reference/adaptors/adaptors_introduction.html index e1e4e26..80d2e25 100644 --- a/doc/html/range/reference/adaptors/adaptors_introduction.html +++ b/doc/html/range/reference/adaptors/adaptors_introduction.html @@ -122,7 +122,7 @@ situations, you will really appreciate the succinctness of operator|().

    - + Composition of Adaptors
    @@ -159,7 +159,7 @@ is the design solution to this problem.

    - + Range Adaptor alternative to copy_if algorithm
    @@ -176,7 +176,7 @@

    - + Range Adaptor alternative to count_if algorithm
    diff --git a/doc/html/range/reference/adaptors/adaptors_synopsis.html b/doc/html/range/reference/adaptors/adaptors_synopsis.html index d0fea59..c18bb4f 100644 --- a/doc/html/range/reference/adaptors/adaptors_synopsis.html +++ b/doc/html/range/reference/adaptors/adaptors_synopsis.html @@ -6,8 +6,8 @@ - - + + @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -61,7 +61,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/general_requirements.html b/doc/html/range/reference/adaptors/general_requirements.html new file mode 100644 index 0000000..63abc37 --- /dev/null +++ b/doc/html/range/reference/adaptors/general_requirements.html @@ -0,0 +1,141 @@ + + + +General Requirements + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + In the description of generator expressions, the following notation is + used: +

    +
      +
    • +fwdRng is an expression + of a type R that models + ForwardRange +
    • +
    • +biRng is an expression + of a type R that models + BidirectionalRange +
    • +
    • +rndRng is an expression + of a type R that models + RandomAccessRange +
    • +
    • +pred is an expression + of a type that models UnaryPredicate +
    • +
    • +bi_pred is an expression + of a type that models BinaryPredicate +
    • +
    • +fun is an expression + of a type that models UnaryFunction +
    • +
    • +value, new_value and old_value + are objects convertible to boost::range_value<R>::type +
    • +
    • +n,m are integer expressions convertible + to range_difference<R>::type +
    • +
    +

    + Also note that boost::range_value<R>::type must be implicitly convertible to + the type arguments to pred, + bi_pred and fun. +

    +

    + Range Category in the following adaptor descriptions refers to the minimum + range concept required by the range passed to the adaptor. The resultant + range is a model of the same range concept as the input range unless specified + otherwise. +

    +

    + Returned Range Category is the concept of the returned range. In some cases + the returned range is of a lesser category than the range passed to the + adaptor. For example, the filtered + adaptor returns only a ForwardRange + regardless of the input. +

    +

    + Furthermore, the following rules apply to any expression of the form +

    +
    rng | boost::adaptors::adaptor_generator
    +
    +

    +

    +

    + 1. Applying operator|() + to a range R (always left + argument) and a range adapter RA + (always right argument) yields a new range type which may not conform to + the same range concept as R. +

    +

    + 2. The return-type of operator|() is otherwise unspecified. +

    +

    + 3. operator|() + is found by Argument Dependent Lookup (ADL) because a range adaptor is + implemented in namespace boost::adaptors. +

    +

    + 4. operator|() + is used to add new behaviour lazily + and never modifies its left argument. +

    +

    + 5. All iterators extracted from the left argument are extracted using qualified + calls to boost::begin() + and boost::end(). +

    +

    + 6. In addition to the throw-clauses + below, operator|() + may throw exceptions as a result of copying iterators. If such copying + cannot throw an exception, then neither can the whole expression. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/adaptors/introduction.html b/doc/html/range/reference/adaptors/introduction.html new file mode 100644 index 0000000..1982491 --- /dev/null +++ b/doc/html/range/reference/adaptors/introduction.html @@ -0,0 +1,274 @@ + + + +Introduction and motivation + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + A Range Adaptor is a class that wraps + an existing Range to provide a new Range with different behaviour. Since + the behaviour of Ranges is determined by their associated iterators, a + Range Adaptor simply wraps the underlying iterators with new special iterators. + In this example +

    +

    + +

    +
    #include <boost/range/adaptors.hpp>
    +#include <boost/range/algorithm.hpp>
    +#include <iostream>
    +#include <vector>
    +
    +std::vector<int> vec;
    +boost::copy( vec | boost::adaptors::reversed,
    +             std::ostream_iterator<int>(std::cout) );
    +
    +

    +

    +

    + the iterators from vec + are wrapped reverse_iterators. + The type of the underlying Range Adapter is not documented because you + do not need to know it. All that is relevant is that the expression +

    +

    + +

    +
    vec | boost::adaptors::reversed
    +
    +

    +

    +

    + returns a Range Adaptor where the iterator type is now the iterator type + of the range vec wrapped + in reverse_iterator. The + expression boost::adaptors::reversed is called an Adaptor + Generator. +

    +

    + There are two ways of constructing a range adaptor. The first is by using + operator|(). + This is my preferred technique, however while discussing range adaptors + with others it became clear that some users of the library strongly prefer + a more familiar function syntax, so equivalent functions of the present + tense form have been added as an alternative syntax. The equivalent to + rng | + reversed is adaptors::reverse(rng) for example. +

    +

    + Why do I prefer the operator| syntax? The answer is readability: +

    +

    + +

    +
    std::vector<int> vec;
    +boost::copy( boost::adaptors::reverse(vec),
    +             std::ostream_iterator<int>(std::cout) );
    +
    +

    +

    +

    + This might not look so bad, but when we apply several adaptors, it becomes + much worse. Just compare +

    +

    + +

    +
    std::vector<int> vec;
    +boost::copy( boost::adaptors::unique( boost::adaptors::reverse( vec ) ),
    +             std::ostream_iterator<int>(std::cout) );
    +
    +

    +

    +

    + to +

    +

    + +

    +
    std::vector<int> vec;
    +boost::copy( vec | boost::adaptors::reversed
    +                 | boost::adaptors::uniqued,
    +             std::ostream_iterator<int>(std::cout) );
    +
    +

    +

    +

    + Furthermore, some of the adaptor generators take arguments themselves and + these arguments are expressed with function call notation too. In those + situations, you will really appreciate the succinctness of operator|(). +

    +
    + + Composition + of Adaptors +
    +

    + Range Adaptors are a powerful complement to Range algorithms. The reason + is that adaptors are orthogonal + to algorithms. For example, consider these Range algorithms: +

    +
      +
    • boost::copy( rng, out )
    • +
    • boost::count( rng, pred )
    • +
    +

    + What should we do if we only want to copy an element a + if it satisfies some predicate, say pred(a)? + And what if we only want to count the elements that satisfy the same predicate? + The naive answer would be to use these algorithms: +

    +
      +
    • boost::copy_if( + rng, + pred, + out )
    • +
    • boost::count_if( + rng, + pred )
    • +
    +

    + These algorithms are only defined to maintain a one to one relationship + with the standard library algorithms. This approach of adding algorithm + suffers a combinatorial explosion. Inevitably many algorithms are missing + _if variants and there + is redundant development overhead for each new algorithm. The Adaptor Generator + is the design solution to this problem. +

    +
    + + Range + Adaptor alternative to copy_if algorithm +
    +

    + +

    +
    boost::copy_if( rng, pred, out );
    +
    +

    + can be expressed as +

    +
    boost::copy( rng | boost::adaptors::filtered(pred), out );
    +
    +

    +

    +
    + + Range + Adaptor alternative to count_if algorithm +
    +

    + +

    +
    boost::count_if( rng, pred );
    +
    +

    + can be expressed as +

    +
    boost::count( rng | boost::adaptors::filtered(pred), out );
    +
    +

    +

    +

    + What this means is that no + algorithm with the _if + suffix is needed. Furthermore, it turns out that algorithms with the _copy suffix are not needed either. Consider + the somewhat misdesigned replace_copy_if() which may be used as +

    +

    + +

    +
    std::vector<int> vec;
    +boost::replace_copy_if( rng, std::back_inserter(vec), pred );
    +
    +

    +

    +

    + With adaptors and algorithms we can express this as +

    +

    + +

    +
    std::vector<int> vec;
    +boost::push_back(vec, rng | boost::adaptors::replaced_if(pred, new_value));
    +
    +

    +

    +

    + The latter code has several benefits: +

    +

    + 1. it is more efficient + because we avoid extra allocations as might happen with std::back_inserter +

    +

    + 2. it is flexible + as we can subsequently apply even more adaptors, for example: +

    +
    boost::push_back(vec, rng | boost::adaptors::replaced_if(pred, new_value)
    +                          | boost::adaptors::reversed);
    +
    +

    +

    +

    + 3. it is safer because + there is no use of an unbounded output iterator. +

    +

    + In this manner, the composition + of Range Adaptors has the following consequences: +

    +

    + 1. we no longer need _if, + _copy, _copy_if + and _n variants of algorithms. +

    +

    + 2. we can generate a multitude of new algorithms on the fly, for example, + above we generated reverse_replace_copy_if() +

    +

    + In other words: +

    +

    + Range Adaptors are to algorithms what algorithms + are to containers +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/adaptors/reference.html b/doc/html/range/reference/adaptors/reference.html new file mode 100644 index 0000000..a76fbcb --- /dev/null +++ b/doc/html/range/reference/adaptors/reference.html @@ -0,0 +1,63 @@ + + + +Reference + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html b/doc/html/range/reference/adaptors/reference/adjacent_filtered.html similarity index 83% rename from doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html rename to doc/html/range/reference/adaptors/reference/adjacent_filtered.html index fa763c8..c6d4404 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html +++ b/doc/html/range/reference/adaptors/reference/adjacent_filtered.html @@ -5,8 +5,8 @@ - - + + @@ -20,14 +20,14 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -90,12 +90,18 @@ of bi_pred might throw.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range +
  • +
  • +Returned Range Category: The minimum + of the range category of rng + and Forward Range
  • @@ -145,7 +151,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/copied.html b/doc/html/range/reference/adaptors/reference/copied.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/copied.html rename to doc/html/range/reference/adaptors/reference/copied.html index 650e29a..24b72f1 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/copied.html +++ b/doc/html/range/reference/adaptors/reference/copied.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -92,12 +91,17 @@ of the original range.
  • -Range Category:RandomAccessRange +Range Category:Random + Access Range +
  • +
  • +Returned Range Category:Random + Access Range
  • @@ -146,7 +150,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/filtered.html b/doc/html/range/reference/adaptors/reference/filtered.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/filtered.html rename to doc/html/range/reference/adaptors/reference/filtered.html index 1551a9f..6ce9f3c 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/filtered.html +++ b/doc/html/range/reference/adaptors/reference/filtered.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -90,15 +89,19 @@ of pred might throw.
  • -Range Category:ForwardRange +Range Category:Forward + Range
  • -Returned Range Category:ForwardRange +Returned Range Category: The minimum + of the range category of rng + and Bidirectional + Range
  • @@ -150,7 +153,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/indexed.html b/doc/html/range/reference/adaptors/reference/indexed.html similarity index 91% rename from doc/html/range/reference/adaptors/adaptors_reference/indexed.html rename to doc/html/range/reference/adaptors/reference/indexed.html index d8c8674..3ef95df 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/indexed.html +++ b/doc/html/range/reference/adaptors/reference/indexed.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -84,12 +83,17 @@ in the sequence corresponding with the iterator.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range +
  • +
  • +Returned Range Category: The range + category of rng
  • @@ -180,7 +184,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/indirected.html b/doc/html/range/reference/adaptors/reference/indirected.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/indirected.html rename to doc/html/range/reference/adaptors/reference/indirected.html index adcd57a..7dc0558 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/indirected.html +++ b/doc/html/range/reference/adaptors/reference/indirected.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -85,12 +84,17 @@ element in the original range.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range +
  • +
  • +Returned Range Category: The range + category of rng
  • @@ -140,7 +144,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/map_keys.html b/doc/html/range/reference/adaptors/reference/map_keys.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/map_keys.html rename to doc/html/range/reference/adaptors/reference/map_keys.html index 95c1746..6c69774 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/map_keys.html +++ b/doc/html/range/reference/adaptors/reference/map_keys.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -84,12 +83,17 @@ is the corresponding element in the original range.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -140,7 +144,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/map_values.html b/doc/html/range/reference/adaptors/reference/map_values.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/map_values.html rename to doc/html/range/reference/adaptors/reference/map_values.html index 553a8f3..6a906b2 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/map_values.html +++ b/doc/html/range/reference/adaptors/reference/map_values.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -84,12 +83,17 @@ is the corresponding element in the original range.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -140,7 +144,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/replaced.html b/doc/html/range/reference/adaptors/reference/replaced.html similarity index 87% rename from doc/html/range/reference/adaptors/adaptors_reference/replaced.html rename to doc/html/range/reference/adaptors/reference/replaced.html index 0990ede..3bcfff4 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/replaced.html +++ b/doc/html/range/reference/adaptors/reference/replaced.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -101,12 +100,17 @@ is the corresponding element in the original range.
  • -Range Category:ForwardRange +Range Category:Forward + Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -155,7 +159,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html b/doc/html/range/reference/adaptors/reference/replaced_if.html similarity index 88% rename from doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html rename to doc/html/range/reference/adaptors/reference/replaced_if.html index abcf00f..dbd181e 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html +++ b/doc/html/range/reference/adaptors/reference/replaced_if.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,14 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -100,12 +100,17 @@ is the corresponding element in the original range.
  • -Range Category:ForwardRange +Range Category:Forward + Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -159,7 +164,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/reversed.html b/doc/html/range/reference/adaptors/reference/reversed.html similarity index 85% rename from doc/html/range/reference/adaptors/adaptors_reference/reversed.html rename to doc/html/range/reference/adaptors/reference/reversed.html index 52f4cda..f8d2f26 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/reversed.html +++ b/doc/html/range/reference/adaptors/reference/reversed.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -80,12 +79,17 @@ as if they were the original iterators wrapped in reverse_iterator.
  • -Range Category:BidirectionalRange +Range Category:Bidirectional + Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -134,7 +138,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/sliced.html b/doc/html/range/reference/adaptors/reference/sliced.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/sliced.html rename to doc/html/range/reference/adaptors/reference/sliced.html index 9793092..757aaaf 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/sliced.html +++ b/doc/html/range/reference/adaptors/reference/sliced.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -90,12 +89,17 @@ Returns:make_range(rng, n, m)
  • -Range Category:RandomAccessRange +Range Category:Random + Access Range +
  • +
  • +Returned Range Category:Random + Access Range
  • @@ -144,7 +148,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/strided.html b/doc/html/range/reference/adaptors/reference/strided.html similarity index 86% rename from doc/html/range/reference/adaptors/adaptors_reference/strided.html rename to doc/html/range/reference/adaptors/reference/strided.html index 6fcc281..b641325 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/strided.html +++ b/doc/html/range/reference/adaptors/reference/strided.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -87,12 +86,17 @@ in steps of n.
  • -Range Category:RandomAccessRange +Range Category:Random + Access Range +
  • +
  • +Returned Range Category:Random + Access Range
  • @@ -141,7 +145,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/tokenized.html b/doc/html/range/reference/adaptors/reference/tokenized.html similarity index 88% rename from doc/html/range/reference/adaptors/adaptors_reference/tokenized.html rename to doc/html/range/reference/adaptors/reference/tokenized.html index fc4bc42..32f57e6 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/tokenized.html +++ b/doc/html/range/reference/adaptors/reference/tokenized.html @@ -5,7 +5,7 @@ - + @@ -20,12 +20,11 @@
    -PrevUpHomeNext +PrevUpHomeNext
    @@ -123,7 +122,12 @@ might throw.
  • -Range Category:RandomAccessRange +Range Category:Random + Access Range +
  • +
  • +Returned Range Category:Random + Access Range
  • @@ -137,7 +141,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/transformed.html b/doc/html/range/reference/adaptors/reference/transformed.html similarity index 87% rename from doc/html/range/reference/adaptors/adaptors_reference/transformed.html rename to doc/html/range/reference/adaptors/reference/transformed.html index 56a6170..43b8758 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/transformed.html +++ b/doc/html/range/reference/adaptors/reference/transformed.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,14 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -90,12 +90,17 @@ of fun might throw.
  • -Range Category:SinglePassRange +Range Category:Single + Pass Range
  • +
  • +Returned Range Category: The range + category of rng. +
  • @@ -150,7 +155,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/adaptors/adaptors_reference/uniqued.html b/doc/html/range/reference/adaptors/reference/uniqued.html similarity index 84% rename from doc/html/range/reference/adaptors/adaptors_reference/uniqued.html rename to doc/html/range/reference/adaptors/reference/uniqued.html index 3b314ab..65fdc6e 100644 --- a/doc/html/range/reference/adaptors/adaptors_reference/uniqued.html +++ b/doc/html/range/reference/adaptors/reference/uniqued.html @@ -5,7 +5,7 @@ - + @@ -20,14 +20,13 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    @@ -84,12 +83,18 @@ [x,y] in the returned range, x==y is false.
  • -Range Category:ForwardRange +Range Category:Forward + Range
  • +
  • +Returned Range Category: The minimum + of the range concept of rng + and Forward Range. +
  • @@ -136,7 +141,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms.html b/doc/html/range/reference/algorithms.html index fc70d02..a8b27ff 100644 --- a/doc/html/range/reference/algorithms.html +++ b/doc/html/range/reference/algorithms.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    @@ -53,7 +50,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/heap_algorithms.html b/doc/html/range/reference/algorithms/heap.html similarity index 51% rename from doc/html/range/reference/algorithms/heap_algorithms.html rename to doc/html/range/reference/algorithms/heap.html index 018906e..c06c707 100644 --- a/doc/html/range/reference/algorithms/heap_algorithms.html +++ b/doc/html/range/reference/algorithms/heap.html @@ -6,8 +6,8 @@ - - + + @@ -20,21 +20,17 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -47,7 +43,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/heap_algorithms/make_heap.html b/doc/html/range/reference/algorithms/heap/make_heap.html similarity index 83% rename from doc/html/range/reference/algorithms/heap_algorithms/make_heap.html rename to doc/html/range/reference/algorithms/heap/make_heap.html index f261c6a..a847fc7 100644 --- a/doc/html/range/reference/algorithms/heap_algorithms/make_heap.html +++ b/doc/html/range/reference/algorithms/heap/make_heap.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    make_heap turns rng into a heap. @@ -60,16 +59,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/heap_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -118,9 +117,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Linear. At most 3 * @@ -138,7 +137,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html b/doc/html/range/reference/algorithms/heap/pop_heap.html similarity index 84% rename from doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html rename to doc/html/range/reference/algorithms/heap/pop_heap.html index 3759ef1..6cf064d 100644 --- a/doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html +++ b/doc/html/range/reference/algorithms/heap/pop_heap.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    pop_heap removes the @@ -62,16 +61,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/heap_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -120,9 +119,9 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:
    • !empty(rng)
    • @@ -130,9 +129,9 @@ rng is a heap.
    -
    - - Complexity +
    + + Complexity

    Logarithmic. At most 2 * @@ -150,7 +149,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/heap_algorithms/push_heap.html b/doc/html/range/reference/algorithms/heap/push_heap.html similarity index 81% rename from doc/html/range/reference/algorithms/heap_algorithms/push_heap.html rename to doc/html/range/reference/algorithms/heap/push_heap.html index 9857d21..f4497b6 100644 --- a/doc/html/range/reference/algorithms/heap_algorithms/push_heap.html +++ b/doc/html/range/reference/algorithms/heap/push_heap.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    push_heap adds an element @@ -62,16 +61,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/heap_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -120,9 +119,9 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:
    • !empty(rng)
    • @@ -130,9 +129,9 @@ [begin(rng), prior(end(rng))) is a heap.
    -
    - - Complexity +
    + + Complexity

    Logarithmic. At most log(distance(rng)) comparisons. @@ -148,7 +147,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/heap_algorithms/sort_heap.html b/doc/html/range/reference/algorithms/heap/sort_heap.html similarity index 81% rename from doc/html/range/reference/algorithms/heap_algorithms/sort_heap.html rename to doc/html/range/reference/algorithms/heap/sort_heap.html index c9c5746..c5bb9b3 100644 --- a/doc/html/range/reference/algorithms/heap_algorithms/sort_heap.html +++ b/doc/html/range/reference/algorithms/heap/sort_heap.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    sort_heap turns a heap @@ -61,16 +60,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/heap_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -119,16 +118,16 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:

    rng is a heap.

    -
    - - Complexity +
    + + Complexity

    At most N * @@ -147,7 +146,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating.html b/doc/html/range/reference/algorithms/mutating.html new file mode 100644 index 0000000..1990363 --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating.html @@ -0,0 +1,91 @@ + + + +Mutating algorithms + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html b/doc/html/range/reference/algorithms/mutating/copy.html similarity index 69% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html rename to doc/html/range/reference/algorithms/mutating/copy.html index 7050fd9..854c4ac 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html +++ b/doc/html/range/reference/algorithms/mutating/copy.html @@ -1,13 +1,13 @@ -Range Algorithm - copy +copy - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -39,9 +38,9 @@

    -
    - - Description +
    + + Description

    copy copies all elements @@ -50,16 +49,16 @@ + distance(source_rng)). The return value is out_it + distance(source_rng)

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/copy.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -78,9 +77,9 @@ set of value types.
    -
    - - Precondition: +
    + + Precondition:
    • @@ -92,9 +91,9 @@ + distance(source_rng)) is a valid range.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(source_rng) assignments are performed. @@ -110,7 +109,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html b/doc/html/range/reference/algorithms/mutating/copy_backward.html similarity index 72% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html rename to doc/html/range/reference/algorithms/mutating/copy_backward.html index 5047d02..c1d1266 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html +++ b/doc/html/range/reference/algorithms/mutating/copy_backward.html @@ -1,13 +1,13 @@ -Range Algorithm - copy_backward +copy_backward - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -41,9 +41,9 @@

    -
    - - Description +
    + + Description

    copy_backward copies @@ -59,16 +59,16 @@ Note well that unlike all other standard algorithms out_it denotes the end of the output sequence.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/copy_backward.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -87,9 +87,9 @@ set of value types.
    -
    - - Precondition: +
    + + Precondition:
    • @@ -101,9 +101,9 @@ + distance(source_rng)) is a valid range.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(source_rng) assignments are performed. @@ -119,7 +119,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html b/doc/html/range/reference/algorithms/mutating/fill.html similarity index 69% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html rename to doc/html/range/reference/algorithms/mutating/fill.html index 30c1bc4..5f5da38 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html +++ b/doc/html/range/reference/algorithms/mutating/fill.html @@ -1,13 +1,13 @@ -Range Algorithm - fill +fill - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -39,25 +38,25 @@

    -
    - - Description +
    + + Description

    fill assigns the value val to every element in the range rng.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/fill.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -78,9 +77,9 @@ type.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) assignments are performed. @@ -96,7 +95,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill_n.html b/doc/html/range/reference/algorithms/mutating/fill_n.html similarity index 70% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill_n.html rename to doc/html/range/reference/algorithms/mutating/fill_n.html index a202dea..5d09a06 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill_n.html +++ b/doc/html/range/reference/algorithms/mutating/fill_n.html @@ -1,13 +1,13 @@ -Range Algorithm - fill_n +fill_n - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -39,24 +38,24 @@

    -
    - - Description +
    + + Description

    fill_n assigns the value val to n elements in the range rng begining with boost::begin(rng).

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/fill_n.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -77,9 +76,9 @@ type.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly n assignments @@ -96,7 +95,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html b/doc/html/range/reference/algorithms/mutating/generate.html similarity index 72% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html rename to doc/html/range/reference/algorithms/mutating/generate.html index a76b480..7bdf2ff 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html +++ b/doc/html/range/reference/algorithms/mutating/generate.html @@ -1,13 +1,13 @@ -Range Algorithm - generate +generate - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -42,9 +41,9 @@

    -
    - - Description +
    + + Description

    generate assigns the @@ -52,16 +51,16 @@ to each element in range rng. Returns the resultant range.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/generate.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -83,9 +82,9 @@ set of value types.
    -
    - - Precondition: +
    + + Precondition:
    • @@ -97,9 +96,9 @@ + distance(rng)) is a valid range.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) assignments are performed. @@ -115,7 +114,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html b/doc/html/range/reference/algorithms/mutating/inplace_merge.html similarity index 83% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html rename to doc/html/range/reference/algorithms/mutating/inplace_merge.html index e0aa7fc..8d4d6c5 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html +++ b/doc/html/range/reference/algorithms/mutating/inplace_merge.html @@ -1,13 +1,13 @@ -Range Algorithm - inplace_merge +inplace_merge - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -38,18 +38,18 @@ BidirectionalRange& inplace_merge( BidirectionalRange& rng, typename range_iterator<BidirectionalRange>::type middle ); - + template<class BidirectionalRange> const BidirectionalRange& inplace_merge( const BidirectionalRange& rng, typename range_iterator<const BidirectionalRange>::type middle ); - + template<class BidirectionalRange, class BinaryPredicate> BidirectionalRange& inplace_merge( BidirectionalRange& rng, typename range_iterator<BidirectionalRange>::type middle, BinaryPredicate pred ); - + template<class BidirectionalRange, class BinaryPredicate> const BidirectionalRange& inplace_merge( const BidirectionalRange& rng, @@ -58,9 +58,9 @@

    -
    - - Description +
    + + Description

    inplace_merge combines @@ -71,16 +71,16 @@ is stable, meaning both that the relative order of elements within each input range is preserved.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/inplace_merge.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate version: @@ -115,13 +115,13 @@ value type is convertible to both BinaryPredicate's argument types.

    -
    - - Precondition: +
    + + Precondition:
    -
    - - For +
    + + For the non-predicate version:
      @@ -142,9 +142,9 @@ x is false.
    -
    - - For +
    + + For the predicate version:
      @@ -163,9 +163,9 @@ pred(y,x) == false.
    -
    - - Complexity +
    + + Complexity

    Worst case: O(N log(N)) @@ -181,7 +181,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html b/doc/html/range/reference/algorithms/mutating/merge.html similarity index 87% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html rename to doc/html/range/reference/algorithms/mutating/merge.html index e2b5d56..d66fc41 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html +++ b/doc/html/range/reference/algorithms/mutating/merge.html @@ -1,13 +1,13 @@ -Range Algorithm - merge +merge - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -56,9 +55,9 @@

    -
    - - Description +
    + + Description

    merge combines two sorted @@ -75,16 +74,16 @@ The non-predicate version uses the operator<() for the range value type. The predicate version uses the predicate instead of operator<().

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/merge.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate version: @@ -150,13 +149,13 @@ of value types.

    -
    - - Precondition: +
    + + Precondition:
    -
    - - For +
    + + For the non-predicate version:
      @@ -189,9 +188,9 @@ is a valid range.
    -
    - - For +
    + + For the predicate version:
      @@ -220,9 +219,9 @@ is a valid range.
    -
    - - Complexity +
    + + Complexity

    Linear. There are no comparisons if both rng1 @@ -241,7 +240,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html b/doc/html/range/reference/algorithms/mutating/nth_element.html similarity index 80% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html rename to doc/html/range/reference/algorithms/mutating/nth_element.html index 5b42602..cd13253 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html +++ b/doc/html/range/reference/algorithms/mutating/nth_element.html @@ -1,13 +1,13 @@ -Range Algorithm - nth_element +nth_element - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -58,9 +58,9 @@

    -
    - - Description +
    + + Description

    nth_element partially @@ -69,16 +69,16 @@ such that the element corresponding with the iterator nth is the same as the element that would be in that position if rng has been sorted.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/nth_element.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate version: @@ -127,9 +127,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    On average, linear in distance(rng). @@ -145,7 +145,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html b/doc/html/range/reference/algorithms/mutating/partial_sort.html similarity index 82% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html rename to doc/html/range/reference/algorithms/mutating/partial_sort.html index a202f53..7938cd3 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html +++ b/doc/html/range/reference/algorithms/mutating/partial_sort.html @@ -1,13 +1,13 @@ -Range Algorithm - partial_sort +partial_sort - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -58,9 +58,9 @@

    -
    - - Description +
    + + Description

    partial_sort rearranges @@ -74,16 +74,16 @@ is less than another by using operator<(). The predicate versions use the predicate instead.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/partial_sort.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate version: @@ -132,9 +132,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Approximately distance(rng) * log(distance(begin(rng), middle)) comparisons. @@ -150,7 +150,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html b/doc/html/range/reference/algorithms/mutating/partition.html similarity index 79% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html rename to doc/html/range/reference/algorithms/mutating/partition.html index e2d73d7..79bd88c 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html +++ b/doc/html/range/reference/algorithms/mutating/partition.html @@ -1,13 +1,13 @@ -Range Algorithm - partition +partition - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -66,9 +65,9 @@

    -
    - - Description +
    + + Description

    partition orders the @@ -80,16 +79,16 @@ have a configurable range_return, found corresponds to the middle iterator.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/partition.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -107,9 +106,9 @@ argument type.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) applications of pred, @@ -127,7 +126,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html b/doc/html/range/reference/algorithms/mutating/random_shuffle.html similarity index 76% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html rename to doc/html/range/reference/algorithms/mutating/random_shuffle.html index 64643c5..d94fc5a 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html +++ b/doc/html/range/reference/algorithms/mutating/random_shuffle.html @@ -1,13 +1,13 @@ -Range Algorithm - random_shuffle +random_shuffle - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    random_shuffle randomly @@ -60,16 +60,16 @@ use an internal random number generator. The versions of random_shuffle that do specify a Generator use this instead. Returns the shuffles range.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/random_shuffle.hpp

    -
    - - Requirements +
    + + Requirements

    For the version without a Generator: @@ -98,18 +98,18 @@ argument type.

    -
    - - Precondition: +
    + + Precondition:
    • distance(rng) is less than gen's maximum value.
    -
    - - Complexity +
    + + Complexity

    Linear. If !empty(rng), exactly distance(rng) - 1 @@ -126,7 +126,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html b/doc/html/range/reference/algorithms/mutating/remove.html similarity index 81% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html rename to doc/html/range/reference/algorithms/mutating/remove.html index 016b1aa..de178ea 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html +++ b/doc/html/range/reference/algorithms/mutating/remove.html @@ -1,13 +1,13 @@ -Range Algorithm - remove +remove - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -66,9 +65,9 @@

    -
    - - Description +
    + + Description

    remove removes from @@ -83,16 +82,16 @@ end(rng)) are dereferenceable, but the elements are unspecified.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/remove.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -113,9 +112,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. remove performs @@ -133,7 +132,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy.html b/doc/html/range/reference/algorithms/mutating/remove_copy.html new file mode 100644 index 0000000..b775716 --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/remove_copy.html @@ -0,0 +1,109 @@ + + + +remove_copy + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class Outputiterator, class Value>
    +OutputIterator
    +remove_copy(ForwardRange& rng, OutputIterator out, const Value& val);
    +
    +template<class ForwardRange, class OutputIterator, class Value>
    +OutputIterator
    +remove_copy(const ForwardRange& rng, OutputIterator out, const Value& val);
    +
    +

    +

    +
    + + Description +
    +

    + remove_copy copied all + of the elements x from + rng for which x == val is false. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/remove_copy.hpp +

    +
    + + Requirements +
    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange is mutable. +
    • +
    • +Value is a model of + the EqualityComparableConcept. +
    • +
    • + Objects of type Value + can be compared for equality with objects of ForwardRange's + value type. +
    • +
    +
    + + Complexity +
    +

    + Linear. remove_copy performs + exactly distance(rng) + comparisons for equality. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy_if.html b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html new file mode 100644 index 0000000..3f25b68 --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html @@ -0,0 +1,104 @@ + + + +remove_copy_if + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class Outputiterator, class UnaryPred>
    +OutputIterator
    +remove_copy_if(ForwardRange& rng, OutputIterator out, UnaryPred pred);
    +
    +template<class ForwardRange, class OutputIterator, class UnaryPred>
    +OutputIterator
    +remove_copy_if(const ForwardRange& rng, OutputIterator out, UnaryPred pred);
    +
    +

    +

    +
    + + Description +
    +

    + remove_copy_if copied + all of the elements x + from rng for which pred(x) + is false. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/remove_copy_if.hpp +

    +
    + + Requirements +
    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange is mutable. +
    • +
    • +UnaryPred is a model + of the UnaryPredicateConcept. +
    • +
    +
    + + Complexity +
    +

    + Linear. remove_copy_if + performs exactly distance(rng) comparisons with UnaryPred. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html b/doc/html/range/reference/algorithms/mutating/remove_if.html similarity index 79% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html rename to doc/html/range/reference/algorithms/mutating/remove_if.html index 51cb94c..95a933c 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html +++ b/doc/html/range/reference/algorithms/mutating/remove_if.html @@ -1,13 +1,13 @@ -Range Algorithm - remove_if +remove_if - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -66,9 +65,9 @@

    -
    - - Description +
    + + Description

    remove_if removes from @@ -82,16 +81,16 @@ the range [new_last, end(rng)) are dereferenceable, but the elements are unspecified.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/remove_if.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -112,9 +111,9 @@ argument type.
    -
    - - Complexity +
    + + Complexity

    Linear. remove_if performs @@ -132,7 +131,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html b/doc/html/range/reference/algorithms/mutating/replace.html similarity index 75% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html rename to doc/html/range/reference/algorithms/mutating/replace.html index dab9ee6..abbffc3 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html +++ b/doc/html/range/reference/algorithms/mutating/replace.html @@ -1,13 +1,13 @@ -Range Algorithm - replace +replace - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -48,25 +47,25 @@

    -
    - - Description +
    + + Description

    replace every element in rng equal to what with with_what. Return a reference to rng.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/replace.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -93,9 +92,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. replace performs @@ -113,7 +112,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy.html b/doc/html/range/reference/algorithms/mutating/replace_copy.html new file mode 100644 index 0000000..a5678bd --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/replace_copy.html @@ -0,0 +1,112 @@ + + + +replace_copy + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class OutputIterator, class Value>
    +OutputIterator replace_copy(const ForwardRange& rng, OutputIterator out,
    +                            const Value& what, const Value& with_what);
    +
    +

    +

    +
    + + Description +
    +

    + replace_copy copy every + element x in rng such that the corresponding element + in the output range y + is x == + what ? + with_what : + x. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/replace_copy.hpp +

    +
    + + Requirements +
    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange is mutable. +
    • +
    • +Value is convertible + to ForwardRange's value + type. +
    • +
    • +Value is a model of + the AssignableConcept. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    +
    + + Complexity +
    +

    + Linear. replace_copy + performs exactly distance(rng). +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy_if.html b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html new file mode 100644 index 0000000..17607de --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html @@ -0,0 +1,114 @@ + + + +replace_copy_if + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class OutputIterator, class UnaryPredicate, class Value>
    +OutputIterator replace_copy_if(const ForwardRange& rng, OutputIterator out,
    +                               UnaryPredicate pred, const Value& with_what);
    +
    +

    +

    +
    + + Description +
    +

    + replace_copy_if copy + every element x in rng such that the corresponding element + in the output range y + is pred(x) ? with_what + : x. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/replace_copy_if.hpp +

    +
    + + Requirements +
    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange is mutable. +
    • +
    • +Value is convertible + to ForwardRange's value + type. +
    • +
    • +Value is a model of + the AssignableConcept. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    • +UnaryPredicate is a + model of the UnaryPredicateConcept. +
    • +
    +
    + + Complexity +
    +

    + Linear. replace_copy_if + performs exactly distance(rng) evaluations of pred. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html b/doc/html/range/reference/algorithms/mutating/replace_if.html similarity index 74% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html rename to doc/html/range/reference/algorithms/mutating/replace_if.html index 946b18c..110c753 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html +++ b/doc/html/range/reference/algorithms/mutating/replace_if.html @@ -1,13 +1,13 @@ -Range Algorithm - replace_if +replace_if - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -42,25 +42,25 @@

    -
    - - Description +
    + + Description

    replace_if replaces every element x in rng for which pred(x) == true with with_what. Returns a reference to rng.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/replace_if.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -90,9 +90,9 @@ the AssignableConcept.
    -
    - - Complexity +
    + + Complexity

    Linear. replace_if performs @@ -111,7 +111,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/reverse.html b/doc/html/range/reference/algorithms/mutating/reverse.html new file mode 100644 index 0000000..0ae4ef5 --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/reverse.html @@ -0,0 +1,96 @@ + + + +reverse + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class BidirectionalRange>
    +BidirectionalRange& reverse(BidirectionalRange& rng);
    +
    +template<class BidirectionalRange>
    +const BidirectionalRange& reverse(const BidirectionalRange& rng);
    +
    +

    +

    +
    + + Description +
    +

    + reverse reverses a range. + Returns a reference to the reversed range. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/reverse.hpp +

    +
    + + Requirements +
    +
      +
    • +BidirectionalRange + is a model of the Bidirectional + Range Concept. +
    • +
    • +BidirectionalRange + is mutable. +
    • +
    +
    + + Complexity +
    +

    + Linear. reverse makes + distance(rng)/2 calls to iter_swap. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/mutating/reverse_copy.html b/doc/html/range/reference/algorithms/mutating/reverse_copy.html new file mode 100644 index 0000000..34a4b9a --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/reverse_copy.html @@ -0,0 +1,101 @@ + + + +reverse_copy + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class BidirectionalRange, class OutputIterator>
    +OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out);
    +
    +

    +

    +
    + + Description +
    +

    + reverse_copy copies the + elements from rng in + reverse order to out. + Returns the output iterator one passed the last copied element. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/reverse_copy.hpp +

    +
    + + Requirements +
    +
      +
    • +BidirectionalRange + is a model of the Bidirectional + Range Concept. +
    • +
    • +BidirectionalRange + is mutable. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    +
    + + Complexity +
    +

    + Linear. reverse_copy + makes distance(rng) + copies. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html b/doc/html/range/reference/algorithms/mutating/rotate.html similarity index 70% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html rename to doc/html/range/reference/algorithms/mutating/rotate.html index 2660663..b0dc3e4 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html +++ b/doc/html/range/reference/algorithms/mutating/rotate.html @@ -1,13 +1,13 @@ -Range Algorithm - rotate +rotate - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -37,32 +36,32 @@

    template<class ForwardRange>
     ForwardRange& rotate(ForwardRange& rng,
                          typename range_iterator<ForwardRange>::type middle);
    -                     
    +
     template<class ForwardRange>
     const ForwardRange& rotate(const ForwardRange& rng,
                                typename range_iterator<const ForwardRange>::type middle);
     

    -
    - - Description +
    + + Description

    rotate rotates the elements in a range. It exchanges the two ranges [begin(rng), middle) and [middle, end(rng)). Returns a reference to rng.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/rotate.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -74,9 +73,9 @@ ForwardRange is mutable.
    -
    - - Precondition: +
    + + Precondition:
    • @@ -86,9 +85,9 @@ [middle, end(rng)) is a valid range.
    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng) swaps are performed. @@ -104,7 +103,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/rotate_copy.html b/doc/html/range/reference/algorithms/mutating/rotate_copy.html new file mode 100644 index 0000000..293f540 --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/rotate_copy.html @@ -0,0 +1,112 @@ + + + +rotate_copy + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class OutputIterator>
    +OutputIterator rotate_copy(
    +    const ForwardRange& rng,
    +    typename range_iterator<ForwardRange>::type middle,
    +    OutputIterator out);
    +
    +

    +

    +
    + + Description +
    +

    + rotate_copy rotates the + elements in a range. It copies the two ranges [begin(rng), middle) + and [middle, end(rng)) to out. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/rotate_copy.hpp +

    +
    + + Requirements +
    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange is mutable. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    +
    + + Precondition: +
    +
      +
    • +[begin(rng), middle) is a valid range. +
    • +
    • +[middle, end(rng)) is a valid range. +
    • +
    +
    + + Complexity +
    +

    + Linear. Exactly distance(rng) elements are copied. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html b/doc/html/range/reference/algorithms/mutating/sort.html similarity index 80% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html rename to doc/html/range/reference/algorithms/mutating/sort.html index 0fc2893..ffa09ad 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html +++ b/doc/html/range/reference/algorithms/mutating/sort.html @@ -1,13 +1,13 @@ -Range Algorithm - sort +sort - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    sort sorts the elements @@ -71,16 +70,16 @@ function with a predicate, ascending order is defined by pred such that for all adjacent elements [x,y], pred(y, x) == false.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/sort.hpp

    -
    - - Requirements +
    + + Requirements

    For versions of sort without a predicate: @@ -129,9 +128,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    O(N log(N)) comparisons (both average and worst-case), @@ -148,7 +147,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html b/doc/html/range/reference/algorithms/mutating/stable_partition.html similarity index 80% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html rename to doc/html/range/reference/algorithms/mutating/stable_partition.html index d4178a2..c12efc0 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html +++ b/doc/html/range/reference/algorithms/mutating/stable_partition.html @@ -1,13 +1,13 @@ -Range Algorithm - stable_partition +stable_partition - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -60,9 +60,9 @@

    -
    - - Description +
    + + Description

    stable_partition reorders @@ -82,16 +82,16 @@ the found iterator is the iterator to the first element that fails to satisfy pred.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/stable_partition.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -107,9 +107,9 @@ model of the PredicateConcept.
    -
    - - Complexity +
    + + Complexity

    Best case: O(N) @@ -129,7 +129,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html b/doc/html/range/reference/algorithms/mutating/stable_sort.html similarity index 82% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html rename to doc/html/range/reference/algorithms/mutating/stable_sort.html index d0e3ddf..7f4e1a5 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html +++ b/doc/html/range/reference/algorithms/mutating/stable_sort.html @@ -1,13 +1,13 @@ -Range Algorithm - stable_sort +stable_sort - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    stable_sort sorts the @@ -71,16 +71,16 @@ function with a predicate, ascending order is designed by pred such that for all adjacent elements [x,y], pred(y,x) == false.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/stable_sort.hpp

    -
    - - Requirements +
    + + Requirements

    For versions of stable_sort without a predicate @@ -129,9 +129,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Best case: O(N) @@ -151,7 +151,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/swap_ranges.html b/doc/html/range/reference/algorithms/mutating/swap_ranges.html new file mode 100644 index 0000000..a9fc9fa --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/swap_ranges.html @@ -0,0 +1,104 @@ + + + +swap_ranges + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class SinglePassRange1, class SinglePassRange2>
    +SinglePassRange2& swap_ranges(SinglePassRange1& rng1, SinglePassRange& rng2);
    +
    +

    +

    +
    + + Description +
    +

    + swap_ranges swaps each + element x in rng1 with the corresponding element + y in rng2. + Returns a reference to rng2. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/swap_ranges.hpp +

    +
    + + Requirements +
    +
      +
    • +SinglePassRange1 is + a model of the Single + Pass Range Concept. +
    • +
    • +SinglePassRange1 is + mutable. +
    • +
    • +SinglePassRange2 is + a model of the Single + Pass Range Concept. +
    • +
    • +SinglePassRange2 is + mutable. +
    • +
    +
    + + Complexity +
    +

    + Linear. Exactly distance(rng1) elements are swapped. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html b/doc/html/range/reference/algorithms/mutating/transform.html similarity index 86% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html rename to doc/html/range/reference/algorithms/mutating/transform.html index 110d48d..9247576 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html +++ b/doc/html/range/reference/algorithms/mutating/transform.html @@ -1,13 +1,13 @@ -Range Algorithm - transform +transform - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -42,7 +41,7 @@ OutputIterator transform(const SinglePassRange1& rng, OutputIterator out, UnaryOperation fun); - + template< class SinglePassRange1, class SinglePassRange2, @@ -56,9 +55,9 @@

    -
    - - Description +
    + + Description

    UnaryOperation version: @@ -92,16 +91,16 @@

    The return value is out + min(distance(rng1), distance(rng2)).

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/transform.hpp

    -
    - - Requirements +
    + + Requirements

    For the unary versions of transform: @@ -169,9 +168,9 @@ set of value types.

    -
    - - Precondition: +
    + + Precondition:

    For the unary version of transform: @@ -201,9 +200,9 @@ [out, out + min(distance(rng1), distance(rng2))) is a valid range.

    -
    - - Complexity +
    + + Complexity

    Linear. The operation is applied exactly distance(rng1) for the unary version and min(distance(rng1), distance(rng2)) @@ -220,7 +219,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html b/doc/html/range/reference/algorithms/mutating/unique.html similarity index 85% rename from doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html rename to doc/html/range/reference/algorithms/mutating/unique.html index ec4bf26..961a44f 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html +++ b/doc/html/range/reference/algorithms/mutating/unique.html @@ -1,13 +1,13 @@ -Range Algorithm - unique +unique - - - + + + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -68,9 +67,9 @@

    -
    - - Description +
    + + Description

    unique removes all but @@ -86,16 +85,16 @@ for ForwardRange's value type.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/unique.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions of unique: @@ -137,9 +136,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N) @@ -158,7 +157,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/mutating/unique_copy.html b/doc/html/range/reference/algorithms/mutating/unique_copy.html new file mode 100644 index 0000000..e0de9fc --- /dev/null +++ b/doc/html/range/reference/algorithms/mutating/unique_copy.html @@ -0,0 +1,143 @@ + + + +unique_copy + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class SinglePassRange, class OutputIterator>
    +OutputIterator unique_copy(const SinglePassRange& rng, OutputIterator out);
    +
    +template<class SinglePassRange, class OutputIterator, class BinaryPredicate>
    +OutputIterator unique_copy(const SinglePassRange& rng, OutputIterator out, BinaryPredicate pred);
    +
    +

    +

    +
    + + Description +
    +

    + unique_copy copies the + first element of each sequence of duplicates encountered in rng to out. +

    +

    + Equality is determined by the predicate if one is supplied, or by operator==() + for SinglePassRange's + value type. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/unique_copy.hpp +

    +
    + + Requirements +
    +

    + For the non-predicate versions of unique: +

    +
      +
    • +SinglePassRange is + a model of the Single + Pass Range Concept. +
    • +
    • +SinglePassRange is + mutable. +
    • +
    • +SinglePassRange's value + type is a model of the EqualityComparableConcept. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    +

    + For the predicate versions of unique: +

    +
      +
    • +SinglePassRange is + a model of the Single + Pass Range Concept. +
    • +
    • +SinglePassRange is + mutable. +
    • +
    • +BinaryPredicate is + a model of the BinaryPredicateConcept. +
    • +
    • +SinglePassRange's value + type is convertible to BinaryPredicate's + first argument type and to BinaryPredicate's + second argument type. +
    • +
    • +OutputIterator is a + model of the OutputIteratorConcept. +
    • +
    +
    + + Complexity +
    +

    + Linear. O(N) + where N is distance(rng). + Exactly distance(rng) + comparisons are performed. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/new.html b/doc/html/range/reference/algorithms/new.html new file mode 100644 index 0000000..d07ac11 --- /dev/null +++ b/doc/html/range/reference/algorithms/new.html @@ -0,0 +1,57 @@ + + + +New algorithms + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/new/copy_n.html b/doc/html/range/reference/algorithms/new/copy_n.html new file mode 100644 index 0000000..b84b29e --- /dev/null +++ b/doc/html/range/reference/algorithms/new/copy_n.html @@ -0,0 +1,103 @@ + + + +copy_n + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class SinglePassRange, class Size, class OutputIterator>
    +OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out);
    +
    +

    +

    +
    + + Description +
    +

    + copy_n is provided to + completely replicate the standard algorithm header, it is preferable + to use Range Adaptors and the extension functions to achieve the same + result with greater safety. +

    +

    + copy_n copies elements + from [boost::begin(rng), boost::begin(rng) + n) to the range [out, out + n) +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm_ext/copy_n.hpp +

    +
    + + Requirements +
    +
      +
    1. +SinglePassRange is + a model of the Single + Pass Range Concept. +
    2. +
    3. +Size is a model of + the Integer Concept. +
    4. +
    5. +OutputIterator is a + model of the OutputIteratorConcept. +
    6. +
    +
    + + Complexity +
    +

    + Linear. Exactly n elements + are copied. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html b/doc/html/range/reference/algorithms/new/erase.html similarity index 72% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html rename to doc/html/range/reference/algorithms/new/erase.html index 6d13233..47a5197 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html +++ b/doc/html/range/reference/algorithms/new/erase.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -41,9 +40,9 @@

    -
    - - Description +
    + + Description

    erase the iterator range @@ -58,24 +57,24 @@ remove_erase_if performs the frequently used combination equivalent to target.erase(std::remove_if(target.begin(), target.end(), pred), target.end());

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/erase.hpp

    -
    - - Requirements +
    + + Requirements
    1. Container supports erase of an iterator range.
    -
    - - Complexity +
    + + Complexity

    Linear. Proprotional to distance(to_erase). @@ -91,7 +90,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html b/doc/html/range/reference/algorithms/new/for_each.html similarity index 84% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html rename to doc/html/range/reference/algorithms/new/for_each.html index 2577357..c9c5db1 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html +++ b/doc/html/range/reference/algorithms/new/for_each.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -72,9 +71,9 @@

    -
    - - Description +
    + + Description

    for_each traverses forward @@ -88,16 +87,16 @@ Iteration is stopped upon reaching the end of the shorter of rng1, or rng2. It is safe to call this function with unequal length ranges.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/for_each.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -125,9 +124,9 @@ second argument type.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly min(distance(rng1), distance(rng2)) @@ -144,7 +143,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html b/doc/html/range/reference/algorithms/new/insert.html similarity index 74% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html rename to doc/html/range/reference/algorithms/new/insert.html index 7321ce8..013ca65 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html +++ b/doc/html/range/reference/algorithms/new/insert.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -44,9 +43,9 @@

    -
    - - Description +
    + + Description

    insert all of the elements @@ -54,16 +53,16 @@ the before iterator into target.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/insert.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -81,9 +80,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. distance(from) @@ -100,7 +99,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/iota.html b/doc/html/range/reference/algorithms/new/iota.html similarity index 73% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/iota.html rename to doc/html/range/reference/algorithms/new/iota.html index ea0a6f4..00613b2 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/iota.html +++ b/doc/html/range/reference/algorithms/new/iota.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -39,9 +38,9 @@

    -
    - - Description +
    + + Description

    iota traverses forward @@ -50,16 +49,16 @@ is assigned a value equivalent to x + boost::distance(boost::begin(rng), it)

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/iota.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -72,9 +71,9 @@ the Incrementable Concept.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) assignments into rng. @@ -90,7 +89,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/new/is_sorted.html b/doc/html/range/reference/algorithms/new/is_sorted.html new file mode 100644 index 0000000..167665d --- /dev/null +++ b/doc/html/range/reference/algorithms/new/is_sorted.html @@ -0,0 +1,108 @@ + + + +is_sorted + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class SinglePassRange>
    +bool is_sorted(const SinglePassRange& rng);
    +
    +template<class SinglePassRange, class BinaryPredicate>
    +bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred);
    +
    +

    +

    +
    + + Description +
    +

    + is_sorted determines + if a range is sorted. For the non-predicate version the return value + is true if and only if for + each adjacent elements [x,y] + the expression x < + y is true. + For the predicate version the return value is true + is and only if for each adjacent elements [x,y] + the expression pred(x,y) + is true. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm_ext/is_sorted.hpp +

    +
    + + Requirements +
    +
      +
    1. +SinglePassRange is + a model of the Single + Pass Range Concept. +
    2. +
    3. +BinaryPredicate is + a model of the BinaryPredicate + Concept. +
    4. +
    5. + The value type of SinglePassRange + is convertible to both argument types of BinaryPredicate. +
    6. +
    +
    + + Complexity +
    +

    + Linear. A maximum of distance(rng) comparisons are performed. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html b/doc/html/range/reference/algorithms/new/overwrite.html similarity index 70% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html rename to doc/html/range/reference/algorithms/new/overwrite.html index d0a5b5e..3ef0cfb 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html +++ b/doc/html/range/reference/algorithms/new/overwrite.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -43,25 +42,25 @@

    -
    - - Description +
    + + Description

    overwrite assigns the values from the range from into the range to.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/overwrite.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -86,9 +85,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. distance(rng1) @@ -105,7 +104,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html b/doc/html/range/reference/algorithms/new/push_back.html similarity index 72% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html rename to doc/html/range/reference/algorithms/new/push_back.html index 8029406..b5a0ff1 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html +++ b/doc/html/range/reference/algorithms/new/push_back.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -43,25 +42,25 @@

    -
    - - Description +
    + + Description

    push_back all of the elements in the range from to the back of the container target.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/push_back.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -79,9 +78,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. distance(from) @@ -98,7 +97,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html b/doc/html/range/reference/algorithms/new/push_front.html similarity index 72% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html rename to doc/html/range/reference/algorithms/new/push_front.html index 462cc72..a8b3381 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html +++ b/doc/html/range/reference/algorithms/new/push_front.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -43,25 +42,25 @@

    -
    - - Description +
    + + Description

    push_front all of the elements in the range from to the front of the container target.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/push_front.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -79,9 +78,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. distance(from) @@ -98,7 +97,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html b/doc/html/range/reference/algorithms/new/remove_erase.html similarity index 69% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html rename to doc/html/range/reference/algorithms/new/remove_erase.html index c268e1a..6dd59be 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html +++ b/doc/html/range/reference/algorithms/new/remove_erase.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -40,9 +39,9 @@

    -
    - - Description +
    + + Description

    remove_erase actually @@ -50,24 +49,24 @@ from the container. This is in contrast to the remove algorithm which merely rearranges elements.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/erase.hpp

    -
    - - Requirements +
    + + Requirements
    1. Container supports erase of an iterator range.
    -
    - - Complexity +
    + + Complexity

    Linear. Proportional to distance(target)s. @@ -83,7 +82,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html b/doc/html/range/reference/algorithms/new/remove_erase_if.html similarity index 69% rename from doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html rename to doc/html/range/reference/algorithms/new/remove_erase_if.html index 0dd87cd..ab20e8f 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html +++ b/doc/html/range/reference/algorithms/new/remove_erase_if.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -40,9 +40,9 @@

    -
    - - Description +
    + + Description

    remove_erase_if removes @@ -51,16 +51,16 @@ from the container. This is in contrast to the erase algorithm which merely rearranges elements.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm_ext/erase.hpp

    -
    - - Requirements +
    + + Requirements
    1. @@ -72,9 +72,9 @@ the Predicate Concept.
    -
    - - Complexity +
    + + Complexity

    Linear. Proportional to distance(target)s. @@ -90,7 +90,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/non.html b/doc/html/range/reference/algorithms/non.html new file mode 100644 index 0000000..f1f9123 --- /dev/null +++ b/doc/html/range/reference/algorithms/non.html @@ -0,0 +1,64 @@ + + + +-mutating Non-mutating algorithms + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/non_mutating.html b/doc/html/range/reference/algorithms/non_mutating.html new file mode 100644 index 0000000..f25a857 --- /dev/null +++ b/doc/html/range/reference/algorithms/non_mutating.html @@ -0,0 +1,81 @@ + + + +Non-mutating algorithms + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html similarity index 82% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html rename to doc/html/range/reference/algorithms/non_mutating/adjacent_find.html index f71cc25..4bece6d 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html +++ b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html @@ -1,12 +1,12 @@ -Range Algorithm - adjacent_find +adjacent_find - - + + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    +
    -
    - - Prototype +
    + + Prototype

    @@ -76,9 +76,9 @@

    -
    - - Description +
    + + Description

    Non-predicate versions: @@ -97,16 +97,16 @@ in rng where pred(x,y) is true.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/adjacent_find.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions of adjacent_find: @@ -142,9 +142,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    Linear. If empty(rng) @@ -162,7 +162,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html b/doc/html/range/reference/algorithms/non_mutating/binary_search.html similarity index 79% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html rename to doc/html/range/reference/algorithms/non_mutating/binary_search.html index 64a95a8..fcbbbbb 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html +++ b/doc/html/range/reference/algorithms/non_mutating/binary_search.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -42,9 +42,9 @@

    -
    - - Description +
    + + Description

    binary_search returns @@ -52,16 +52,16 @@ value val exists in the range rng.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/binary_search.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions of binary_search: @@ -110,9 +110,9 @@ argument type.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate version: @@ -128,9 +128,9 @@ rng is ordered in ascending order according to the function object pred.

    -
    - - Complexity +
    + + Complexity

    For non-random-access ranges, the complexity is O(N) where N @@ -151,7 +151,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html b/doc/html/range/reference/algorithms/non_mutating/count.html similarity index 76% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html rename to doc/html/range/reference/algorithms/non_mutating/count.html index 73a26b8..e1b7195 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html +++ b/doc/html/range/reference/algorithms/non_mutating/count.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,15 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -44,9 +43,9 @@

    -
    - - Description +
    + + Description

    count returns the number @@ -54,16 +53,16 @@ == val is true.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/count.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -84,9 +83,9 @@ value type can be compared for equality with an object of type Value.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) comparisons. @@ -102,7 +101,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/non_mutating/count_if.html b/doc/html/range/reference/algorithms/non_mutating/count_if.html new file mode 100644 index 0000000..53b05ad --- /dev/null +++ b/doc/html/range/reference/algorithms/non_mutating/count_if.html @@ -0,0 +1,104 @@ + + + +count_if + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class SinglePassRange, class UnaryPredicate>
    +typename range_difference<const SinglePassRange>::type
    +count_if(const SinglePassRange& rng, UnaryPredicate pred);
    +
    +

    +

    +
    + + Description +
    +

    + count_if returns the + number of elements x + in rng where pred(x) + is true. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/count_if.hpp +

    +
    + + Requirements +
    +
      +
    • +SinglePassRange is + a model of the Single + Pass Range Concept. +
    • +
    • +UnaryPredicate is a + model of the UnaryPredicateConcept. +
    • +
    • +SinglePassRange's value + type is a model of the EqualityComparableConcept. +
    • +
    • + The value type of SinglePassRange + is convertible to the argument type of UnaryPredicate. +
    • +
    +
    + + Complexity +
    +

    + Linear. Exactly distance(rng) invocations of pred. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html b/doc/html/range/reference/algorithms/non_mutating/equal.html similarity index 81% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html rename to doc/html/range/reference/algorithms/non_mutating/equal.html index d581af7..6f0e022 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -52,9 +51,9 @@

    -
    - - Description +
    + + Description

    equal returns true if distance(rng1) is equal to the distance(rng2) and for each element x @@ -70,16 +69,16 @@ returns true. Elements are considered equal in the predicate version if pred(x,y) is true.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/equal.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -138,9 +137,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    Linear. At most min(distance(rng1), distance(rng2)) @@ -157,7 +156,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html b/doc/html/range/reference/algorithms/non_mutating/equal_range.html similarity index 85% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html rename to doc/html/range/reference/algorithms/non_mutating/equal_range.html index 88d3af6..7aa0fc1 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal_range.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -70,9 +70,9 @@

    -
    - - Description +
    + + Description

    equal_range returns a @@ -84,16 +84,16 @@ the equality of elements is determined by operator<. For the predicate versions of equal_range the equality of elements is determined by pred.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/equal_range.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -142,9 +142,9 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: rng @@ -154,9 +154,9 @@ For the predicate versions: rng is ordered in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    For random-access ranges, the complexity is O(log N), @@ -173,7 +173,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html b/doc/html/range/reference/algorithms/non_mutating/find.html similarity index 77% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html rename to doc/html/range/reference/algorithms/non_mutating/find.html index f9fff13..485e44a 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html +++ b/doc/html/range/reference/algorithms/non_mutating/find.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +47,9 @@

    -
    - - Description +
    + + Description

    The versions of find @@ -59,16 +58,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/find.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -87,9 +86,9 @@ value type.
    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng) comparisons for equality. @@ -105,7 +104,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html b/doc/html/range/reference/algorithms/non_mutating/find_end.html similarity index 86% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html rename to doc/html/range/reference/algorithms/non_mutating/find_end.html index f6a9b8b..f11bb47 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_end.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -65,9 +65,9 @@

    -
    - - Description +
    + + Description

    The versions of find_end @@ -80,16 +80,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/find_end.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -147,9 +147,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    The number of comparisons is proportional to distance(rng1) * distance(rng2). If both ForwardRange1 @@ -168,7 +168,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html similarity index 84% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html rename to doc/html/range/reference/algorithms/non_mutating/find_first_of.html index cb3cc79..972690f 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -65,9 +65,9 @@

    -
    - - Description +
    + + Description

    The versions of find_first_of @@ -85,16 +85,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/find_first_of.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -146,9 +146,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    At most distance(rng1) * distance(rng2) comparisons. @@ -164,7 +164,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html b/doc/html/range/reference/algorithms/non_mutating/find_if.html similarity index 76% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html rename to doc/html/range/reference/algorithms/non_mutating/find_if.html index 44cdde4..59ab8d3 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_if.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    The versions of find_if @@ -63,16 +63,16 @@ that return a range_return, defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/find_if.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -89,17 +89,17 @@ is convertible to the argument type of UnaryPredicate.
    -
    - - Precondition: +
    + + Precondition:

    For each iterator i in rng, *i is in the domain of UnaryPredicate.

    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng) invocations of pred. @@ -115,7 +115,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html b/doc/html/range/reference/algorithms/non_mutating/for_each.html similarity index 75% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html rename to doc/html/range/reference/algorithms/non_mutating/for_each.html index 0ea9130..7d8792f 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html +++ b/doc/html/range/reference/algorithms/non_mutating/for_each.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    for_each traverses forward @@ -58,16 +58,16 @@ element x it invokes fun(x).

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/for_each.hpp

    -
    - - Requirements +
    + + Requirements
    • @@ -89,9 +89,9 @@ argument type.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng) applications of UnaryFunction. @@ -107,7 +107,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html similarity index 82% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html rename to doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html index 0978050..e3e37ef 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html +++ b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -52,9 +52,9 @@

    -
    - - Description +
    + + Description

    lexicographical_compare @@ -72,16 +72,16 @@ and using pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/lexicographical_compare.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions of lexicographical_compare: @@ -144,9 +144,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    Linear. At most 2 * @@ -164,7 +164,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html similarity index 81% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html rename to doc/html/range/reference/algorithms/non_mutating/lower_bound.html index 3a5a05d..f18a5bc 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    The versions of lower_bound @@ -71,16 +71,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/lower_bound.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -129,9 +129,9 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -147,9 +147,9 @@ rng is sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    For ranges that model the Random @@ -170,7 +170,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html b/doc/html/range/reference/algorithms/non_mutating/max_element.html similarity index 86% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html rename to doc/html/range/reference/algorithms/non_mutating/max_element.html index 0e042fd..9216f88 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/max_element.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -83,9 +83,9 @@

    -
    - - Description +
    + + Description

    The versions of max_element @@ -97,16 +97,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/max_element.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -141,9 +141,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Linear. Zero comparisons if empty(rng), otherwise distance(rng) - 1 @@ -160,7 +160,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html b/doc/html/range/reference/algorithms/non_mutating/min_element.html similarity index 86% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html rename to doc/html/range/reference/algorithms/non_mutating/min_element.html index 4752df4..4abd6a8 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/min_element.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -83,9 +83,9 @@

    -
    - - Description +
    + + Description

    The versions of min_element @@ -97,16 +97,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/min_element.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -141,9 +141,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Linear. Zero comparisons if empty(rng), otherwise distance(rng) - 1 @@ -160,7 +160,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html b/doc/html/range/reference/algorithms/non_mutating/mismatch.html similarity index 86% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html rename to doc/html/range/reference/algorithms/non_mutating/mismatch.html index 3af4682..d740dce 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html +++ b/doc/html/range/reference/algorithms/non_mutating/mismatch.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -105,34 +105,28 @@

    -
    - - Description +
    + + Description

    - The versions of mismatch - that return an iterator, return an iterator to the first position where - rng1 and rng2 differ. + mismatch finds the first + position where the correseponding elements from the two ranges rng1 and rng2 + are not equal.

    Equality is determined by operator== for non-predicate versions of mismatch, and by satisfying pred in the predicate versions.

    -

    - The versions of mismatch - that return a range_return, - defines found in the - same manner as the returned iterator described above. -

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/mismatch.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -191,16 +185,16 @@ second argument type.

    -
    - - Precondition: +
    + + Precondition:

    distance(rng2) >= distance(rng1)

    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng1) comparisons. @@ -216,7 +210,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html b/doc/html/range/reference/algorithms/non_mutating/search.html similarity index 89% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html rename to doc/html/range/reference/algorithms/non_mutating/search.html index 93994e9..9746802 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html +++ b/doc/html/range/reference/algorithms/non_mutating/search.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -95,9 +95,9 @@

    -
    - - Description +
    + + Description

    The versions of search @@ -114,16 +114,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/search.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -182,9 +182,9 @@ second argument type.

    -
    - - Complexity +
    + + Complexity

    Average complexity is Linear. Worst-case complexity is quadratic. @@ -200,7 +200,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/non_mutating/search_n.html b/doc/html/range/reference/algorithms/non_mutating/search_n.html new file mode 100644 index 0000000..2b94b7f --- /dev/null +++ b/doc/html/range/reference/algorithms/non_mutating/search_n.html @@ -0,0 +1,148 @@ + + + +search_n + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Prototype +
    +

    + +

    +
    template<class ForwardRange, class Integer, class Value>
    +typename range_iterator<ForwardRange>::type
    +search_n(ForwardRange& rng, Integer n, const Value& value);
    +
    +template<class ForwardRange, class Integer, class Value>
    +typename range_iterator<const ForwardRange>::type
    +search_n(const ForwardRange& rng, Integer n, const Value& value);
    +
    +template<class ForwardRange, class Integer, class Value, class BinaryPredicate>
    +typename range_iterator<ForwardRange>::type
    +search_n(ForwardRange& rng, Integer n, const Value& value,
    +         BinaryPredicate binary_pred);
    +
    +template<class ForwardRange, class Integer, class Value, class BinaryPredicate>
    +typename range_iterator<const ForwardRange>::type
    +search_n(const ForwardRange& rng, Integer n, const Value& value,
    +         BinaryPredicate binary_pred);
    +
    +

    +

    +
    + + Description +
    +

    + search_n searches rng for a sequence of length n equal to value + where equality is determined by operator== in the non-predicate case, + and by a predicate when one is supplied. +

    +
    + + Definition +
    +

    + Defined in the header file boost/range/algorithm/search_n.hpp +

    +
    + + Requirements +
    +

    + For the non-predicate versions: +

    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +ForwardRange's value + type is a model of the EqualityComparableConcept. +
    • +
    • +ForwardRanges value + type can be compared for equality with Value. +
    • +
    • +Integer is a model + of the IntegerConcept. +
    • +
    +

    + For the predicate versions: +

    +
      +
    • +ForwardRange is a model + of the Forward Range + Concept. +
    • +
    • +BinaryPredicate is + a model of the BinaryPredicateConcept. +
    • +
    • +ForwardRange's value + type is convertible to BinaryPredicate's + first argument type. +
    • +
    • +Value is convertible + to BinaryPredicate's + second argument type. +
    • +
    • +Integer is a model + of the IntegerConcept. +
    • +
    +
    + + Complexity +
    +

    + Average complexity is Linear. Worst-case complexity is quadratic. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html similarity index 79% rename from doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html rename to doc/html/range/reference/algorithms/non_mutating/upper_bound.html index 14f5248..1bf73d6 100644 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html @@ -5,9 +5,9 @@ - - - + + + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    The versions of upper_bound @@ -70,16 +70,16 @@ defines found in the same manner as the returned iterator described above.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/upper_bound.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -128,9 +128,9 @@ argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -146,9 +146,9 @@ rng is sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    For ranges that model the Random @@ -167,7 +167,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_numeric.html b/doc/html/range/reference/algorithms/numeric.html similarity index 54% rename from doc/html/range/reference/algorithms/range_numeric.html rename to doc/html/range/reference/algorithms/numeric.html index c6c6767..90818fa 100644 --- a/doc/html/range/reference/algorithms/range_numeric.html +++ b/doc/html/range/reference/algorithms/numeric.html @@ -6,8 +6,8 @@ - - + + @@ -20,21 +20,19 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -48,7 +46,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_numeric/accumulate.html b/doc/html/range/reference/algorithms/numeric/accumulate.html similarity index 76% rename from doc/html/range/reference/algorithms/range_numeric/accumulate.html rename to doc/html/range/reference/algorithms/numeric/accumulate.html index 26970d8..4ba0962 100644 --- a/doc/html/range/reference/algorithms/range_numeric/accumulate.html +++ b/doc/html/range/reference/algorithms/numeric/accumulate.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -52,9 +51,9 @@

    -
    - - Description +
    + + Description

    accumulate is a generalisation @@ -63,20 +62,20 @@

    The return value is the resultant value of the above algorithm.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/numeric.hpp

    -
    - - Requirements +
    + + Requirements
    -
    - - For +
    + + For the first version
      @@ -99,9 +98,9 @@ The return type of the above operator is convertible to Value.
    -
    - - For +
    + + For the second version
      @@ -133,9 +132,9 @@ is convertible to Value.
    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(source_rng). @@ -151,7 +150,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html similarity index 80% rename from doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html rename to doc/html/range/reference/algorithms/numeric/adjacent_difference.html index 9358698..5dff5f8 100644 --- a/doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html +++ b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -54,9 +54,9 @@

    -
    - - Description +
    + + Description

    adjacent_difference calculates @@ -68,20 +68,20 @@ to calculate the differences. The second version uses BinaryOperation instead of operator-().

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/numeric.hpp

    -
    - - Requirements +
    + + Requirements
    -
    - - For +
    + + For the first version
      @@ -110,9 +110,9 @@ set of value types.
    -
    - - For +
    + + For the second version
      @@ -145,17 +145,17 @@ set of value types.
    -
    - - Precondition: +
    + + Precondition:

    [result, result + distance(rng)) is a valid range.

    -
    - - Complexity +
    + + Complexity

    Linear. If empty(rng) @@ -173,7 +173,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_numeric/inner_product.html b/doc/html/range/reference/algorithms/numeric/inner_product.html similarity index 83% rename from doc/html/range/reference/algorithms/range_numeric/inner_product.html rename to doc/html/range/reference/algorithms/numeric/inner_product.html index a040134..7872880 100644 --- a/doc/html/range/reference/algorithms/range_numeric/inner_product.html +++ b/doc/html/range/reference/algorithms/numeric/inner_product.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -53,9 +53,9 @@

    -
    - - Description +
    + + Description

    inner_product calculates @@ -66,20 +66,20 @@ For further information on the inner_product algorithm please see inner_product.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/numeric.hpp

    -
    - - Requirements +
    + + Requirements
    -
    - - For +
    + + For the first version
      @@ -112,9 +112,9 @@ is convertible to Value.
    -
    - - For +
    + + For the second version
      @@ -161,16 +161,16 @@ is convertible to Value.
    -
    - - Precondition: +
    + + Precondition:

    distance(rng2) >= distance(rng1) is a valid range.

    -
    - - Complexity +
    + + Complexity

    Linear. Exactly distance(rng). @@ -186,7 +186,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_numeric/partial_sum.html b/doc/html/range/reference/algorithms/numeric/partial_sum.html similarity index 81% rename from doc/html/range/reference/algorithms/range_numeric/partial_sum.html rename to doc/html/range/reference/algorithms/numeric/partial_sum.html index e1ce532..cddd838 100644 --- a/doc/html/range/reference/algorithms/range_numeric/partial_sum.html +++ b/doc/html/range/reference/algorithms/numeric/partial_sum.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,29 +48,29 @@

    -
    - - Description +
    + + Description

    partial_sum calculates a generalised partial sum of rng in the same manner as std::partial_sum(boost::begin(rng), boost::end(rng), out_it). See partial_sum.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/numeric.hpp

    -
    - - Requirements +
    + + Requirements
    -
    - - For +
    + + For the first version
      @@ -98,9 +98,9 @@ set of value types.
    -
    - - For +
    + + For the second version
      @@ -127,17 +127,17 @@ set of value types.
    -
    - - Precondition: +
    + + Precondition:

    [result, result + distance(rng)) is a valid range.

    -
    - - Complexity +
    + + Complexity

    Linear. If empty(rng) @@ -155,7 +155,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/permutation_algorithms.html b/doc/html/range/reference/algorithms/permutation.html similarity index 56% rename from doc/html/range/reference/algorithms/permutation_algorithms.html rename to doc/html/range/reference/algorithms/permutation.html index 16bd254..c859468 100644 --- a/doc/html/range/reference/algorithms/permutation_algorithms.html +++ b/doc/html/range/reference/algorithms/permutation.html @@ -6,8 +6,8 @@ - - + + @@ -20,17 +20,17 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -44,7 +44,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html b/doc/html/range/reference/algorithms/permutation/next_permutation.html similarity index 79% rename from doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html rename to doc/html/range/reference/algorithms/permutation/next_permutation.html index 8691969..3f23383 100644 --- a/doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/next_permutation.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    next_permutation transforms @@ -66,16 +66,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/permutation.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -124,9 +124,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng) / 2 @@ -143,7 +143,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html b/doc/html/range/reference/algorithms/permutation/prev_permutation.html similarity index 81% rename from doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html rename to doc/html/range/reference/algorithms/permutation/prev_permutation.html index 2521275..3cb4d46 100644 --- a/doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/prev_permutation.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -48,9 +48,9 @@

    -
    - - Description +
    + + Description

    prev_permutation transforms @@ -66,16 +66,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/permutation.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -124,9 +124,9 @@ argument types.

    -
    - - Complexity +
    + + Complexity

    Linear. At most distance(rng) / 2 @@ -143,7 +143,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/range_algorithm_introduction.html b/doc/html/range/reference/algorithms/range_algorithm_introduction.html deleted file mode 100644 index 9f15ed5..0000000 --- a/doc/html/range/reference/algorithms/range_algorithm_introduction.html +++ /dev/null @@ -1,257 +0,0 @@ - - - -Introduction and motivation - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - In its most simple form a Range Algorithm - (or range-based algorithm) is simply an iterator-based algorithm where - the two iterator arguments have been replaced by - one range argument. For example, we may write -

    -

    - -

    -
    #include <boost/range/algorithm.hpp>
    -#include <vector>
    -
    -std::vector<int> vec = ...;
    -boost::sort(vec);
    -
    -

    -

    -

    - instead of -

    -

    - -

    -
    std::sort(vec.begin(), vec.end());
    -
    -

    -

    -

    - However, the return type of range algorithms is almost always different - from that of existing iterator-based algorithms. -

    -

    - One group of algorithms, like boost::sort(), will simply return the same range so - that we can continue to pass the range around and/or further modify it. - Because of this we may write -

    -
    boost:unique(boost::sort(vec));
    -
    -

    - to first sort the range and then run unique() on the sorted range. -

    -

    - Algorithms like boost::unique() - fall into another group of algorithms that return (potentially) narrowed - views of the original range. By default boost::unique(rng) returns the range [boost::begin(rng), found) - where found denotes the - iterator returned by std::unique(boost::begin(rng), boost::end(rng)) -

    -

    - Therefore exactly the unique values can be copied by writing -

    -
    boost::copy(boost::unique(boost::sort(vec)),
    -            std::ostream_iterator<int>(std::cout));
    -
    -

    -

    -

    - Algorithms like boost::unique usually return the same range: - [boost::begin(rng), found). However, this behaviour may be changed - by supplying the algorithms with a template argument: -

    -
    ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Expression -

    -
    -

    - Return -

    -
    -

    - boost::unique<boost::return_found>(rng) -

    -
    -

    - returns a single iterator like std::unique -

    -
    -

    - boost::unique<boost::return_begin_found>(rng) -

    -
    -

    - returns the range [boost::begin(rng), - found) - (this is the default) -

    -
    -

    - boost::unique<boost::return_begin_next>(rng) -

    -
    -

    - returns the range [boost::begin(rng), - boost::next(found)) -

    -
    -

    - boost::unique<boost::return_found_end>(rng) -

    -
    -

    - returns the range [found, - boost::end(rng)) -

    -
    -

    - boost::unique<boost::return_next_end>(rng) -

    -
    -

    - returns the range [boost::next(found),boost::end(rng)) -

    -
    -

    - boost::unique<boost::return_begin_end>(rng) -

    -
    -

    - returns the entire original range. -

    -
    -

    - This functionality has the following advantages: -

    -
      -
    1. - it allows for seamless functional-style - programming where you do not need to use named - local variables to store intermediate results -
    2. -
    3. - it is very safe - because the algorithm can verify out-of-bounds conditions and handle - tricky conditions that lead to empty ranges -
    4. -
    -

    - For example, consider how easy we may erase the duplicates in a sorted - container: -

    -

    - -

    -
    std::vector<int> vec = ...;
    -boost::erase(vec, boost::unique<boost::return_found_end>(boost::sort(vec)));
    -
    -

    -

    -

    - Notice the use of boost::return_found_end. - What if we wanted to erase all the duplicates except one of them? In old-fashined - STL-programming we might write -

    -

    - -

    -
    // assume 'vec' is already sorted
    -std::vector<int>::iterator i = std::unique(vec.begin(), vec.end());
    -
    -// remember this check or you get into problems
    -if (i != vec.end())
    -    ++i;
    -
    -vec.erase(i, vec.end());
    -
    -

    -

    -

    - The same task may be accomplished simply with -

    -
    boost::erase(vec, boost::unique<boost::return_next_end>(vec));
    -
    -

    - and there is no need to worry about generating an invalid range. Furthermore, - if the container is complex, calling vec.begin() several times will be more expensive - than using a range algorithm. -

    -
    - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html b/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html deleted file mode 100644 index a69db43..0000000 --- a/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html +++ /dev/null @@ -1,88 +0,0 @@ - - - -Mutating algorithms - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    - - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html b/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html deleted file mode 100644 index 5182eaf..0000000 --- a/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html +++ /dev/null @@ -1,64 +0,0 @@ - - - -New algorithms - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    - - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html b/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html deleted file mode 100644 index 87820b8..0000000 --- a/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -Non-mutating algorithms - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    - - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/algorithms/range_numeric/irange.html b/doc/html/range/reference/algorithms/range_numeric/irange.html deleted file mode 100644 index a23253d..0000000 --- a/doc/html/range/reference/algorithms/range_numeric/irange.html +++ /dev/null @@ -1,105 +0,0 @@ - - - -irange - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -
    - - Prototype -
    -

    - -

    -
    template<class Integer>
    -integer_range< range_detail::integer_iterator<Integer> >
    -irange(Integer first, Integer  last);
    -
    -template<class Integer, class StepSize>
    -integer_range< range_detail::integer_iterator_with_step<Integer, StepSize> >
    -irange(Integer first, Integer last, StepSize step_size);
    -
    -

    -

    -
    - - Description -
    -

    - irange is a function - to generate an Integer Range. -

    -

    - irange allows treating - integers as a model of the Random - Access Range Concept. It should be noted that the first and last - parameters denoted a half-open range. -

    -
    - - Definition -
    -

    - Defined in the header file boost/range/irange.hpp -

    -
    - - Requirements -
    -
      -
    1. -Integer is a model - of the Integer Concept. -
    2. -
    3. -StepSize is a model - of the SignedInteger - Concept. -
    4. -
    -
    - - Complexity -
    -

    - Constant. Since this function generates a new range the most significant - performance cost is incurred through the iteration of the generated range. -

    -
    - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/algorithms/set_algorithms.html b/doc/html/range/reference/algorithms/set.html similarity index 51% rename from doc/html/range/reference/algorithms/set_algorithms.html rename to doc/html/range/reference/algorithms/set.html index b9888f5..7de08c4 100644 --- a/doc/html/range/reference/algorithms/set_algorithms.html +++ b/doc/html/range/reference/algorithms/set.html @@ -6,8 +6,8 @@ - - + + @@ -20,22 +20,19 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -49,7 +46,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/set_algorithms/includes.html b/doc/html/range/reference/algorithms/set/includes.html similarity index 83% rename from doc/html/range/reference/algorithms/set_algorithms/includes.html rename to doc/html/range/reference/algorithms/set/includes.html index 0c538d9..d03a126 100644 --- a/doc/html/range/reference/algorithms/set_algorithms/includes.html +++ b/doc/html/range/reference/algorithms/set/includes.html @@ -5,8 +5,8 @@ - - + + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -47,9 +46,9 @@

    -
    - - Description +
    + + Description

    includes returns true if and only if, for every element @@ -59,16 +58,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/set_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -144,9 +143,9 @@ second argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -162,9 +161,9 @@ rng1 and rng2 are sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N), @@ -181,7 +180,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/set_algorithms/set_difference.html b/doc/html/range/reference/algorithms/set/set_difference.html similarity index 85% rename from doc/html/range/reference/algorithms/set_algorithms/set_difference.html rename to doc/html/range/reference/algorithms/set/set_difference.html index e02ebe2..3084d87 100644 --- a/doc/html/range/reference/algorithms/set_algorithms/set_difference.html +++ b/doc/html/range/reference/algorithms/set/set_difference.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -56,9 +55,9 @@

    -
    - - Description +
    + + Description

    set_difference constructs @@ -70,16 +69,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/set_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -163,9 +162,9 @@ second argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -181,9 +180,9 @@ rng1 and rng2 are sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N), @@ -200,7 +199,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/set_algorithms/set_intersection.html b/doc/html/range/reference/algorithms/set/set_intersection.html similarity index 86% rename from doc/html/range/reference/algorithms/set_algorithms/set_intersection.html rename to doc/html/range/reference/algorithms/set/set_intersection.html index ce4af10..a817f35 100644 --- a/doc/html/range/reference/algorithms/set_algorithms/set_intersection.html +++ b/doc/html/range/reference/algorithms/set/set_intersection.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,16 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -56,9 +56,9 @@

    -
    - - Description +
    + + Description

    set_intersection constructs @@ -70,16 +70,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/set_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -163,9 +163,9 @@ second argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -181,9 +181,9 @@ rng1 and rng2 are sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N), @@ -200,7 +200,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html similarity index 84% rename from doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html rename to doc/html/range/reference/algorithms/set/set_symmetric_difference.html index c33f771..659877c 100644 --- a/doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html +++ b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html @@ -5,9 +5,9 @@ - + - + @@ -20,16 +20,16 @@

    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -58,9 +58,9 @@

    -
    - - Description +
    + + Description

    set_symmetric_difference @@ -74,16 +74,16 @@ by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/set_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -167,9 +167,9 @@ second argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -185,9 +185,9 @@ rng1 and rng2 are sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N), @@ -204,7 +204,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/algorithms/set_algorithms/set_union.html b/doc/html/range/reference/algorithms/set/set_union.html similarity index 86% rename from doc/html/range/reference/algorithms/set_algorithms/set_union.html rename to doc/html/range/reference/algorithms/set/set_union.html index 93ec40f..ccc1783 100644 --- a/doc/html/range/reference/algorithms/set_algorithms/set_union.html +++ b/doc/html/range/reference/algorithms/set/set_union.html @@ -5,7 +5,7 @@ - + @@ -20,16 +20,15 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -
    - - Prototype +
    + + Prototype

    @@ -56,9 +55,9 @@

    -
    - - Description +
    + + Description

    set_union constructs @@ -69,16 +68,16 @@ in the non-predicate versions, and by evaluating pred in the predicate versions.

    -
    - - Definition +
    + + Definition

    Defined in the header file boost/range/algorithm/set_algorithm.hpp

    -
    - - Requirements +
    + + Requirements

    For the non-predicate versions: @@ -162,9 +161,9 @@ second argument types.

    -
    - - Precondition: +
    + + Precondition:

    For the non-predicate versions: @@ -180,9 +179,9 @@ rng1 and rng2 are sorted in ascending order according to pred.

    -
    - - Complexity +
    + + Complexity

    Linear. O(N), @@ -199,7 +198,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/concept_implementation.html b/doc/html/range/reference/concept_implementation.html new file mode 100644 index 0000000..0d150f3 --- /dev/null +++ b/doc/html/range/reference/concept_implementation.html @@ -0,0 +1,48 @@ + + + +Range concept implementation + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    + + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/concept_implementation/overview.html b/doc/html/range/reference/concept_implementation/overview.html new file mode 100644 index 0000000..d0c35e1 --- /dev/null +++ b/doc/html/range/reference/concept_implementation/overview.html @@ -0,0 +1,68 @@ + + + +Overview + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + Three types of objects are currently supported by the library: +

    +
      +
    • + standard-like containers +
    • +
    • std::pair<iterator,iterator>
    • +
    • + built-in arrays +
    • +
    +

    + Even though the behavior of the primary templates are exactly such that + standard containers will be supported by default, the requirements are + much lower than the standard container requirements. For example, the utility + class iterator_range implements the + minimal interface required + to make the class a Forward + Range. +

    +

    + Please also see Range concepts for + more details. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/concept_implementation/semantics.html b/doc/html/range/reference/concept_implementation/semantics.html new file mode 100644 index 0000000..1493f51 --- /dev/null +++ b/doc/html/range/reference/concept_implementation/semantics.html @@ -0,0 +1,163 @@ + + + +Semantics + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + + +
    + + notation +
    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Type +

    +
    +

    + Object +

    +
    +

    + Describes +

    +
    +

    + X +

    +
    +

    + x +

    +
    +

    + any type +

    +
    +

    + T +

    +
    +

    + t +

    +
    +

    + denotes behavior of the primary templates +

    +
    +

    + P +

    +
    +

    + p +

    +
    +

    + denotes std::pair<iterator,iterator> +

    +
    +

    + A[sz] +

    +
    +

    + a +

    +
    +

    + denotes an array of type A + of size sz +

    +
    +

    + Char* +

    +
    +

    + s +

    +
    +

    + denotes either char* or wchar_t* +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/concept_implementation/semantics/functions.html b/doc/html/range/reference/concept_implementation/semantics/functions.html new file mode 100644 index 0000000..0c0ef81 --- /dev/null +++ b/doc/html/range/reference/concept_implementation/semantics/functions.html @@ -0,0 +1,408 @@ + + + +Functions + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Return type +

    +
    +

    + Returns +

    +
    +

    + Complexity +

    +
    +

    + begin(x) +

    +
    +

    + range_iterator<X>::type +

    +
    +

    + p.first if p + is of type std::pair<T> a + if a is an + array range_begin(x) if that expression would invoke + a function found by ADL t.begin() otherwise +

    +
    +

    + constant time +

    +
    +

    + end(x) +

    +
    +

    + range_iterator<X>::type +

    +
    +

    + p.second if p + is of type std::pair<T> a + + sz + if a is an + array of size sz + range_end(x) + if that expression would invoke a function found by ADL t.end() + otherwise +

    +
    +

    + constant time +

    +
    +

    + empty(x) +

    +
    +

    + bool +

    +
    +

    + boost::begin(x) + == boost::end(x) +

    +
    +

    + constant time +

    +
    +

    + distance(x) +

    +
    +

    + range_difference<X>::type +

    +
    +

    + std::distance(boost::begin(x),boost::end(x)) +

    +
    +

    + - +

    +
    +

    + size(x) +

    +
    +

    + range_difference<X>::type +

    +
    +

    + boost::end(x) + - boost::begin(x) +

    +
    +

    + constant time +

    +
    +

    + rbegin(x) +

    +
    +

    + range_reverse_iterator<X>::type +

    +
    +

    + range_reverse_iterator<X>::type(boost::end(x)) +

    +
    +

    + constant time +

    +
    +

    + rend(x) +

    +
    +

    + range_reverse_iterator<X>::type +

    +
    +

    + range_reverse_iterator<X>::type(boost::begin(x)) +

    +
    +

    + constant time +

    +
    +

    + const_begin(x) +

    +
    +

    + range_iterator<const + X>::type +

    +
    +

    + range_iterator<const + X>::type(boost::begin(x)) +

    +
    +

    + constant time +

    +
    +

    + const_end(x) +

    +
    +

    + range_iterator<const + X>::type +

    +
    +

    + range_iterator<const + X>::type(boost::end(x)) +

    +
    +

    + constant time +

    +
    +

    + const_rbegin(x) +

    +
    +

    + range_reverse_iterator<const + X>::type +

    +
    +

    + range_reverse_iterator<const + X>::type(boost::rbegin(x)) +

    +
    +

    + constant time +

    +
    +

    + const_rend(x) +

    +
    +

    + range_reverse_iterator<const + X>::type +

    +
    +

    + range_reverse_iterator<const + X>::type(boost::rend(x)) +

    +
    +

    + constant time +

    +
    +

    + as_literal(x) +

    +
    +

    + iterator_range<U> where U + is Char* + if x is a pointer + to a string and U + is range_iterator<X>::type + otherwise +

    +
    +

    + [s,s + + std::char_traits<X>::length(s)) if s + is a Char* + or an array of Char + [boost::begin(x),boost::end(x)) otherwise +

    +
    +

    + linear time for pointers to a string or arrays of Char, constant time otherwise +

    +
    +

    + as_array(x) +

    +
    +

    + iterator_range<X> +

    +
    +

    + [boost::begin(x),boost::end(x)) +

    +
     
    +

    + The special const_-named + functions are useful when you want to document clearly that your code + is read-only. +

    +

    + as_literal() + can be used internally + in string algorithm libraries such that arrays of characters are handled + correctly. +

    +

    + as_array() + can be used with string algorithm libraries to make it clear that arrays + of characters are handled like an array and not like a string. +

    +

    + Notice that the above functions should always be called with qualification + (boost::) + to prevent unintended + Argument Dependent Lookup (ADL). +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/concept_implementation/semantics/metafunctions.html b/doc/html/range/reference/concept_implementation/semantics/metafunctions.html new file mode 100644 index 0000000..779a3b7 --- /dev/null +++ b/doc/html/range/reference/concept_implementation/semantics/metafunctions.html @@ -0,0 +1,236 @@ + + + +Metafunctions + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Expression +

    +
    +

    + Return type +

    +
    +

    + Complexity +

    +
    +

    + range_iterator<X>::type +

    +
    +

    + +

    +
    T::iterator
    +P::first_type
    +A*
    +
    +

    +

    +
    +

    + compile time +

    +
    +

    + range_iterator<const + X>::type +

    +
    +

    + +

    +
    T::const_iterator
    +P::first_type
    +const A*
    +
    +

    +

    +
    +

    + compile time +

    +
    +

    + range_value<X>::type +

    +
    +

    + boost::iterator_value<range_iterator<X>::type>::type +

    +
    +

    + compile time +

    +
    +

    + range_reference<X>::type +

    +
    +

    + boost::iterator_reference<range_iterator<X>::type>::type +

    +
    +

    + compile time +

    +
    +

    + range_pointer<X>::type +

    +
    +

    + boost::iterator_pointer<range_iterator<X>::type>::type +

    +
    +

    + compile time +

    +
    +

    + range_category<X>::type +

    +
    +

    + boost::iterator_category<range_iterator<X>::type>::type +

    +
    +

    + compile time +

    +
    +

    + range_difference<X>::type +

    +
    +

    + boost::iterator_category<range_iterator<X>::type>::type +

    +
    +

    + compile time +

    +
    +

    + range_reverse_iterator<X>::type +

    +
    +

    + boost::reverse_iterator<range_iterator<X>::type> +

    +
    +

    + compile time +

    +
    +

    + range_reverse_iterator<const + X>::type +

    +
    +

    + boost::reverse_iterator<range_iterator<const X>::type +

    +
    +

    + compile time +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/concept_implementation/synopsis.html b/doc/html/range/reference/concept_implementation/synopsis.html new file mode 100644 index 0000000..9dffad1 --- /dev/null +++ b/doc/html/range/reference/concept_implementation/synopsis.html @@ -0,0 +1,185 @@ + + + +Synopsis + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + +

    +
    namespace boost
    +{
    +    //
    +    // Single Pass Range metafunctions
    +    //
    +
    +    template< class T >
    +    struct range_iterator;
    +
    +    template< class T >
    +    struct range_value;
    +
    +    template< class T >
    +    struct range_reference;
    +    
    +    template< class T >
    +    struct range_pointer;
    +    
    +    template< class T >
    +    struct range_category;
    +
    +    //
    +    // Forward Range metafunctions
    +    //
    +
    +    template< class T >
    +    struct range_difference;
    +
    +    //
    +    // Bidirectional Range metafunctions
    +    //
    +
    +    template< class T >
    +    struct range_reverse_iterator;
    +
    +    //
    +    // Single Pass Range functions
    +    //
    +
    +    template< class T >
    +    typename range_iterator<T>::type
    +    begin( T& r );
    +
    +    template< class T >
    +    typename range_iterator<const T>::type
    +    begin( const T& r );
    +
    +    template< class T >
    +    typename range_iterator<T>::type
    +    end( T& r );
    +
    +    template< class T >
    +    typename range_iterator<const T>::type
    +    end( const T& r );
    +
    +    template< class T >
    +    bool
    +    empty( const T& r );
    +
    +    //
    +    // Forward Range functions
    +    //
    +
    +    template< class T >
    +    typename range_difference<T>::type
    +    distance( const T& r );
    +
    +    //
    +    // Bidirectional Range functions
    +    //
    +
    +    template< class T >
    +    typename range_reverse_iterator<T>::type
    +    rbegin( T& r );
    +
    +    template< class T >
    +    typename range_reverse_iterator<const T>::type
    +    rbegin( const T& r );
    +
    +    template< class T >
    +    typename range_reverse_iterator<T>::type
    +    rend( T& r );
    +
    +    template< class T >
    +    typename range_reverse_iterator<const T>::type
    +    rend( const T& r );
    +    
    +    //
    +    // Random Access Range functions
    +    //
    +    
    +    template< class T >
    +    typename range_difference<T>::type
    +    size( const T& r );
    +
    +    //
    +    // Special const Range functions
    +    //
    +
    +    template< class T >
    +    typename range_iterator<const T>::type 
    +    const_begin( const T& r );
    +
    +    template< class T >
    +    typename range_iterator<const T>::type 
    +    const_end( const T& r );
    +
    +    template< class T >
    +    typename range_reverse_iterator<const T>::type 
    +    const_rbegin( const T& r );
    +
    +    template< class T >
    +    typename range_reverse_iterator<const T>::type 
    +    const_rend( const T& r );
    +    
    +    //
    +    // String utilities
    +    //
    +    
    +    template< class T >
    +    iterator_range< ... see below ... >
    +    as_literal( T& r );
    +    
    +    template< class T >
    +    iterator_range< ... see below ... >
    +    as_literal( const T& r );
    +    
    +    template< class T >
    +    iterator_range< typename range_iterator<T>::type >
    +    as_array( T& r );
    +    
    +    template< class T >
    +    iterator_range< typename range_iterator<const T>::type >
    +    as_array( const T& r );
    +
    +} // namespace 'boost' 
    +
    +

    +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/extending.html b/doc/html/range/reference/extending.html index fc32e83..a9d7524 100644 --- a/doc/html/range/reference/extending.html +++ b/doc/html/range/reference/extending.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -45,7 +45,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/extending/method_3/method_3_2.html b/doc/html/range/reference/extending/method_3/method_3_2.html index f0bae90..2a0be9d 100644 --- a/doc/html/range/reference/extending/method_3/method_3_2.html +++ b/doc/html/range/reference/extending/method_3/method_3_2.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    @@ -149,7 +149,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/overview.html b/doc/html/range/reference/overview.html deleted file mode 100644 index ae0bbf0..0000000 --- a/doc/html/range/reference/overview.html +++ /dev/null @@ -1,68 +0,0 @@ - - - -Overview - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -
    -
    -PrevUpHomeNext -
    -
    - -

    - Three types of objects are currently supported by the library: -

    -
      -
    • - standard-like containers -
    • -
    • std::pair<iterator,iterator>
    • -
    • - built-in arrays -
    • -
    -

    - Even though the behavior of the primary templates are exactly such that standard - containers will be supported by default, the requirements are much lower - than the standard container requirements. For example, the utility class - iterator_range - implements the minimal interface - required to make the class a Forward - Range. -

    -

    - Please also see Range concepts for - more details. -

    -
    - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/ranges.html b/doc/html/range/reference/ranges.html index 2e16372..d1d6017 100644 --- a/doc/html/range/reference/ranges.html +++ b/doc/html/range/reference/ranges.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -42,7 +42,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/reference/ranges/counting_range.html b/doc/html/range/reference/ranges/counting_range.html index 7bc2c80..566a7f2 100644 --- a/doc/html/range/reference/ranges/counting_range.html +++ b/doc/html/range/reference/ranges/counting_range.html @@ -27,7 +27,7 @@ counting_range

    - + Prototype

    @@ -48,7 +48,7 @@

    - + Description

    @@ -58,14 +58,14 @@ (from Boost.Iterator).

    - + Definition

    Defined in header file boost/range/counting_range.hpp

    - + Requirements
    1. diff --git a/doc/html/range/reference/ranges/irange.html b/doc/html/range/reference/ranges/irange.html index fc88a82..358791b 100644 --- a/doc/html/range/reference/ranges/irange.html +++ b/doc/html/range/reference/ranges/irange.html @@ -7,7 +7,7 @@ - + @@ -20,31 +20,31 @@

      -PrevUpHomeNext +PrevUpHomeNext
      - + Prototype

      template<class Integer>
      -integer_range< range_detail::integer_iterator<Integer> >
      +iterator_range< range_detail::integer_iterator<Integer> >
       irange(Integer first, Integer  last);
       
       template<class Integer, class StepSize>
      -integer_range< range_detail::integer_iterator_with_step<Integer, StepSize> >
      +iterator_range< range_detail::integer_iterator_with_step<Integer, StepSize> >
       irange(Integer first, Integer last, StepSize step_size);
       

      - + Description

      @@ -58,14 +58,14 @@ parameters denoted a half-open range.

      - + Definition

      Defined in the header file boost/range/irange.hpp

      - + Requirements
        @@ -79,7 +79,7 @@
      - + Complexity

      @@ -97,7 +97,7 @@


      -PrevUpHomeNext +PrevUpHomeNext
      diff --git a/doc/html/range/reference/ranges/istream_range.html b/doc/html/range/reference/ranges/istream_range.html index db454bc..eda91a4 100644 --- a/doc/html/range/reference/ranges/istream_range.html +++ b/doc/html/range/reference/ranges/istream_range.html @@ -27,7 +27,7 @@ istream_range
    - + Prototype

    @@ -40,7 +40,7 @@

    - + Description

    @@ -49,7 +49,7 @@ wrapping a std::istream_iterator.

    - + Definition

    diff --git a/doc/html/range/reference/semantics.html b/doc/html/range/reference/semantics.html deleted file mode 100644 index 5ab20fe..0000000 --- a/doc/html/range/reference/semantics.html +++ /dev/null @@ -1,163 +0,0 @@ - - - -Semantics - - - - - - - - - - - - - - - -
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    -


    -
    -PrevUpHomeNext -
    -
    - - -
    - - notation -
    -
    ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Type -

    -
    -

    - Object -

    -
    -

    - Describes -

    -
    -

    - X -

    -
    -

    - x -

    -
    -

    - any type -

    -
    -

    - T -

    -
    -

    - t -

    -
    -

    - denotes behavior of the primary templates -

    -
    -

    - P -

    -
    -

    - p -

    -
    -

    - denotes std::pair<iterator,iterator> -

    -
    -

    - A[sz] -

    -
    -

    - a -

    -
    -

    - denotes an array of type A - of size sz -

    -
    -

    - Char* -

    -
    -

    - s -

    -
    -

    - denotes either char* or wchar_t* -

    -
    -
    - - - -
    -
    -
    -PrevUpHomeNext -
    - - diff --git a/doc/html/range/reference/utilities.html b/doc/html/range/reference/utilities.html new file mode 100644 index 0000000..f2f39b2 --- /dev/null +++ b/doc/html/range/reference/utilities.html @@ -0,0 +1,83 @@ + + + +Utilities + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + + +

    + Having an abstraction that encapsulates a pair of iterators is very useful. + The standard library uses std::pair + in some circumstances, but that class is cumbersome to use because we need + to specify two template arguments, and for all range algorithm purposes we + must enforce the two template arguments to be the same. Moreover, std::pair<iterator,iterator> is hardly self-documenting whereas more + domain specific class names are. Therefore these two classes are provided: +

    +
      +
    • + Class iterator_range +
    • +
    • + Class sub_range +
    • +
    • + Function join +
    • +
    +

    + The iterator_range class + is templated on an Forward + Traversal Iterator and should be used whenever fairly general code + is needed. The sub_range + class is templated on an Forward + Range and it is less general, but a bit easier to use since its template + argument is easier to specify. The biggest difference is, however, that a + sub_range can propagate constness + because it knows what a corresponding const_iterator + is. +

    +

    + Both classes can be used as ranges since they implement the minimal + interface required for this to work automatically. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/utilities/iterator_range.html b/doc/html/range/reference/utilities/iterator_range.html new file mode 100644 index 0000000..a0fc0c0 --- /dev/null +++ b/doc/html/range/reference/utilities/iterator_range.html @@ -0,0 +1,328 @@ + + + +Class iterator_range + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + The intention of the iterator_range + class is to encapsulate two iterators so they fulfill the Forward + Range concept. A few other functions are also provided for convenience. +

    +

    + If the template argument is not a model of Forward + Traversal Iterator, one can still use a subset of the interface. + In particular, size() + requires Random Access Traversal Iterators whereas empty() only requires Single Pass Iterators. +

    +

    + Recall that many default constructed iterators are singular + and hence can only be assigned, but not compared or incremented or anything. + However, if one creates a default constructed iterator_range, + then one can still call all its member functions. This design decision + avoids the iterator_range + imposing limitations upon ranges of iterators that are not singular. Any + singularity limitation is simply propogated from the underlying iterator + type. +

    +
    + + Synopsis +
    +

    + +

    +
    namespace boost
    +{
    +    template< class ForwardTraversalIterator >
    +    class iterator_range
    +    {
    +    public: // Forward Range types
    +        typedef ForwardTraversalIterator   iterator;
    +        typedef ForwardTraversalIterator   const_iterator;
    +        typedef iterator_difference<iterator>::type difference_type;
    +
    +    public: // construction, assignment
    +        template< class ForwardTraversalIterator2 >
    +        iterator_range( ForwardTraversalIterator2 Begin, ForwardTraversalIterator2 End );
    +                    
    +        template< class ForwardRange >
    +        iterator_range( ForwardRange& r );
    +  
    +        template< class ForwardRange >
    +        iterator_range( const ForwardRange& r );
    +        
    +        template< class ForwardRange >
    +        iterator_range& operator=( ForwardRange& r );
    +
    +        template< class ForwardRange >
    +        iterator_range& operator=( const ForwardRange& r );
    +    
    +    public: // Forward Range functions
    +        iterator  begin() const;
    +        iterator  end() const;
    +        
    +    public: // convenience
    +        operator    unspecified_bool_type() const;
    +        bool        equal( const iterator_range& ) const;
    +        value_type& front() const;
    +        value_type& back() const;
    +        iterator_range& advance_begin(difference_type n);
    +        iterator_range& advance_end(difference_type n);
    +        bool      empty() const;
    +        // for Random Access Range only: 
    +        reference operator[]( difference_type at ) const;
    +        value_type operator()( difference_type at ) const;
    +        size_type size() const;
    +    };
    +    
    +    // stream output
    +    template< class ForwardTraversalIterator, class T, class Traits >
    +    std::basic_ostream<T,Traits>& 
    +    operator<<( std::basic_ostream<T,Traits>& Os,
    +                const iterator_range<ForwardTraversalIterator>& r );
    +
    +    // comparison
    +    template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
    +    bool operator==( const iterator_range<ForwardTraversalIterator>& l, 
    +                     const iterator_range<ForwardTraversalIterator2>& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator==( const iterator_range<ForwardTraversalIterator>& l, 
    +                     const ForwardRange& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator==( const ForwardRange& l,
    +                     const iterator_range<ForwardTraversalIterator>& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
    +    bool operator!=( const iterator_range<ForwardTraversalIterator>& l, 
    +                     const iterator_range<ForwardTraversalIterator2>& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator!=( const iterator_range<ForwardTraversalIterator>& l, 
    +                     const ForwardRange& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator!=( const ForwardRange& l,
    +                     const iterator_range<ForwardTraversalIterator>& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardTraversalIterator2 >
    +    bool operator<( const iterator_range<ForwardTraversalIterator>& l, 
    +                    const iterator_range<ForwardTraversalIterator2>& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator<( const iterator_range<ForwardTraversalIterator>& l, 
    +                    const ForwardRange& r );
    +
    +    template< class ForwardTraversalIterator, class ForwardRange >
    +    bool operator<( const ForwardRange& l,
    +                    const iterator_range<ForwardTraversalIterator>& r );
    + 
    +    // external construction
    +    template< class ForwardTraversalIterator >
    +    iterator_range< ForwardTraversalIterator >
    +    make_iterator_range( ForwardTraversalIterator Begin, 
    +                         ForwardTraversalIterator End );
    +       
    +    template< class ForwardRange >
    +    iterator_range< typename range_iterator<ForwardRange>::type >
    +    make_iterator_range( ForwardRange& r );
    +
    +    template< class ForwardRange >
    +    iterator_range< typename range_iterator<const ForwardRange>::type >
    +    make_iterator_range( const ForwardRange& r );
    +    
    +    template< class Range >
    +    iterator_range< typename range_iterator<Range>::type >
    +    make_iterator_range( Range& r,
    +                         typename range_difference<Range>::type advance_begin,
    +                         typename range_difference<Range>::type advance_end );
    +    
    +    template< class Range >
    +    iterator_range< typename range_iterator<const Range>::type >
    +    make_iterator_range( const Range& r, 
    +                         typename range_difference<const Range>::type advance_begin,
    +                         typename range_difference<const Range>::type advance_end );
    +    
    +    // convenience
    +    template< class Sequence, class ForwardRange >
    +    Sequence copy_range( const ForwardRange& r );
    +    
    +} // namespace 'boost'
    +
    +

    +

    +

    + If an instance of iterator_range + is constructed by a client with two iterators, the client must ensure that + the two iterators delimit a valid closed-open range [begin,end). +

    +

    + It is worth noticing that the templated constructors and assignment operators + allow conversion from iterator_range<iterator> to iterator_range<const_iterator>. Similarly, since the comparison operators + have two template arguments, we can compare ranges whenever the iterators + are comparable; for example when we are dealing with const and non-const + iterators from the same container. +

    +
    + + Details + member functions +
    +

    + operator unspecified_bool_type() const; +

    +
    +

    +

    +

    + Returns !empty(); +

    +

    +

    +
    +

    + bool equal( iterator_range& r ) const; +

    +
    +

    +

    +

    + Returns begin() + == r.begin() && + end() + == r.end(); +

    +

    +

    +
    +
    + + Details + functions +
    +

    + bool operator==( const ForwardRange1& + l, + const ForwardRange2& r ); +

    +
    +

    +

    +

    + Returns size(l) != size(r) ? false : std::equal( + begin(l), end(l), begin(r) ); +

    +

    +

    +
    +

    + bool operator!=( const ForwardRange1& + l, + const ForwardRange2& r ); +

    +
    +

    +

    +

    + Returns !( l == r ); +

    +

    +

    +
    +

    + bool operator<( const ForwardRange1& + l, + const ForwardRange2& r ); +

    +
    +

    +

    +

    + Returns std::lexicographical_compare( + begin(l), end(l), begin(r), end(r) ); +

    +

    +

    +
    +

    + +

    +
    iterator_range make_iterator_range( Range& r,
    +                                    typename range_difference<Range>::type advance_begin, 
    +                                    typename range_difference<Range>::type advance_end );
    +
    +

    +

    +
    +

    +

    +

    + Effects: +

    +

    +

    +
    +

    + +

    +
    iterator new_begin = begin( r ),
    +iterator new_end   = end( r );
    +std::advance( new_begin, advance_begin );
    +std::advance( new_end, advance_end );
    +return make_iterator_range( new_begin, new_end );
    +
    +

    +

    +

    + Sequence copy_range( const ForwardRange& + r ); +

    +
    +

    +

    +

    + Returns Sequence( + begin(r), end(r) ); +

    +

    +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/utilities/join.html b/doc/html/range/reference/utilities/join.html new file mode 100644 index 0000000..349f282 --- /dev/null +++ b/doc/html/range/reference/utilities/join.html @@ -0,0 +1,89 @@ + + + +Function join + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + The intention of the join + function is to join two ranges into one longer range. +

    +

    + The resultant range will have the lowest common traversal of the two ranges + supplied as parameters. +

    +

    + Note that the joined range incurs a performance cost due to the need to + check if the end of a range has been reached internally during traversal. +

    +
    + + Synposis +
    +

    + +

    +
    template<typename SinglePassRange1, typename SinglePassRange2>
    +iterator_range<range_detail::join_iterator<
    +    typename range_iterator<const SinglePassRange1>::type,
    +    typename range_iterator<const SinglePassRange2>::type,
    +    typename add_const<
    +        typename range_value<const SinglePassRange1>::type>::type>
    +>
    +join(const SinglePassRange1& rng1, const SinglePassRange2& rng2)
    +
    +template<typename SinglePassRange1, typename SinglePassRange2>
    +iterator_range<range_detail::join_iterator<
    +    typename range_iterator<SinglePassRange1>::type,
    +    typename range_iterator<SinglePassRange2>::type,
    +    typename range_value<SinglePassRange1>::type>
    +>
    +join(SinglePassRange1& rng1, SinglePassRange2& rng2);
    +
    +

    +

    +
    + + Example +
    +

    + The expression join(irange(0,5), irange(5,10)) would + evaluate to a range representing an integer range [0,10) +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/reference/utilities/sub_range.html b/doc/html/range/reference/utilities/sub_range.html new file mode 100644 index 0000000..8c75a91 --- /dev/null +++ b/doc/html/range/reference/utilities/sub_range.html @@ -0,0 +1,123 @@ + + + +Class sub_range + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +

    + The sub_range class inherits + all its functionality from the iterator_range class. The sub_range class is often easier to use + because one must specify the Forward + Range template argument instead of an iterator. Moreover, the sub_range class can propagate constness + since it knows what a corresponding const_iterator + is. +

    +
    + + Synopsis +
    +

    + +

    +
    namespace boost
    +{
    +    template< class ForwardRange >
    +    class sub_range : public iterator_range< typename range_iterator<ForwardRange>::type >
    +    {
    +    public: 
    +        typedef typename range_iterator<ForwardRange>::type iterator;
    +        typedef typename range_iterator<const ForwardRange>::type  const_iterator;
    +        typedef typename iterator_difference<iterator>::type difference_type;
    +    
    +    public: // construction, assignment
    +        template< class ForwardTraversalIterator >
    +        sub_range( ForwardTraversalIterator Begin, ForwardTraversalIterator End );
    +
    +        template< class ForwardRange2 >
    +        sub_range( ForwardRange2& r );
    +         
    +        template< class ForwardRange2 >
    +        sub_range( const Range2& r );
    +         
    +        template< class ForwardRange2 >
    +        sub_range& operator=( ForwardRange2& r );
    +
    +        template< class ForwardRange2 >
    +        sub_range& operator=( const ForwardRange2& r );    
    +    
    +    public:  // Forward Range functions 
    +        iterator        begin();
    +        const_iterator  begin() const;
    +        iterator        end();
    +        const_iterator  end() const;    
    +        
    +    public: // convenience 
    +        value_type&       front();
    +        const value_type& front() const;
    +        value_type&       back();
    +        const value_type& back() const;
    +        // for Random Access Range only: 
    +        value_type&       operator[]( size_type at );
    +        const value_type& operator[]( size_type at ) const;
    +    
    +    public:
    +        // rest of interface inherited from iterator_range
    +    };
    +    
    +} // namespace 'boost'
    +
    +

    +

    +

    + The class should be trivial to use as seen below. Imagine that we have + an algorithm that searches for a sub-string in a string. The result is + an iterator_range, that delimits the match. We need to store the result + from this algorithm. Here is an example of how we can do it with and without + sub_range +

    +

    + +

    +
    std::string str("hello");
    +iterator_range<std::string::iterator> ir = find_first( str, "ll" );
    +sub_range<std::string>               sub = find_first( str, "ll" );
    +
    +

    +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/range/style_guide.html b/doc/html/range/style_guide.html index b3e147a..c9f3e34 100644 --- a/doc/html/range/style_guide.html +++ b/doc/html/range/style_guide.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -92,7 +92,7 @@

    It might, however, be reasonable to specify only one category if the other - category does not matter. For example, the iterator_range can be constructed + category does not matter. For example, the iterator_range can be constructed from a Forward Range. This means that we do not care about what value access properties the Range has. Similarly, a Readable Range will be one that has the lowest possible traversal @@ -135,7 +135,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/upgrade/upgrade_from_1_34.html b/doc/html/range/upgrade/upgrade_from_1_34.html index dfc4c52..1275e9c 100644 --- a/doc/html/range/upgrade/upgrade_from_1_34.html +++ b/doc/html/range/upgrade/upgrade_from_1_34.html @@ -33,12 +33,11 @@
    1. Direct support for character arrays was abandoned in favor of uniform treatment - of all arrays. Instead string algorithms can use the new function as_literal(). + of all arrays. Instead string algorithms can use the new function as_literal().
    2. -size - now requires a Random - Access Range. The old behavior is provided as distance(). +size now requires a Random + Access Range. The old behavior is provided as distance().
    3. range_size<T>::type has been completely removed in favor diff --git a/doc/html/range/utilities.html b/doc/html/range/utilities.html deleted file mode 100644 index 6c16a00..0000000 --- a/doc/html/range/utilities.html +++ /dev/null @@ -1,82 +0,0 @@ - - - -Utilities - - - - - - - - - - - - - - - -
      Boost C++ LibrariesHomeLibrariesPeopleFAQMore
      -
      -
      -PrevUpHomeNext -
      -
      - - -

      - Having an abstraction that encapsulates a pair of iterators is very useful. - The standard library uses std::pair in - some circumstances, but that class is cumbersome to use because we need to - specify two template arguments, and for all range algorithm purposes we must - enforce the two template arguments to be the same. Moreover, std::pair<iterator,iterator> is hardly self-documenting whereas more - domain specific class names are. Therefore these two classes are provided: -

      -
        -
      • - Class iterator_range -
      • -
      • - Class sub_range -
      • -
      • - Function join -
      • -
      -

      - The iterator_range class is - templated on an Forward - Traversal Iterator and should be used whenever fairly general code - is needed. The sub_range class - is templated on an Forward Range - and it is less general, but a bit easier to use since its template argument - is easier to specify. The biggest difference is, however, that a sub_range can propagate constness because - it knows what a corresponding const_iterator - is. -

      -

      - Both classes can be used as ranges since they implement the minimal - interface required for this to work automatically. -

      -
      - - - -
      -
      -
      -PrevUpHomeNext -
      - - diff --git a/doc/html/range/utilities/iterator_range.html b/doc/html/range/utilities/iterator_range.html index 0902337..6f536e7 100644 --- a/doc/html/range/utilities/iterator_range.html +++ b/doc/html/range/utilities/iterator_range.html @@ -47,7 +47,7 @@ limitation is simply propogated from the underlying iterator type.

      - + Synopsis

      @@ -187,7 +187,7 @@ iterators from the same container.

      - + Details member functions
      @@ -218,7 +218,7 @@

    - + Details functions
    diff --git a/doc/html/range/utilities/join.html b/doc/html/range/utilities/join.html index e73c51e..fa140e5 100644 --- a/doc/html/range/utilities/join.html +++ b/doc/html/range/utilities/join.html @@ -39,7 +39,7 @@ if the end of a range has been reached internally during traversal.

    - + Synposis

    @@ -65,7 +65,7 @@

    - + Example

    diff --git a/doc/html/range/utilities/sub_range.html b/doc/html/range/utilities/sub_range.html index e30fba7..a9f5d42 100644 --- a/doc/html/range/utilities/sub_range.html +++ b/doc/html/range/utilities/sub_range.html @@ -35,7 +35,7 @@ is.

    - + Synopsis

    diff --git a/doc/reference.qbk b/doc/reference.qbk index 037495e..76e210e 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -1,11 +1,16 @@ -[section Reference] +[section:reference Reference] [include reference/overview.qbk] + +[section:concept_implementation Range concept implementation] [include reference/synopsis.qbk] [include reference/semantics.qbk] +[endsect] + [include reference/adaptors.qbk] [include reference/algorithms.qbk] [include reference/ranges.qbk] +[include reference/utilities.qbk] [include reference/extending.qbk] [endsect] diff --git a/doc/reference/adaptors.qbk b/doc/reference/adaptors.qbk index 9de7fc5..1b3fd9f 100644 --- a/doc/reference/adaptors.qbk +++ b/doc/reference/adaptors.qbk @@ -1,6 +1,6 @@ [section:adaptors Range Adaptors] -[section:adaptors_introduction Introduction and motivation] +[section:introduction Introduction and motivation] A [*Range Adaptor] is a class that wraps an existing Range to provide a new Range with different behaviour. Since the behaviour of Ranges is determined by their associated iterators, a Range Adaptor simply wraps the underlying iterators with new special iterators. In this example @@ -121,31 +121,7 @@ In other words: [endsect] -[section:adaptors_synopsis Synopsis] - -The library provides the following Adapter Generator expressions: - -`` -rng | boost::adaptors::adjacent_filtered(bi_pred) -rng | boost::adaptors::copied(n,m) -rng | boost::adaptors::filtered(pred) -rng | boost::adaptors::indexed -rng | boost::adaptors::indirected -rng | boost::adaptors::map_keys -rng | boost::adaptors::map_values -rng | boost::adaptors::replaced(new_value, old_value) -rng | boost::adaptors::replaced_if(pred, new_value) -rng | boost::adaptors::reversed -rng | boost::adaptors::sliced(n, m) -rng | boost::adaptors::strided(n) -rng | boost::adaptors::tokenized( ) -rng | boost::adaptors::transformed(fun) -rng | boost::adaptors::uniqued -`` - -[endsect] - -[section:adaptors_general_requirements General Requirements] +[section:general_requirements General Requirements] In the description of generator expressions, the following notation is used: @@ -183,7 +159,7 @@ rng | boost::adaptors::adaptor_generator [endsect] -[section:adaptors_reference Reference] +[section:reference Reference] [include adaptors/adjacent_filtered.qbk] [include adaptors/copied.qbk] [include adaptors/filtered.qbk] diff --git a/doc/reference/adaptors/adjacent_filtered.qbk b/doc/reference/adaptors/adjacent_filtered.qbk index 933536d..1502d3b 100644 --- a/doc/reference/adaptors/adjacent_filtered.qbk +++ b/doc/reference/adaptors/adjacent_filtered.qbk @@ -9,7 +9,8 @@ * [*Precondition:] The `value_type` of the range is convertible to both argument types of `bi_pred`. * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The minimum of the range category of `rng` and __forward_range__ [section:adjacent_filtered_example adjacent_filtered example] `` diff --git a/doc/reference/adaptors/copied.qbk b/doc/reference/adaptors/copied.qbk index 263286c..dbdeb4b 100644 --- a/doc/reference/adaptors/copied.qbk +++ b/doc/reference/adaptors/copied.qbk @@ -8,7 +8,8 @@ * [*Precondition:] `0 <= n && n <= m && m < distance(rng)` * [*Returns:] A new `iterator_range` that holds the sliced range `[n,m)` of the original range. -* [*Range Category:] `RandomAccessRange` +* [*Range Category:] __random_access_range__ +* [*Returned Range Category:] __random_access_range__ [section:copied_example copied example] `` diff --git a/doc/reference/adaptors/filtered.qbk b/doc/reference/adaptors/filtered.qbk index 2a6dc33..02c826f 100644 --- a/doc/reference/adaptors/filtered.qbk +++ b/doc/reference/adaptors/filtered.qbk @@ -9,8 +9,8 @@ * [*Precondition:] The `value_type` of the range is convertible to the argument type of `pred`. * [*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:] `ForwardRange` -* [*Returned Range Category:] `ForwardRange` +* [*Range Category:] __forward_range__ +* [*Returned Range Category:] The minimum of the range category of `rng` and __bidirectional_range__ [section:filtered_example filtered example] `` diff --git a/doc/reference/adaptors/indexed.qbk b/doc/reference/adaptors/indexed.qbk index 36dfd88..f6eb23e 100644 --- a/doc/reference/adaptors/indexed.qbk +++ b/doc/reference/adaptors/indexed.qbk @@ -7,7 +7,8 @@ ] * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng` [section:indexed_example indexed example] `` diff --git a/doc/reference/adaptors/indirected.qbk b/doc/reference/adaptors/indirected.qbk index f0cbd7a..44182fb 100644 --- a/doc/reference/adaptors/indirected.qbk +++ b/doc/reference/adaptors/indirected.qbk @@ -8,7 +8,8 @@ * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng` [section:indirected_example indirected example] `` diff --git a/doc/reference/adaptors/map_keys.qbk b/doc/reference/adaptors/map_keys.qbk index 7b29013..831d88f 100644 --- a/doc/reference/adaptors/map_keys.qbk +++ b/doc/reference/adaptors/map_keys.qbk @@ -8,7 +8,8 @@ * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng`. [section:map_keys_example map_keys example] `` diff --git a/doc/reference/adaptors/map_values.qbk b/doc/reference/adaptors/map_values.qbk index 28f75c8..a89b0e3 100644 --- a/doc/reference/adaptors/map_values.qbk +++ b/doc/reference/adaptors/map_values.qbk @@ -8,7 +8,8 @@ * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng`. [section:map_values_example map_values example] `` diff --git a/doc/reference/adaptors/replaced.qbk b/doc/reference/adaptors/replaced.qbk index 92a673b..3fe1cb8 100644 --- a/doc/reference/adaptors/replaced.qbk +++ b/doc/reference/adaptors/replaced.qbk @@ -10,7 +10,8 @@ * `new_value` is convertible to the `value_type` of the range. * `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:] `ForwardRange` +* [*Range Category:] __forward_range__ +* [*Returned Range Category:] The range category of `rng`. [section:replaced_example replaced example] `` diff --git a/doc/reference/adaptors/replaced_if.qbk b/doc/reference/adaptors/replaced_if.qbk index b7b7e57..0a67aae 100644 --- a/doc/reference/adaptors/replaced_if.qbk +++ b/doc/reference/adaptors/replaced_if.qbk @@ -10,7 +10,8 @@ * The range `value_type` is convertible to the argument type of `pred`. * `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:] `ForwardRange` +* [*Range Category:] __forward_range__ +* [*Returned Range Category:] The range category of `rng`. [section:replaced_if_example replaced_if example] `` diff --git a/doc/reference/adaptors/reversed.qbk b/doc/reference/adaptors/reversed.qbk index 4ad623b..56cf141 100644 --- a/doc/reference/adaptors/reversed.qbk +++ b/doc/reference/adaptors/reversed.qbk @@ -7,7 +7,8 @@ ] * [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`. -* [*Range Category:] `BidirectionalRange` +* [*Range Category:] __bidirectional_range__ +* [*Returned Range Category:] The range category of `rng`. [section:reversed_example reversed example] `` diff --git a/doc/reference/adaptors/sliced.qbk b/doc/reference/adaptors/sliced.qbk index e424ddc..275e4a8 100644 --- a/doc/reference/adaptors/sliced.qbk +++ b/doc/reference/adaptors/sliced.qbk @@ -8,7 +8,8 @@ * [*Precondition:] `0 <= n && n <= m && m < distance(rng)` * [*Returns:] `make_range(rng, n, m)` -* [*Range Category:] `RandomAccessRange` +* [*Range Category:] __random_access_range__ +* [*Returned Range Category:] __random_access_range__ [section:sliced_example sliced example] `` diff --git a/doc/reference/adaptors/strided.qbk b/doc/reference/adaptors/strided.qbk index cf2f09f..5b7ddf2 100644 --- a/doc/reference/adaptors/strided.qbk +++ b/doc/reference/adaptors/strided.qbk @@ -8,7 +8,8 @@ * [*Precondition:] `0 <= n && n < distance(rng)` * [*Returns:] A new range based on `rng` where traversal is performed in steps of `n`. -* [*Range Category:] `RandomAccessRange` +* [*Range Category:] __random_access_range__ +* [*Returned Range Category:] __random_access_range__ [section:strided_example strided example] `` diff --git a/doc/reference/adaptors/tokenized.qbk b/doc/reference/adaptors/tokenized.qbk index 7b7504c..2b3a656 100644 --- a/doc/reference/adaptors/tokenized.qbk +++ b/doc/reference/adaptors/tokenized.qbk @@ -35,7 +35,8 @@ * `flags` has the type `regex_constants::syntax_option_type`. * [*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:] `RandomAccessRange` +* [*Range Category:] __random_access_range__ +* [*Returned Range Category:] __random_access_range__ [endsect] diff --git a/doc/reference/adaptors/transformed.qbk b/doc/reference/adaptors/transformed.qbk index 3b64768..f5bacf9 100644 --- a/doc/reference/adaptors/transformed.qbk +++ b/doc/reference/adaptors/transformed.qbk @@ -9,7 +9,8 @@ * [*Precondition:] The `value_type` of the range is convertible to the argument type of `fun`. * [*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:] `SinglePassRange` +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng`. [section:transformed_example transformed example] `` diff --git a/doc/reference/adaptors/uniqued.qbk b/doc/reference/adaptors/uniqued.qbk index a90cdde..b7565a0 100644 --- a/doc/reference/adaptors/uniqued.qbk +++ b/doc/reference/adaptors/uniqued.qbk @@ -8,7 +8,8 @@ * [*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:] `ForwardRange` +* [*Range Category:] __forward_range__ +* [*Returned Range Category:] The minimum of the range concept of `rng` and __forward_range__. [section:uniqued_example uniqued example] `` diff --git a/doc/reference/algorithm/adjacent_find.qbk b/doc/reference/algorithm/adjacent_find.qbk index 32c881e..23c3cf8 100644 --- a/doc/reference/algorithm/adjacent_find.qbk +++ b/doc/reference/algorithm/adjacent_find.qbk @@ -1,4 +1,4 @@ -[section:adjacent_find Range Algorithm - adjacent_find] +[section:adjacent_find adjacent_find] [heading Prototype] diff --git a/doc/reference/algorithm/copy.qbk b/doc/reference/algorithm/copy.qbk index 70dd3a3..e959825 100644 --- a/doc/reference/algorithm/copy.qbk +++ b/doc/reference/algorithm/copy.qbk @@ -1,4 +1,4 @@ -[section:copy Range Algorithm - copy] +[section:copy copy] [heading Prototype] diff --git a/doc/reference/algorithm/copy_backward.qbk b/doc/reference/algorithm/copy_backward.qbk index f6aa444..f571aff 100644 --- a/doc/reference/algorithm/copy_backward.qbk +++ b/doc/reference/algorithm/copy_backward.qbk @@ -1,4 +1,4 @@ -[section:copy_backward Range Algorithm - copy_backward] +[section:copy_backward copy_backward] [heading Prototype] diff --git a/doc/reference/algorithm/count_if.qbk b/doc/reference/algorithm/count_if.qbk new file mode 100644 index 0000000..c2ee4bd --- /dev/null +++ b/doc/reference/algorithm/count_if.qbk @@ -0,0 +1,32 @@ +[section:count_if count_if] + +[heading Prototype] + +`` +template +typename range_difference::type +count_if(const SinglePassRange& rng, UnaryPredicate pred); +`` + +[heading Description] + +`count_if` returns the number of elements `x` in `rng` where `pred(x)` is `true`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/count_if.hpp` + +[heading Requirements] + +* `SinglePassRange` is a model of the __single_pass_range__ Concept. +* `UnaryPredicate` is a model of the `UnaryPredicateConcept`. +* `SinglePassRange`'s value type is a model of the `EqualityComparableConcept`. +* The value type of `SinglePassRange` is convertible to the argument type of `UnaryPredicate`. + +[heading Complexity] + +Linear. Exactly `distance(rng)` invocations of `pred`. + +[endsect] + + diff --git a/doc/reference/algorithm/fill.qbk b/doc/reference/algorithm/fill.qbk index 9e16492..a401046 100644 --- a/doc/reference/algorithm/fill.qbk +++ b/doc/reference/algorithm/fill.qbk @@ -1,4 +1,4 @@ -[section:fill Range Algorithm - fill] +[section:fill fill] [heading Prototype] diff --git a/doc/reference/algorithm/fill_n.qbk b/doc/reference/algorithm/fill_n.qbk index a17695c..0ca27af 100644 --- a/doc/reference/algorithm/fill_n.qbk +++ b/doc/reference/algorithm/fill_n.qbk @@ -1,4 +1,4 @@ -[section:fill_n Range Algorithm - fill_n] +[section:fill_n fill_n] [heading Prototype] diff --git a/doc/reference/algorithm/generate.qbk b/doc/reference/algorithm/generate.qbk index adc85af..0bbc345 100644 --- a/doc/reference/algorithm/generate.qbk +++ b/doc/reference/algorithm/generate.qbk @@ -1,4 +1,4 @@ -[section:generate Range Algorithm - generate] +[section:generate generate] [heading Prototype] diff --git a/doc/reference/algorithm/inplace_merge.qbk b/doc/reference/algorithm/inplace_merge.qbk index a393423..d4c2a9c 100644 --- a/doc/reference/algorithm/inplace_merge.qbk +++ b/doc/reference/algorithm/inplace_merge.qbk @@ -1,4 +1,4 @@ -[section:inplace_merge Range Algorithm - inplace_merge] +[section:inplace_merge inplace_merge] [heading Prototype] @@ -7,18 +7,18 @@ template BidirectionalRange& inplace_merge( BidirectionalRange& rng, typename range_iterator::type middle ); - + template const BidirectionalRange& inplace_merge( const BidirectionalRange& rng, typename range_iterator::type middle ); - + template BidirectionalRange& inplace_merge( BidirectionalRange& rng, typename range_iterator::type middle, BinaryPredicate pred ); - + template const BidirectionalRange& inplace_merge( const BidirectionalRange& rng, diff --git a/doc/reference/algorithm/merge.qbk b/doc/reference/algorithm/merge.qbk index edfed92..96d547c 100644 --- a/doc/reference/algorithm/merge.qbk +++ b/doc/reference/algorithm/merge.qbk @@ -1,4 +1,4 @@ -[section:merge Range Algorithm - merge] +[section:merge merge] [heading Prototype] diff --git a/doc/reference/algorithm/mismatch.qbk b/doc/reference/algorithm/mismatch.qbk index f470092..562fdb5 100644 --- a/doc/reference/algorithm/mismatch.qbk +++ b/doc/reference/algorithm/mismatch.qbk @@ -75,12 +75,10 @@ mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, [heading Description] -The versions of `mismatch` that return an iterator, return an iterator to the first position where `rng1` and `rng2` differ. +`mismatch` finds the first position where the correseponding elements from the two ranges `rng1` and `rng2` are not equal. Equality is determined by `operator==` for non-predicate versions of `mismatch`, and by satisfying `pred` in the predicate versions. -The versions of `mismatch` that return a `range_return`, defines `found` in the same manner as the returned iterator described above. - [heading Definition] Defined in the header file `boost/range/algorithm/mismatch.hpp` diff --git a/doc/reference/algorithm/nth_element.qbk b/doc/reference/algorithm/nth_element.qbk index 9b888b6..57c1d37 100644 --- a/doc/reference/algorithm/nth_element.qbk +++ b/doc/reference/algorithm/nth_element.qbk @@ -1,4 +1,4 @@ -[section:nth_element Range Algorithm - nth_element] +[section:nth_element nth_element] [heading Prototype] diff --git a/doc/reference/algorithm/partial_sort.qbk b/doc/reference/algorithm/partial_sort.qbk index 794415a..6548672 100644 --- a/doc/reference/algorithm/partial_sort.qbk +++ b/doc/reference/algorithm/partial_sort.qbk @@ -1,4 +1,4 @@ -[section:partial_sort Range Algorithm - partial_sort] +[section:partial_sort partial_sort] [heading Prototype] diff --git a/doc/reference/algorithm/partition.qbk b/doc/reference/algorithm/partition.qbk index cd17db7..272c0e3 100644 --- a/doc/reference/algorithm/partition.qbk +++ b/doc/reference/algorithm/partition.qbk @@ -1,4 +1,4 @@ -[section:partition Range Algorithm - partition] +[section:partition partition] [heading Prototype] diff --git a/doc/reference/algorithm/random_shuffle.qbk b/doc/reference/algorithm/random_shuffle.qbk index e2d10b7..8f94696 100644 --- a/doc/reference/algorithm/random_shuffle.qbk +++ b/doc/reference/algorithm/random_shuffle.qbk @@ -1,4 +1,4 @@ -[section:random_shuffle Range Algorithm - random_shuffle] +[section:random_shuffle random_shuffle] [heading Prototype] diff --git a/doc/reference/algorithm/remove.qbk b/doc/reference/algorithm/remove.qbk index 5c609aa..9e7380c 100644 --- a/doc/reference/algorithm/remove.qbk +++ b/doc/reference/algorithm/remove.qbk @@ -1,4 +1,4 @@ -[section:remove Range Algorithm - remove] +[section:remove remove] [heading Prototype] diff --git a/doc/reference/algorithm/remove_copy.qbk b/doc/reference/algorithm/remove_copy.qbk new file mode 100644 index 0000000..9236396 --- /dev/null +++ b/doc/reference/algorithm/remove_copy.qbk @@ -0,0 +1,34 @@ +[section:remove_copy remove_copy] + +[heading Prototype] + +`` +template +OutputIterator +remove_copy(ForwardRange& rng, OutputIterator out, const Value& val); + +template +OutputIterator +remove_copy(const ForwardRange& rng, OutputIterator out, const Value& val); +`` + +[heading Description] + +`remove_copy` copied all of the elements `x` from `rng` for which `x == val` is `false`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/remove_copy.hpp` + +[heading Requirements] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange` is mutable. +* `Value` is a model of the `EqualityComparableConcept`. +* Objects of type `Value` can be compared for equality with objects of `ForwardRange`'s value type. + +[heading Complexity] + +Linear. `remove_copy` performs exactly `distance(rng)` comparisons for equality. + +[endsect] diff --git a/doc/reference/algorithm/remove_copy_if.qbk b/doc/reference/algorithm/remove_copy_if.qbk new file mode 100644 index 0000000..b94dae2 --- /dev/null +++ b/doc/reference/algorithm/remove_copy_if.qbk @@ -0,0 +1,33 @@ +[section:remove_copy_if remove_copy_if] + +[heading Prototype] + +`` +template +OutputIterator +remove_copy_if(ForwardRange& rng, OutputIterator out, UnaryPred pred); + +template +OutputIterator +remove_copy_if(const ForwardRange& rng, OutputIterator out, UnaryPred pred); +`` + +[heading Description] + +`remove_copy_if` copied all of the elements `x` from `rng` for which `pred(x)` is `false`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/remove_copy_if.hpp` + +[heading Requirements] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange` is mutable. +* `UnaryPred` is a model of the `UnaryPredicateConcept`. + +[heading Complexity] + +Linear. `remove_copy_if` performs exactly `distance(rng)` comparisons with UnaryPred. + +[endsect] diff --git a/doc/reference/algorithm/remove_if.qbk b/doc/reference/algorithm/remove_if.qbk index 475e965..1250aba 100644 --- a/doc/reference/algorithm/remove_if.qbk +++ b/doc/reference/algorithm/remove_if.qbk @@ -1,4 +1,4 @@ -[section:remove_if Range Algorithm - remove_if] +[section:remove_if remove_if] [heading Prototype] diff --git a/doc/reference/algorithm/replace.qbk b/doc/reference/algorithm/replace.qbk index a173a56..6b33666 100644 --- a/doc/reference/algorithm/replace.qbk +++ b/doc/reference/algorithm/replace.qbk @@ -1,4 +1,4 @@ -[section:replace Range Algorithm - replace] +[section:replace replace] [heading Prototype] diff --git a/doc/reference/algorithm/replace_copy.qbk b/doc/reference/algorithm/replace_copy.qbk new file mode 100644 index 0000000..72478ea --- /dev/null +++ b/doc/reference/algorithm/replace_copy.qbk @@ -0,0 +1,33 @@ +[section:replace_copy replace_copy] + +[heading Prototype] + +`` +template +OutputIterator replace_copy(const ForwardRange& rng, OutputIterator out, + const Value& what, const Value& with_what); +`` + +[heading Description] + +`replace_copy` copy every element `x` in `rng` such that the corresponding element in the output range `y` is `x == what ? with_what : x`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/replace_copy.hpp` + +[heading Requirements] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange` is mutable. +* `Value` is convertible to `ForwardRange`'s value type. +* `Value` is a model of the `AssignableConcept`. +* `OutputIterator` is a model of the `OutputIteratorConcept`. + +[heading Complexity] + +Linear. `replace_copy` performs exactly `distance(rng)`. + +[endsect] + + diff --git a/doc/reference/algorithm/replace_copy_if.qbk b/doc/reference/algorithm/replace_copy_if.qbk new file mode 100644 index 0000000..19a1946 --- /dev/null +++ b/doc/reference/algorithm/replace_copy_if.qbk @@ -0,0 +1,34 @@ +[section:replace_copy_if replace_copy_if] + +[heading Prototype] + +`` +template +OutputIterator replace_copy_if(const ForwardRange& rng, OutputIterator out, + UnaryPredicate pred, const Value& with_what); +`` + +[heading Description] + +`replace_copy_if` copy every element `x` in `rng` such that the corresponding element in the output range `y` is `pred(x) ? with_what : x`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/replace_copy_if.hpp` + +[heading Requirements] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange` is mutable. +* `Value` is convertible to `ForwardRange`'s value type. +* `Value` is a model of the `AssignableConcept`. +* `OutputIterator` is a model of the `OutputIteratorConcept`. +* `UnaryPredicate` is a model of the `UnaryPredicateConcept`. + +[heading Complexity] + +Linear. `replace_copy_if` performs exactly `distance(rng)` evaluations of `pred`. + +[endsect] + + diff --git a/doc/reference/algorithm/replace_if.qbk b/doc/reference/algorithm/replace_if.qbk index 2546395..e12202e 100644 --- a/doc/reference/algorithm/replace_if.qbk +++ b/doc/reference/algorithm/replace_if.qbk @@ -1,4 +1,4 @@ -[section:replace_if Range Algorithm - replace_if] +[section:replace_if replace_if] [heading Prototype] diff --git a/doc/reference/algorithm/reverse.qbk b/doc/reference/algorithm/reverse.qbk index 7d678ef..d6bd00f 100644 --- a/doc/reference/algorithm/reverse.qbk +++ b/doc/reference/algorithm/reverse.qbk @@ -1,4 +1,4 @@ -[section:reverse Range Algorithm - reverse] +[section:reverse reverse] [heading Prototype] diff --git a/doc/reference/algorithm/reverse_copy.qbk b/doc/reference/algorithm/reverse_copy.qbk new file mode 100644 index 0000000..d7d087e --- /dev/null +++ b/doc/reference/algorithm/reverse_copy.qbk @@ -0,0 +1,31 @@ +[section:reverse_copy reverse_copy] + +[heading Prototype] + +`` +template +OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out); +`` + +[heading Description] + +`reverse_copy` copies the elements from `rng` in reverse order to `out`. +Returns the output iterator one passed the last copied element. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/reverse_copy.hpp` + +[heading Requirements] + +* `BidirectionalRange` is a model of the __bidirectional_range__ Concept. +* `BidirectionalRange` is mutable. +* `OutputIterator` is a model of the `OutputIteratorConcept`. + +[heading Complexity] + +Linear. `reverse_copy` makes `distance(rng)` copies. + +[endsect] + + diff --git a/doc/reference/algorithm/rotate.qbk b/doc/reference/algorithm/rotate.qbk index 9fa1b90..66b6f45 100644 --- a/doc/reference/algorithm/rotate.qbk +++ b/doc/reference/algorithm/rotate.qbk @@ -1,4 +1,4 @@ -[section:rotate Range Algorithm - rotate] +[section:rotate rotate] [heading Prototype] @@ -6,7 +6,7 @@ template ForwardRange& rotate(ForwardRange& rng, typename range_iterator::type middle); - + template const ForwardRange& rotate(const ForwardRange& rng, typename range_iterator::type middle); diff --git a/doc/reference/algorithm/rotate_copy.qbk b/doc/reference/algorithm/rotate_copy.qbk new file mode 100644 index 0000000..838524a --- /dev/null +++ b/doc/reference/algorithm/rotate_copy.qbk @@ -0,0 +1,38 @@ +[section:rotate_copy rotate_copy] + +[heading Prototype] + +`` +template +OutputIterator rotate_copy( + const ForwardRange& rng, + typename range_iterator::type middle, + OutputIterator out); +`` + +[heading Description] + +`rotate_copy` rotates the elements in a range. It copies the two ranges `[begin(rng), middle)` and `[middle, end(rng))` to `out`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/rotate_copy.hpp` + +[heading Requirements] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange` is mutable. +* `OutputIterator` is a model of the `OutputIteratorConcept`. + +[heading Precondition:] + +* `[begin(rng), middle)` is a valid range. +* `[middle, end(rng))` is a valid range. + +[heading Complexity] + +Linear. Exactly `distance(rng)` elements are copied. + +[endsect] + + diff --git a/doc/reference/algorithm/search_n.qbk b/doc/reference/algorithm/search_n.qbk new file mode 100644 index 0000000..3f3ef10 --- /dev/null +++ b/doc/reference/algorithm/search_n.qbk @@ -0,0 +1,58 @@ +[section:search_n search_n] + +[heading Prototype] + +`` +template +typename range_iterator::type +search_n(ForwardRange& rng, Integer n, const Value& value); + +template +typename range_iterator::type +search_n(const ForwardRange& rng, Integer n, const Value& value); + +template +typename range_iterator::type +search_n(ForwardRange& rng, Integer n, const Value& value, + BinaryPredicate binary_pred); + +template +typename range_iterator::type +search_n(const ForwardRange& rng, Integer n, const Value& value, + BinaryPredicate binary_pred); +`` + +[heading Description] + +`search_n` searches `rng` for a sequence of length `n` equal to `value` where +equality is determined by operator== in the non-predicate case, and by a +predicate when one is supplied. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/search_n.hpp` + +[heading Requirements] + +[*For the non-predicate versions:] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `ForwardRange`'s value type is a model of the `EqualityComparableConcept`. +* `ForwardRange`s value type can be compared for equality with `Value`. +* `Integer` is a model of the `IntegerConcept`. + +[*For the predicate versions:] + +* `ForwardRange` is a model of the __forward_range__ Concept. +* `BinaryPredicate` is a model of the `BinaryPredicateConcept`. +* `ForwardRange`'s value type is convertible to `BinaryPredicate`'s first argument type. +* `Value` is convertible to `BinaryPredicate`'s second argument type. +* `Integer` is a model of the `IntegerConcept`. + +[heading Complexity] + +Average complexity is Linear. Worst-case complexity is quadratic. + +[endsect] + + diff --git a/doc/reference/algorithm/sort.qbk b/doc/reference/algorithm/sort.qbk index 63fb8f8..16fcfc4 100644 --- a/doc/reference/algorithm/sort.qbk +++ b/doc/reference/algorithm/sort.qbk @@ -1,4 +1,4 @@ -[section:sort Range Algorithm - sort] +[section:sort sort] [heading Prototype] diff --git a/doc/reference/algorithm/stable_partition.qbk b/doc/reference/algorithm/stable_partition.qbk index b68aa11..8b20710 100644 --- a/doc/reference/algorithm/stable_partition.qbk +++ b/doc/reference/algorithm/stable_partition.qbk @@ -1,4 +1,4 @@ -[section:stable_partition Range Algorithm - stable_partition] +[section:stable_partition stable_partition] [heading Prototype] diff --git a/doc/reference/algorithm/stable_sort.qbk b/doc/reference/algorithm/stable_sort.qbk index 11431b5..bb6b64a 100644 --- a/doc/reference/algorithm/stable_sort.qbk +++ b/doc/reference/algorithm/stable_sort.qbk @@ -1,4 +1,4 @@ -[section:stable_sort Range Algorithm - stable_sort] +[section:stable_sort stable_sort] [heading Prototype] diff --git a/doc/reference/algorithm/swap_ranges.qbk b/doc/reference/algorithm/swap_ranges.qbk new file mode 100644 index 0000000..f761ec4 --- /dev/null +++ b/doc/reference/algorithm/swap_ranges.qbk @@ -0,0 +1,32 @@ +[section:swap_ranges swap_ranges] + +[heading Prototype] + +`` +template +SinglePassRange2& swap_ranges(SinglePassRange1& rng1, SinglePassRange& rng2); +`` + +[heading Description] + +`swap_ranges` swaps each element `x` in `rng1` with the corresponding element `y` in `rng2`. +Returns a reference to `rng2`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/swap_ranges.hpp` + +[heading Requirements] + +* `SinglePassRange1` is a model of the __single_pass_range__ Concept. +* `SinglePassRange1` is mutable. +* `SinglePassRange2` is a model of the __single_pass_range__ Concept. +* `SinglePassRange2` is mutable. + +[heading Complexity] + +Linear. Exactly `distance(rng1)` elements are swapped. + +[endsect] + + diff --git a/doc/reference/algorithm/transform.qbk b/doc/reference/algorithm/transform.qbk index 0a9c68c..49df721 100644 --- a/doc/reference/algorithm/transform.qbk +++ b/doc/reference/algorithm/transform.qbk @@ -1,4 +1,4 @@ -[section:transform Range Algorithm - transform] +[section:transform transform] [heading Prototype] @@ -11,7 +11,7 @@ template< OutputIterator transform(const SinglePassRange1& rng, OutputIterator out, UnaryOperation fun); - + template< class SinglePassRange1, class SinglePassRange2, diff --git a/doc/reference/algorithm/unique.qbk b/doc/reference/algorithm/unique.qbk index b5d55b4..56a2283 100644 --- a/doc/reference/algorithm/unique.qbk +++ b/doc/reference/algorithm/unique.qbk @@ -1,4 +1,4 @@ -[section:unique Range Algorithm - unique] +[section:unique unique] [heading Prototype] diff --git a/doc/reference/algorithm/unique_copy.qbk b/doc/reference/algorithm/unique_copy.qbk new file mode 100644 index 0000000..1c311b6 --- /dev/null +++ b/doc/reference/algorithm/unique_copy.qbk @@ -0,0 +1,44 @@ +[section:unique_copy unique_copy] + +[heading Prototype] + +`` +template +OutputIterator unique_copy(const SinglePassRange& rng, OutputIterator out); + +template +OutputIterator unique_copy(const SinglePassRange& rng, OutputIterator out, BinaryPredicate pred); +`` + +[heading Description] + +`unique_copy` copies the first element of each sequence of duplicates encountered in `rng` to `out`. + +Equality is determined by the predicate if one is supplied, or by `operator==()` for `SinglePassRange`'s value type. + +[heading Definition] + +Defined in the header file `boost/range/algorithm/unique_copy.hpp` + +[heading Requirements] + +[*For the non-predicate versions of unique:] + +* `SinglePassRange` is a model of the __single_pass_range__ Concept. +* `SinglePassRange` is mutable. +* `SinglePassRange`'s value type is a model of the `EqualityComparableConcept`. +* `OutputIterator` is a model of the `OutputIteratorConcept`. + +[*For the predicate versions of unique:] + +* `SinglePassRange` is a model of the __single_pass_range__ Concept. +* `SinglePassRange` is mutable. +* `BinaryPredicate` is a model of the `BinaryPredicateConcept`. +* `SinglePassRange`'s value type is convertible to `BinaryPredicate`'s first argument type and to `BinaryPredicate`'s second argument type. +* `OutputIterator` is a model of the `OutputIteratorConcept`. + +[heading Complexity] + +Linear. `O(N)` where `N` is `distance(rng)`. Exactly `distance(rng)` comparisons are performed. + +[endsect] diff --git a/doc/reference/algorithm_ext/copy_n.qbk b/doc/reference/algorithm_ext/copy_n.qbk new file mode 100644 index 0000000..8d0481f --- /dev/null +++ b/doc/reference/algorithm_ext/copy_n.qbk @@ -0,0 +1,32 @@ +[section:copy_n copy_n] + +[heading Prototype] + +`` +template +OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out); +`` + +[heading Description] + +`copy_n` is provided to completely replicate the standard algorithm header, +it is preferable to use Range Adaptors and the extension functions to achieve +the same result with greater safety. + +`copy_n` copies elements from `[boost::begin(rng), boost::begin(rng) + n)` to the range `[out, out + n)` + +[heading Definition] + +Defined in the header file `boost/range/algorithm_ext/copy_n.hpp` + +[heading Requirements] + +# `SinglePassRange` is a model of the __single_pass_range__ Concept. +# `Size` is a model of the `Integer` Concept. +# `OutputIterator` is a model of the `OutputIteratorConcept`. + +[heading Complexity] + +Linear. Exactly `n` elements are copied. + +[endsect] diff --git a/doc/reference/algorithm_ext/is_sorted.qbk b/doc/reference/algorithm_ext/is_sorted.qbk new file mode 100644 index 0000000..9edc08d --- /dev/null +++ b/doc/reference/algorithm_ext/is_sorted.qbk @@ -0,0 +1,35 @@ +[section:is_sorted is_sorted] + +[heading Prototype] + +`` +template +bool is_sorted(const SinglePassRange& rng); + +template +bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred); +`` + +[heading Description] + +`is_sorted` determines if a range is sorted. +For the non-predicate version the return value is `true` if and only if for +each adjacent elements `[x,y]` the expression `x < y` is `true`. +For the predicate version the return value is `true` is and only if for each +adjacent elements `[x,y]` the expression `pred(x,y)` is `true`. + +[heading Definition] + +Defined in the header file `boost/range/algorithm_ext/is_sorted.hpp` + +[heading Requirements] + +# `SinglePassRange` is a model of the __single_pass_range__ Concept. +# `BinaryPredicate` is a model of the `BinaryPredicate` Concept. +# The value type of `SinglePassRange` is convertible to both argument types of `BinaryPredicate`. + +[heading Complexity] + +Linear. A maximum of `distance(rng)` comparisons are performed. + +[endsect] diff --git a/doc/reference/algorithms.qbk b/doc/reference/algorithms.qbk index dca35d4..e5c16f7 100644 --- a/doc/reference/algorithms.qbk +++ b/doc/reference/algorithms.qbk @@ -74,11 +74,11 @@ The same task may be accomplished simply with `` boost::erase(vec, boost::unique(vec)); `` -and there is no need to worry about generating an invalid range. Furthermore, if the container is complex, calling `vec.begin()` several times will be more expensive than using a range algorithm. +and there is no need to worry about generating an invalid range. Furthermore, if the container is complex, calling `vec.end()` several times will be more expensive than using a range algorithm. [endsect] -[section:range_algorithm_mutating_algorithms Mutating algorithms] +[section:mutating Mutating algorithms] [include algorithm/copy.qbk] [include algorithm/copy_backward.qbk] [include algorithm/fill.qbk] @@ -91,21 +91,31 @@ and there is no need to worry about generating an invalid range. Furthermore, if [include algorithm/partition.qbk] [include algorithm/random_shuffle.qbk] [include algorithm/remove.qbk] +[include algorithm/remove_copy.qbk] +[include algorithm/remove_copy_if.qbk] [include algorithm/remove_if.qbk] [include algorithm/replace.qbk] +[include algorithm/replace_copy.qbk] +[include algorithm/replace_copy_if.qbk] [include algorithm/replace_if.qbk] +[include algorithm/reverse.qbk] +[include algorithm/reverse_copy.qbk] [include algorithm/rotate.qbk] +[include algorithm/rotate_copy.qbk] [include algorithm/sort.qbk] [include algorithm/stable_partition.qbk] [include algorithm/stable_sort.qbk] +[include algorithm/swap_ranges.qbk] [include algorithm/transform.qbk] [include algorithm/unique.qbk] +[include algorithm/unique_copy.qbk] [endsect] -[section:range_algorithm_non_mutating_algorithms Non-mutating algorithms] +[section:non_mutating Non-mutating algorithms] [include algorithm/adjacent_find.qbk] [include algorithm/binary_search.qbk] [include algorithm/count.qbk] +[include algorithm/count_if.qbk] [include algorithm/equal.qbk] [include algorithm/equal_range.qbk] [include algorithm/for_each.qbk] @@ -119,10 +129,11 @@ and there is no need to worry about generating an invalid range. Furthermore, if [include algorithm/min_element.qbk] [include algorithm/mismatch.qbk] [include algorithm/search.qbk] +[include algorithm/search_n.qbk] [include algorithm/upper_bound.qbk] [endsect] -[section:set_algorithms Set algorithms] +[section:set Set algorithms] [include algorithm/includes.qbk] [include algorithm/set_union.qbk] [include algorithm/set_intersection.qbk] @@ -130,23 +141,25 @@ and there is no need to worry about generating an invalid range. Furthermore, if [include algorithm/set_symmetric_difference.qbk] [endsect] -[section:heap_algorithms Heap algorithms] +[section:heap Heap algorithms] [include algorithm/push_heap.qbk] [include algorithm/pop_heap.qbk] [include algorithm/make_heap.qbk] [include algorithm/sort_heap.qbk] [endsect] -[section:permutation_algorithms Permutation algorithms] +[section:permutation Permutation algorithms] [include algorithm/next_permutation.qbk] [include algorithm/prev_permutation.qbk] [endsect] -[section:range_algorithm_new_algorithms New algorithms] +[section:new New algorithms] +[include algorithm_ext/copy_n.qbk] [include algorithm_ext/erase.qbk] [include algorithm_ext/for_each.qbk] [include algorithm_ext/insert.qbk] [include algorithm_ext/iota.qbk] +[include algorithm_ext/is_sorted.qbk] [include algorithm_ext/overwrite.qbk] [include algorithm_ext/push_back.qbk] [include algorithm_ext/push_front.qbk] @@ -154,7 +167,7 @@ and there is no need to worry about generating an invalid range. Furthermore, if [include algorithm_ext/remove_erase_if.qbk] [endsect] -[section:range_numeric Numeric algorithms] +[section:numeric Numeric algorithms] [include numeric/accumulate.qbk] [include numeric/adjacent_difference.qbk] [include numeric/inner_product.qbk] diff --git a/doc/reference/ranges/irange.qbk b/doc/reference/ranges/irange.qbk index bd9efc4..a689ec0 100644 --- a/doc/reference/ranges/irange.qbk +++ b/doc/reference/ranges/irange.qbk @@ -4,17 +4,17 @@ `` template -integer_range< range_detail::integer_iterator > +iterator_range< range_detail::integer_iterator > irange(Integer first, Integer last); template -integer_range< range_detail::integer_iterator_with_step > +iterator_range< range_detail::integer_iterator_with_step > irange(Integer first, Integer last, StepSize step_size); `` [heading Description] -`irange` is a function to generate an Integer Range. +`irange` is a function to generate an Integer Range. `irange` allows treating integers as a model of the __random_access_range__ Concept. It should be noted that the `first` and `last` parameters denoted a half-open range. diff --git a/doc/utilities.qbk b/doc/reference/utilities.qbk similarity index 100% rename from doc/utilities.qbk rename to doc/reference/utilities.qbk