Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60897 - in trunk: boost/range boost/range/adaptor boost/range/algorithm boost/range/algorithm_ext boost/range/detail libs/range libs/range/doc libs/range/doc/html libs/range/doc/html/range libs/range/doc/html/range/concepts libs/range/doc/html/range/mfc_atl libs/range/doc/html/range/reference libs/range/doc/html/range/reference/adaptors libs/range/doc/html/range/reference/adaptors/adaptors_reference libs/range/doc/html/range/reference/algorithms libs/range/doc/html/range/reference/algorithms/heap_algorithms libs/range/doc/html/range/reference/algorithms/permutation_algorithms libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms libs/range/doc/html/range/reference/algorithms/range_numeric libs/range/doc/html/range/reference/algorithms/set_algorithms libs/range/doc/html/range/reference/extending libs/range/doc/html/range/reference/extending/method_3 libs/range/doc/html/range/reference/range_algorithm libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms libs/range/doc/html/range/reference/ranges libs/range/doc/html/range/reference/ranges/reference libs/range/doc/html/range/reference/semantics libs/range/doc/html/range/upgrade libs/range/doc/html/range/utilities libs/range/doc/reference libs/range/doc/reference/adaptors libs/range/doc/reference/adaptors/examples libs/range/doc/reference/algorithm libs/range/doc/reference/algorithm_ext libs/range/doc/reference/numeric libs/range/doc/reference/ranges libs/range/test libs/range/test/adaptor_test libs/range/test/algorithm_test libs/range/test/test_driver libs/range/test/test_function
From: neil_at_[hidden]
Date: 2010-03-28 12:09:27


Author: neilgroves
Date: 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
New Revision: 60897
URL: http://svn.boost.org/trac/boost/changeset/60897

Log:
Boost.RangeEx merged into Boost.Range
Added:
   trunk/boost/range/adaptor/
   trunk/boost/range/adaptor/adjacent_filtered.hpp (contents, props changed)
   trunk/boost/range/adaptor/argument_fwd.hpp (contents, props changed)
   trunk/boost/range/adaptor/copied.hpp (contents, props changed)
   trunk/boost/range/adaptor/define_adaptor.hpp (contents, props changed)
   trunk/boost/range/adaptor/filtered.hpp (contents, props changed)
   trunk/boost/range/adaptor/indexed.hpp (contents, props changed)
   trunk/boost/range/adaptor/indirected.hpp (contents, props changed)
   trunk/boost/range/adaptor/map.hpp (contents, props changed)
   trunk/boost/range/adaptor/replaced.hpp (contents, props changed)
   trunk/boost/range/adaptor/replaced_if.hpp (contents, props changed)
   trunk/boost/range/adaptor/reversed.hpp (contents, props changed)
   trunk/boost/range/adaptor/sliced.hpp (contents, props changed)
   trunk/boost/range/adaptor/strided.hpp (contents, props changed)
   trunk/boost/range/adaptor/tokenized.hpp (contents, props changed)
   trunk/boost/range/adaptor/transformed.hpp (contents, props changed)
   trunk/boost/range/adaptor/uniqued.hpp (contents, props changed)
   trunk/boost/range/adaptors.hpp (contents, props changed)
   trunk/boost/range/algorithm/
   trunk/boost/range/algorithm.hpp (contents, props changed)
   trunk/boost/range/algorithm/adjacent_find.hpp (contents, props changed)
   trunk/boost/range/algorithm/binary_search.hpp (contents, props changed)
   trunk/boost/range/algorithm/copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/copy_backward.hpp (contents, props changed)
   trunk/boost/range/algorithm/count.hpp (contents, props changed)
   trunk/boost/range/algorithm/count_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/equal.hpp (contents, props changed)
   trunk/boost/range/algorithm/equal_range.hpp (contents, props changed)
   trunk/boost/range/algorithm/fill.hpp (contents, props changed)
   trunk/boost/range/algorithm/fill_n.hpp (contents, props changed)
   trunk/boost/range/algorithm/find.hpp (contents, props changed)
   trunk/boost/range/algorithm/find_end.hpp (contents, props changed)
   trunk/boost/range/algorithm/find_first_of.hpp (contents, props changed)
   trunk/boost/range/algorithm/find_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/for_each.hpp (contents, props changed)
   trunk/boost/range/algorithm/generate.hpp (contents, props changed)
   trunk/boost/range/algorithm/heap_algorithm.hpp (contents, props changed)
   trunk/boost/range/algorithm/inplace_merge.hpp (contents, props changed)
   trunk/boost/range/algorithm/lexicographical_compare.hpp (contents, props changed)
   trunk/boost/range/algorithm/lower_bound.hpp (contents, props changed)
   trunk/boost/range/algorithm/max_element.hpp (contents, props changed)
   trunk/boost/range/algorithm/merge.hpp (contents, props changed)
   trunk/boost/range/algorithm/min_element.hpp (contents, props changed)
   trunk/boost/range/algorithm/mismatch.hpp (contents, props changed)
   trunk/boost/range/algorithm/nth_element.hpp (contents, props changed)
   trunk/boost/range/algorithm/partial_sort.hpp (contents, props changed)
   trunk/boost/range/algorithm/partial_sort_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/partition.hpp (contents, props changed)
   trunk/boost/range/algorithm/permutation.hpp (contents, props changed)
   trunk/boost/range/algorithm/random_shuffle.hpp (contents, props changed)
   trunk/boost/range/algorithm/remove.hpp (contents, props changed)
   trunk/boost/range/algorithm/remove_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/remove_copy_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/remove_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/replace.hpp (contents, props changed)
   trunk/boost/range/algorithm/replace_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/replace_copy_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/replace_if.hpp (contents, props changed)
   trunk/boost/range/algorithm/reverse.hpp (contents, props changed)
   trunk/boost/range/algorithm/reverse_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/rotate.hpp (contents, props changed)
   trunk/boost/range/algorithm/rotate_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/search.hpp (contents, props changed)
   trunk/boost/range/algorithm/search_n.hpp (contents, props changed)
   trunk/boost/range/algorithm/set_algorithm.hpp (contents, props changed)
   trunk/boost/range/algorithm/sort.hpp (contents, props changed)
   trunk/boost/range/algorithm/stable_partition.hpp (contents, props changed)
   trunk/boost/range/algorithm/stable_sort.hpp (contents, props changed)
   trunk/boost/range/algorithm/swap_ranges.hpp (contents, props changed)
   trunk/boost/range/algorithm/transform.hpp (contents, props changed)
   trunk/boost/range/algorithm/unique.hpp (contents, props changed)
   trunk/boost/range/algorithm/unique_copy.hpp (contents, props changed)
   trunk/boost/range/algorithm/upper_bound.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/
   trunk/boost/range/algorithm_ext.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/copy_n.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/erase.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/for_each.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/insert.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/is_sorted.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/overwrite.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/push_back.hpp (contents, props changed)
   trunk/boost/range/algorithm_ext/push_front.hpp (contents, props changed)
   trunk/boost/range/combine.hpp (contents, props changed)
   trunk/boost/range/counting_range.hpp (contents, props changed)
   trunk/boost/range/detail/demote_iterator_traversal_tag.hpp (contents, props changed)
   trunk/boost/range/detail/extract_optional_type.hpp (contents, props changed)
   trunk/boost/range/detail/join_iterator.hpp (contents, props changed)
   trunk/boost/range/detail/misc_concept.hpp (contents, props changed)
   trunk/boost/range/detail/range_return.hpp (contents, props changed)
   trunk/boost/range/irange.hpp (contents, props changed)
   trunk/boost/range/istream_range.hpp (contents, props changed)
   trunk/boost/range/iterator_range_core.hpp (contents, props changed)
   trunk/boost/range/iterator_range_io.hpp (contents, props changed)
   trunk/boost/range/join.hpp (contents, props changed)
   trunk/boost/range/numeric.hpp (contents, props changed)
   trunk/boost/range/unbounded_range.hpp (contents, props changed)
   trunk/libs/range/doc/concepts.qbk (contents, props changed)
   trunk/libs/range/doc/counting_range.html (contents, props changed)
   trunk/libs/range/doc/examples.qbk (contents, props changed)
   trunk/libs/range/doc/faq.qbk (contents, props changed)
   trunk/libs/range/doc/headers.qbk (contents, props changed)
   trunk/libs/range/doc/history_ack.qbk (contents, props changed)
   trunk/libs/range/doc/html/
   trunk/libs/range/doc/html/index.html (contents, props changed)
   trunk/libs/range/doc/html/quickbook_HTML.manifest (contents, props changed)
   trunk/libs/range/doc/html/range/
   trunk/libs/range/doc/html/range/concepts/
   trunk/libs/range/doc/html/range/concepts.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/bidirectional_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/concept_checking.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/forward_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/overview.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/random_access_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/concepts/single_pass_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/examples.html (contents, props changed)
   trunk/libs/range/doc/html/range/faq.html (contents, props changed)
   trunk/libs/range/doc/html/range/history_ack.html (contents, props changed)
   trunk/libs/range/doc/html/range/introduction.html (contents, props changed)
   trunk/libs/range/doc/html/range/library_headers.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/
   trunk/libs/range/doc/html/range/mfc_atl.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/references.html (contents, props changed)
   trunk/libs/range/doc/html/range/mfc_atl/requirements.html (contents, props changed)
   trunk/libs/range/doc/html/range/portability.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/
   trunk/libs/range/doc/html/range/reference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/
   trunk/libs/range/doc/html/range/reference/adaptors.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_general_requirements.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_introduction.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/copied.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/filtered.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indexed.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indirected.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_keys.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_values.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/reversed.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/sliced.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/strided.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/tokenized.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/transformed.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/uniqued.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/adaptors/adaptors_synopsis.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/make_heap.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/push_heap.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_introduction.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/accumulate.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/inner_product.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/irange.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/partial_sum.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/includes.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_difference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_intersection.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_union.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/
   trunk/libs/range/doc/html/range/reference/extending.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/method_1.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/method_2.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/method_3/
   trunk/libs/range/doc/html/range/reference/extending/method_3.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/overview.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/
   trunk/libs/range/doc/html/range/reference/range_algorithm.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_introduction.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy_backward.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_new_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_non_mutating_algorithms.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/
   trunk/libs/range/doc/html/range/reference/ranges.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/counting_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/introduction.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/irange.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/istream_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/reference/
   trunk/libs/range/doc/html/range/reference/ranges/reference.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/reference/counting_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/reference/irange.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/ranges/reference/istream_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/semantics/
   trunk/libs/range/doc/html/range/reference/semantics.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/semantics/functions.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/semantics/metafunctions.html (contents, props changed)
   trunk/libs/range/doc/html/range/reference/synopsis.html (contents, props changed)
   trunk/libs/range/doc/html/range/style_guide.html (contents, props changed)
   trunk/libs/range/doc/html/range/upgrade/
   trunk/libs/range/doc/html/range/upgrade.html (contents, props changed)
   trunk/libs/range/doc/html/range/upgrade/upgrade_1_34_to_1_35.html (contents, props changed)
   trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_34.html (contents, props changed)
   trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_42.html (contents, props changed)
   trunk/libs/range/doc/html/range/utilities/
   trunk/libs/range/doc/html/range/utilities.html (contents, props changed)
   trunk/libs/range/doc/html/range/utilities/iterator_range.html (contents, props changed)
   trunk/libs/range/doc/html/range/utilities/join.html (contents, props changed)
   trunk/libs/range/doc/html/range/utilities/sub_range.html (contents, props changed)
   trunk/libs/range/doc/html/standalone_HTML.manifest (contents, props changed)
   trunk/libs/range/doc/introduction.qbk (contents, props changed)
   trunk/libs/range/doc/istream_range.html (contents, props changed)
   trunk/libs/range/doc/mfc_atl.qbk (contents, props changed)
   trunk/libs/range/doc/portability.qbk (contents, props changed)
   trunk/libs/range/doc/reference/
   trunk/libs/range/doc/reference.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/
   trunk/libs/range/doc/reference/adaptors.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/adjacent_filtered.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/adjacent_filtered.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/copied.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/copied.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/
   trunk/libs/range/doc/reference/adaptors/examples/adjacent_filtered.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/copied.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/filtered.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/indexed.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/indirected.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/map_keys.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/map_values.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/replaced.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/replaced_if.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/reversed.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/sliced.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/strided.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/tokenized.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/transformed.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/examples/uniqued.cpp (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/filtered.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/filtered.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/indexed.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/indexed.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/indirected.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/indirected.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/map_keys.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/map_keys.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/map_values.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/map_values.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/replaced.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/replaced.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/replaced_if.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/replaced_if.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/reversed.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/reversed.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/sliced.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/sliced.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/strided.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/strided.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/tokenized.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/tokenized.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/transformed.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/transformed.qbk (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/uniqued.html (contents, props changed)
   trunk/libs/range/doc/reference/adaptors/uniqued.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/
   trunk/libs/range/doc/reference/algorithm/adjacent_find.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/binary_search.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/copy.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/copy_backward.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/count.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/equal.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/equal_range.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/fill.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/find.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/find_end.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/find_first_of.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/find_if.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/for_each.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/generate.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/includes.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/inplace_merge.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/lexicographical_compare.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/lower_bound.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/make_heap.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/max_element.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/merge.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/min_element.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/mismatch.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/next_permutation.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/nth_element.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/partial_sort.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/partition.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/pop_heap.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/prev_permutation.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/push_heap.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/random_shuffle.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/remove.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/remove_if.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/replace.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/replace_if.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/reverse.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/rotate.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/search.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/set_difference.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/set_intersection.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/set_symmetric_difference.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/set_union.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/sort.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/sort_heap.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/stable_partition.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/stable_sort.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/transform.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/unique.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm/upper_bound.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/
   trunk/libs/range/doc/reference/algorithm_ext/erase.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/for_each.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/insert.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/overwrite.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/push_back.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/push_front.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/remove_erase.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithm_ext/remove_erase_if.qbk (contents, props changed)
   trunk/libs/range/doc/reference/algorithms.qbk (contents, props changed)
   trunk/libs/range/doc/reference/extending.qbk (contents, props changed)
   trunk/libs/range/doc/reference/numeric/
   trunk/libs/range/doc/reference/numeric/accumulate.qbk (contents, props changed)
   trunk/libs/range/doc/reference/numeric/adjacent_difference.qbk (contents, props changed)
   trunk/libs/range/doc/reference/numeric/inner_product.qbk (contents, props changed)
   trunk/libs/range/doc/reference/numeric/partial_sum.qbk (contents, props changed)
   trunk/libs/range/doc/reference/overview.qbk (contents, props changed)
   trunk/libs/range/doc/reference/ranges/
   trunk/libs/range/doc/reference/ranges.qbk (contents, props changed)
   trunk/libs/range/doc/reference/ranges/counting_range.qbk (contents, props changed)
   trunk/libs/range/doc/reference/ranges/irange.qbk (contents, props changed)
   trunk/libs/range/doc/reference/ranges/istream_range.qbk (contents, props changed)
   trunk/libs/range/doc/reference/semantics.qbk (contents, props changed)
   trunk/libs/range/doc/reference/synopsis.qbk (contents, props changed)
   trunk/libs/range/doc/style.qbk (contents, props changed)
   trunk/libs/range/doc/upgrade.qbk (contents, props changed)
   trunk/libs/range/doc/utilities.qbk (contents, props changed)
   trunk/libs/range/test/adaptor_test/
   trunk/libs/range/test/adaptor_test/adjacent_filtered.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/adjacent_filtered_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/copied.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/copied_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/filtered.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/filtered_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/indexed.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/indexed_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/indirected.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/indirected_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/map.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/map_keys_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/map_values_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/replaced.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/replaced_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/replaced_if.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/replaced_if_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/reversed.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/reversed_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/sliced.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/sliced_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/strided.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/strided_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/tokenized.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/transformed.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/transformed_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/uniqued.cpp (contents, props changed)
   trunk/libs/range/test/adaptor_test/uniqued_example.cpp (contents, props changed)
   trunk/libs/range/test/adaptors.cpp (contents, props changed)
   trunk/libs/range/test/algorithm.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/
   trunk/libs/range/test/algorithm_test/adjacent_find.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/binary_search.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/copy.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/copy_backward.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/count.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/count_if.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/equal.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/equal_range.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/fill.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/find.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/find_end.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/find_first_of.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/find_if.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/for_each.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/generate.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/heap.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/includes.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/inplace_merge.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/lexicographical_compare.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/lower_bound.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/max_element.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/merge.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/min_element.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/mismatch.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/next_permutation.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/nth_element.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/partial_sort.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/partition.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/prev_permutation.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/random_shuffle.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/remove.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/remove_if.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/replace.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/replace_if.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/reverse.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/rotate.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/search.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/set_difference.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/set_intersection.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/set_symmetric_difference.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/set_union.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/sort.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/stable_partition.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/stable_sort.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/transform.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/unique.cpp (contents, props changed)
   trunk/libs/range/test/algorithm_test/upper_bound.cpp (contents, props changed)
   trunk/libs/range/test/combine.cpp (contents, props changed)
   trunk/libs/range/test/counting_range.cpp (contents, props changed)
   trunk/libs/range/test/irange.cpp (contents, props changed)
   trunk/libs/range/test/join.cpp (contents, props changed)
   trunk/libs/range/test/test_driver/
   trunk/libs/range/test/test_driver/range_return_test_driver.hpp (contents, props changed)
   trunk/libs/range/test/test_function/
   trunk/libs/range/test/test_function/check_equal_fn.hpp (contents, props changed)
   trunk/libs/range/test/test_function/counted_function.hpp (contents, props changed)
   trunk/libs/range/test/test_function/equal_to_x.hpp (contents, props changed)
   trunk/libs/range/test/test_function/false_predicate.hpp (contents, props changed)
   trunk/libs/range/test/test_function/greater_than_x.hpp (contents, props changed)
   trunk/libs/range/test/test_function/multiply_by_x.hpp (contents, props changed)
Text files modified:
   trunk/boost/range/concepts.hpp | 265 ++++++--
   trunk/boost/range/const_iterator.hpp | 11
   trunk/boost/range/iterator_range.hpp | 659 --------------------
   trunk/boost/range/mutable_iterator.hpp | 11
   trunk/boost/range/sub_range.hpp | 6
   trunk/libs/range/doc/Jamfile.v2 | 29
   trunk/libs/range/doc/boost_range.qbk | 1276 ++-------------------------------------
   trunk/libs/range/index.html | 83 --
   trunk/libs/range/test/Jamfile.v2 | 125 +++
   trunk/libs/range/test/adl_conformance.cpp | 67 +-
   trunk/libs/range/test/compat2.cpp | 2
   11 files changed, 469 insertions(+), 2065 deletions(-)

Added: trunk/boost/range/adaptor/adjacent_filtered.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/adjacent_filtered.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,255 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_ADJACENT_FILTER_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_ADJACENT_FILTER_IMPL_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+#pragma warning( push )
+#pragma warning( disable : 4355 )
+#endif
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/next_prior.hpp>
+
+
+namespace boost
+{
+
+ namespace range_detail
+ {
+ template< class Iter, class R >
+ class skip_iterator
+ : public boost::iterator_adaptor< skip_iterator<Iter,R>, Iter >
+ {
+ private:
+ typedef boost::iterator_adaptor< skip_iterator<Iter,R>, Iter >
+ base_t;
+
+ R* range;
+
+ public:
+ typedef Iter wrapped_iter_t;
+
+ //
+ // The iterators are bound to the lifetime of the
+ // range and may not exist on their own. Hence it makes no
+ // sense to e.g. wrap them in reverse_iterators
+ // (that can OTOH be done in advance).
+ //
+ typedef std::input_iterator_tag iterator_category;
+
+ explicit skip_iterator( R* r, Iter i )
+ : base_t(i), range(r) {}
+
+ template< class OtherIter, class R2>
+ skip_iterator( const skip_iterator<OtherIter,R2>& other )
+ : base_t( other.base() ) {}
+
+ R* get_range() const { return range; }
+
+ private:
+ friend class boost::iterator_core_access;
+
+ void increment()
+ {
+ BOOST_ASSERT( range != 0 );
+ range->increment_impl( this->base_reference() );
+ }
+
+ //
+ // Not needed ... just apply a reverse_iterator
+ //
+ void decrement()
+ {
+ BOOST_ASSERT( false && "you can't decrement an adjacent_filter_iterator" );
+ }
+
+ template< class D >
+ void advance( D n )
+ {
+ BOOST_ASSERT( false );
+ }
+
+ };
+
+ template< class P, class R >
+ struct adjacent_filter_range
+ : iterator_range< skip_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type,
+ adjacent_filter_range<P,R>
+ >
+ >
+ {
+ private:
+ typedef skip_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type,
+ adjacent_filter_range<P,R>
+ >
+ skip_iter;
+ typedef iterator_range<skip_iter>
+ base_range;
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<R>::type raw_iterator;
+
+ P bi_pred;
+
+ // Get the first element in the half-open range that
+ // passes the filter predicate.
+ // The adjacent_filter_range must only contain values that pass
+ // through the filter.
+ static raw_iterator to_valid(raw_iterator it, raw_iterator last, const P& bi_pred, bool default_pass)
+ {
+ if (it != last)
+ {
+ if (default_pass)
+ {
+ raw_iterator nxt = next(it);
+ while (nxt != last && !bi_pred(*it, *nxt))
+ {
+ ++it;
+ ++nxt;
+ }
+ }
+ else
+ {
+ raw_iterator nxt = next(it);
+ for(; nxt != last; ++it, ++nxt)
+ {
+ if (bi_pred(*it, *nxt))
+ {
+ break;
+ }
+ }
+ if (nxt == last)
+ {
+ it = last;
+ }
+ }
+ }
+ return it;
+ }
+
+ public:
+ adjacent_filter_range( const P& p, R& r, bool default_pass )
+ : base_range( skip_iter( this, to_valid(boost::begin(r), boost::end(r), p, default_pass)),
+ skip_iter( this, boost::end(r) ) ),
+ bi_pred( p ),
+ _default_pass(default_pass)
+ {
+ }
+
+ void increment_impl( raw_iterator& current )
+ {
+ BOOST_ASSERT( current != this->end().base() );
+
+ current = to_valid(next(current), this->end().base(), bi_pred, _default_pass);
+ }
+
+ private:
+ bool _default_pass;
+ };
+
+ template< class T >
+ struct adjacent_holder : holder<T>
+ {
+ adjacent_holder( T r ) : holder<T>(r)
+ { }
+ };
+
+ template< class T >
+ struct adjacent_excl_holder : holder<T>
+ {
+ adjacent_excl_holder( T r ) : holder<T>(r)
+ { }
+ };
+
+ template< class ForwardRng, class BinPredicate >
+ inline adjacent_filter_range<BinPredicate, ForwardRng>
+ operator|( ForwardRng& r,
+ const adjacent_holder<BinPredicate>& f )
+ {
+ return adjacent_filter_range<BinPredicate, ForwardRng>( f.val, r, true );
+ }
+
+ template< class ForwardRng, class BinPredicate >
+ inline adjacent_filter_range<BinPredicate, const ForwardRng>
+ operator|( const ForwardRng& r,
+ const adjacent_holder<BinPredicate>& f )
+ {
+ return adjacent_filter_range<BinPredicate,
+ const ForwardRng>( f.val, r, true );
+ }
+
+ template< class ForwardRng, class BinPredicate >
+ inline adjacent_filter_range<BinPredicate, ForwardRng>
+ operator|( ForwardRng& r,
+ const adjacent_excl_holder<BinPredicate>& f )
+ {
+ return adjacent_filter_range<BinPredicate, ForwardRng>( f.val, r, false );
+ }
+
+ template< class ForwardRng, class BinPredicate >
+ inline adjacent_filter_range<BinPredicate, ForwardRng>
+ operator|( const ForwardRng& r,
+ const adjacent_excl_holder<BinPredicate>& f )
+ {
+ return adjacent_filter_range<BinPredicate,
+ const ForwardRng>( f.val, r, false );
+ }
+
+ } // 'range_detail'
+
+ // Bring adjacent_filter_range into the boost namespace so that users of
+ // this library may specify the return type of the '|' operator and
+ // make_adjacent_filtered_range()
+ using range_detail::adjacent_filter_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder<range_detail::adjacent_holder>
+ adjacent_filtered =
+ range_detail::forwarder<range_detail::adjacent_holder>();
+
+ const range_detail::forwarder<range_detail::adjacent_excl_holder>
+ adjacent_filtered_excl =
+ range_detail::forwarder<range_detail::adjacent_excl_holder>();
+ }
+
+ template<class ForwardRng, class BinPredicate>
+ inline adjacent_filter_range<BinPredicate, ForwardRng>
+ adjacent_filter(ForwardRng& rng, BinPredicate filter_pred, bool default_pass = true)
+ {
+ return adjacent_filter_range<BinPredicate, ForwardRng>(filter_pred, rng, default_pass);
+ }
+
+ template<class ForwardRng, class BinPredicate>
+ inline adjacent_filter_range<BinPredicate, const ForwardRng>
+ adjacent_filter(const ForwardRng& rng, BinPredicate filter_pred, bool default_pass = true)
+ {
+ return adjacent_filter_range<BinPredicate, const ForwardRng>(filter_pred, rng, default_pass);
+ }
+
+ } // 'adaptors'
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+#endif

Added: trunk/boost/range/adaptor/argument_fwd.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/argument_fwd.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,80 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
+#define BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4512) // assignment operator could not be generated
+#endif
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class T >
+ struct holder
+ {
+ T val;
+ holder( T t ) : val(t)
+ { }
+ };
+
+ template< class T >
+ struct holder2
+ {
+ T val1, val2;
+ holder2( T t, T u ) : val1(t), val2(u)
+ { }
+ };
+
+ template< template<class> class Holder >
+ struct forwarder
+ {
+ template< class T >
+ Holder<T> operator()( T t ) const
+ {
+ return Holder<T>(t);
+ }
+ };
+
+ template< template<class> class Holder >
+ struct forwarder2
+ {
+ template< class T >
+ Holder<T> operator()( T t, T u ) const
+ {
+ return Holder<T>(t,u);
+ }
+ };
+
+ template< template<class,class> class Holder >
+ struct forwarder2TU
+ {
+ template< class T, class U >
+ Holder<T, U> operator()( T t, U u ) const
+ {
+ return Holder<T, U>(t, u);
+ }
+ };
+
+
+ }
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif

Added: trunk/boost/range/adaptor/copied.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/copied.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_COPIED_HPP
+#define BOOST_RANGE_ADAPTOR_COPIED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class T >
+ struct copy_holder
+ : holder2<std::size_t>
+ {
+ copy_holder( std::size_t t, std::size_t u )
+ : holder2<std::size_t>(t,u)
+ { }
+ };
+
+ template< class CopyableRandomAccessRng, class Int >
+ inline CopyableRandomAccessRng
+ operator|( const CopyableRandomAccessRng& r, const copy_holder<Int>& f )
+ {
+ iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<const
+ CopyableRandomAccessRng>::type >
+ temp( sliced_impl( r, f ) );
+ return CopyableRandomAccessRng( temp.begin(), temp.end() );
+ }
+
+ } // 'range_detail'
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder2<range_detail::copy_holder>
+ copied = range_detail::forwarder2<range_detail::copy_holder>();
+ }
+
+ template<class CopyableRandomAccessRange>
+ inline CopyableRandomAccessRange
+ copy(const CopyableRandomAccessRange& rng, std::size_t t, std::size_t u)
+ {
+ iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<const
+ CopyableRandomAccessRange>::type> temp(
+ adaptors::slice(rng, t, u));
+
+ return CopyableRandomAccessRange( temp.begin(), temp.end() );
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/define_adaptor.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/define_adaptor.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,117 @@
+#ifndef BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED
+#define BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED
+
+#include <boost/tuple/tuple.hpp>
+
+#define BOOST_DEFINE_RANGE_ADAPTOR( adaptor_name, range_adaptor ) \
+ struct adaptor_name##_forwarder {}; \
+ \
+ template<typename Range> range_adaptor <Range> \
+ operator|(Range& rng, adaptor_name##_forwarder) \
+ { \
+ return range_adaptor <Range>( rng ); \
+ } \
+ \
+ template<typename Range> range_adaptor <const Range> \
+ operator|(const Range& rng, adaptor_name##_forwarder) \
+ { \
+ return range_adaptor <const Range>( rng ); \
+ } \
+ \
+ static adaptor_name##_forwarder adaptor_name = adaptor_name##_forwarder(); \
+ \
+ template<typename Range> \
+ range_adaptor <Range> \
+ make_##adaptor_name(Range& rng) \
+ { \
+ return range_adaptor <Range>(rng); \
+ } \
+ \
+ template<typename Range> \
+ range_adaptor <const Range> \
+ make_##adaptor_name(const Range& rng) \
+ { \
+ return range_adaptor <const Range>(rng); \
+ }
+
+#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, adaptor_class ) \
+ template<typename Range> range_adaptor <Range> \
+ operator|(Range& rng, const adaptor_name & args) \
+ { \
+ return range_adaptor <Range>(rng, args.arg1); \
+ } \
+ template<typename Range> range_adaptor <const Range> \
+ operator|(const Range& rng, const adaptor_name & args) \
+ { \
+ return range_adaptor <Range>(rng, args.arg1); \
+ } \
+ template<typename Range, typename Arg1> \
+ range_adaptor<Range> \
+ make_##adaptor_name(Range& rng, Arg1 arg1) \
+ { \
+ return range_adaptor<Range>(rng, arg1); \
+ }
+
+#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, arg1_type ) \
+ struct adaptor_name \
+ { \
+ explicit adaptor_name (arg1_type arg1_) \
+ : arg1(arg1_) {} \
+ arg1_type arg1; \
+ }; \
+ \
+ template<typename Range> range_adaptor <Range> \
+ operator|(Range& rng, adaptor_name args) \
+ { \
+ return range_adaptor <Range>(rng, args.arg1); \
+ } \
+ \
+ template<typename Range> range_adaptor <const Range> \
+ operator|(const Range& rng, adaptor_name args) \
+ { \
+ return range_adaptor <const Range>(rng, args.arg1); \
+ } \
+ \
+ template<typename Range> \
+ range_adaptor <Range> \
+ make_##adaptor_name(Range& rng, arg1_type arg1) \
+ { \
+ return range_adaptor <Range>(rng, arg1); \
+ } \
+ \
+ template<typename Range> \
+ range_adaptor <const Range> \
+ make_##adaptor_name(const Range& rng, arg1_type arg1) \
+ { \
+ return range_adaptor <const Range>(rng, arg1); \
+ }
+
+#define BOOST_RANGE_ADAPTOR_2( adaptor_name, range_adaptor, arg1_type, arg2_type ) \
+ struct adaptor_name \
+ { \
+ explicit adaptor_name (arg1_type arg1_, arg2_type arg2_) \
+ : arg1(arg1_), arg2(arg2_) {} \
+ arg1_type arg1; \
+ arg2_type arg2; \
+ }; \
+ \
+ template<typename Range> range_adaptor <Range> \
+ operator|(Range& rng, adaptor_name args) \
+ { \
+ return range_adaptor <Range>(rng, args.arg1, args.arg2); \
+ } \
+ template<typename Range> \
+ range_adaptor <Range> \
+ make_##adaptor_name(Range& rng, arg1_type arg1, arg2_type arg2) \
+ { \
+ return range_adaptor <Range>(rng, arg1, arg2); \
+ } \
+ template<typename Range> \
+ range_adaptor <const Range> \
+ make_##adaptor_name(const Range& rng, arg1_type arg1, arg2_type arg2) \
+ { \
+ return range_adaptor <const Range>(rng, arg1, arg2); \
+ }
+
+
+#endif // include guard

Added: trunk/boost/range/adaptor/filtered.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/filtered.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,102 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_FILTERED_HPP
+#define BOOST_RANGE_ADAPTOR_FILTERED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/filter_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class P, class R >
+ struct filter_range :
+ boost::iterator_range<
+ boost::filter_iterator< P,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ {
+ private:
+ typedef boost::iterator_range<
+ boost::filter_iterator< P,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ base;
+ public:
+ filter_range( P p, R& r )
+ : base( make_filter_iterator( p, boost::begin(r), boost::end(r) ),
+ make_filter_iterator( p, boost::end(r), boost::end(r) ) )
+ { }
+ };
+
+ template< class T >
+ struct filter_holder : holder<T>
+ {
+ filter_holder( T r ) : holder<T>(r)
+ { }
+ };
+
+ template< class InputRng, class Predicate >
+ inline filter_range<Predicate, InputRng>
+ operator|( InputRng& r,
+ const filter_holder<Predicate>& f )
+ {
+ return filter_range<Predicate, InputRng>( f.val, r );
+ }
+
+ template< class InputRng, class Predicate >
+ inline filter_range<Predicate, const InputRng>
+ operator|( const InputRng& r,
+ const filter_holder<Predicate>& f )
+ {
+ return filter_range<Predicate, const InputRng>( f.val, r );
+ }
+
+ } // 'range_detail'
+
+ // Unusual use of 'using' is intended to bring filter_range into the boost namespace
+ // while leaving the mechanics of the '|' operator in range_detail and maintain
+ // argument dependent lookup.
+ // filter_range logically needs to be in the boost namespace to allow user of
+ // the library to define the return type for make_filtered_range()
+ using range_detail::filter_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder<range_detail::filter_holder>
+ filtered =
+ range_detail::forwarder<range_detail::filter_holder>();
+ }
+
+ template<class InputRange, class Predicate>
+ inline filter_range<Predicate, InputRange>
+ filter(InputRange& rng, Predicate filter_pred)
+ {
+ return range_detail::filter_range<Predicate, InputRange>( filter_pred, rng );
+ }
+
+ template<class InputRange, class Predicate>
+ inline filter_range<Predicate, const InputRange>
+ filter(const InputRange& rng, Predicate filter_pred)
+ {
+ return range_detail::filter_range<Predicate, const InputRange>( filter_pred, rng );
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/indexed.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/indexed.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,173 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_INDEXED_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_INDEXED_IMPL_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+#pragma warning( push )
+#pragma warning( disable : 4355 )
+#endif
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+
+
+
+namespace boost
+{
+
+ namespace range_detail
+ {
+ template< class Iter >
+ class indexed_iterator
+ : public boost::iterator_adaptor< indexed_iterator<Iter>, Iter >
+ {
+ private:
+ typedef boost::iterator_adaptor< indexed_iterator<Iter>, Iter >
+ base;
+
+ typedef BOOST_DEDUCED_TYPENAME base::difference_type index_type;
+
+ index_type index_;
+
+ public:
+ explicit indexed_iterator( Iter i, index_type index )
+ : base(i), index_(index)
+ {
+ BOOST_ASSERT( index_ >= 0 && "Indexed Iterator out of bounds" );
+ }
+
+ index_type index() const
+ {
+ return index_;
+ }
+
+ private:
+ friend class boost::iterator_core_access;
+
+ void increment()
+ {
+ ++index_;
+ ++(this->base_reference());
+ }
+
+
+ void decrement()
+ {
+ BOOST_ASSERT( index_ > 0 && "Indexed Iterator out of bounds" );
+ --index_;
+ --(this->base_reference());
+ }
+
+ void advance( index_type n )
+ {
+ index_ += n;
+ BOOST_ASSERT( index_ >= 0 && "Indexed Iterator out of bounds" );
+ this->base_reference() += n;
+ }
+ };
+
+ template< class Rng >
+ struct indexed_range :
+ iterator_range< indexed_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> >
+ {
+ private:
+ typedef indexed_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type>
+ iter_type;
+ typedef iterator_range<iter_type>
+ base;
+ public:
+ template< class Index >
+ indexed_range( Index i, Rng& r )
+ : base( iter_type(boost::begin(r), i), iter_type(boost::end(r),i) )
+ { }
+ };
+
+
+ template< class T >
+ struct index_holder : holder<T>
+ {
+ index_holder( T r ) : holder<T>(r)
+ { }
+ };
+
+ struct index_forwarder
+ {
+ template< class T >
+ index_holder<T> operator()( T r ) const
+ {
+ return r;
+ }
+
+ index_holder<int> operator()( int r = 0 ) const
+ {
+ return r;
+ }
+ };
+
+ template< class SinglePassRange >
+ inline indexed_range<SinglePassRange>
+ operator|( SinglePassRange& r,
+ const index_holder<typename range_difference<SinglePassRange>::type>& f )
+ {
+ return indexed_range<SinglePassRange>( f.val, r );
+ }
+
+ template< class SinglePassRange >
+ inline indexed_range<const SinglePassRange>
+ operator|( const SinglePassRange& r,
+ const index_holder<typename range_difference<SinglePassRange>::type>& f )
+ {
+ return indexed_range<const SinglePassRange>( f.val, r );
+ }
+
+ } // 'range_detail'
+
+ // Make this available to users of this library. It will sometimes be
+ // required since it is the return type of operator '|' and
+ // make_indexed_range().
+ using range_detail::indexed_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder<range_detail::index_holder>
+ indexed =
+ range_detail::forwarder<range_detail::index_holder>();
+ }
+
+ template<class SinglePassRange, class Index>
+ inline indexed_range<SinglePassRange>
+ index(SinglePassRange& rng, Index index)
+ {
+ return indexed_range<SinglePassRange>(index, rng);
+ }
+
+ template<class SinglePassRange, class Index>
+ inline indexed_range<const SinglePassRange>
+ index(const SinglePassRange& rng, Index index)
+ {
+ return indexed_range<const SinglePassRange>(index, rng);
+ }
+ } // 'adaptors'
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+#endif

Added: trunk/boost/range/adaptor/indirected.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/indirected.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,88 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_INDIRECTED_HPP
+#define BOOST_RANGE_ADAPTOR_INDIRECTED_HPP
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/indirect_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class R >
+ struct indirect_range :
+ public boost::iterator_range<
+ boost::indirect_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ {
+ private:
+ typedef boost::iterator_range<
+ boost::indirect_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ base;
+
+ public:
+ indirect_range( R& r )
+ : base( r )
+ { }
+ };
+
+ struct indirect_forwarder {};
+
+ template< class InputRng >
+ inline indirect_range<InputRng>
+ operator|( InputRng& r, indirect_forwarder )
+ {
+ return indirect_range<InputRng>( r );
+ }
+
+ template< class InputRng >
+ inline indirect_range<const InputRng>
+ operator|( const InputRng& r, indirect_forwarder )
+ {
+ return indirect_range<const InputRng>( r );
+ }
+
+ } // 'range_detail'
+
+ using range_detail::indirect_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::indirect_forwarder indirected =
+ range_detail::indirect_forwarder();
+ }
+
+ template<class InputRange>
+ inline indirect_range<InputRange>
+ indirect(InputRange& rng)
+ {
+ return indirect_range<InputRange>(rng);
+ }
+
+ template<class InputRange>
+ inline indirect_range<const InputRange>
+ indirect(const InputRange& rng)
+ {
+ return indirect_range<const InputRange>(rng);
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/map.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/map.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,188 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_MAP_HPP
+#define BOOST_RANGE_ADAPTOR_MAP_HPP
+
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/value_type.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ struct map_keys_forwarder {};
+ struct map_values_forwarder {};
+
+ template< class Map >
+ struct select_first
+ {
+ typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+ typedef const BOOST_DEDUCED_TYPENAME pair_t::first_type&
+ result_type;
+
+ result_type operator()( const pair_t& r ) const
+ {
+ return r.first;
+ }
+ };
+
+ template< class Map >
+ struct select_second_mutable
+ {
+ typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+ typedef BOOST_DEDUCED_TYPENAME pair_t::second_type& result_type;
+
+ result_type operator()( pair_t& r ) const
+ {
+ return r.second;
+ }
+ };
+
+ template< class Map >
+ struct select_second_const
+ {
+ typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+ typedef const BOOST_DEDUCED_TYPENAME pair_t::second_type&
+ result_type;
+
+ result_type operator()( const pair_t& r ) const
+ {
+ return r.second;
+ }
+ };
+
+ template<class StdPairRng>
+ class select_first_range
+ : public transform_range<
+ select_first<StdPairRng>,
+ const StdPairRng>
+ {
+ typedef transform_range<select_first<StdPairRng>, const StdPairRng> base;
+ public:
+ typedef select_first<StdPairRng> transform_fn_type;
+ typedef const StdPairRng source_range_type;
+
+ select_first_range(transform_fn_type fn, source_range_type& rng)
+ : base(fn, rng)
+ {
+ }
+
+ select_first_range(const base& other) : base(other) {}
+ };
+
+ template<class StdPairRng>
+ class select_second_mutable_range
+ : public transform_range<
+ select_second_mutable<StdPairRng>,
+ StdPairRng>
+ {
+ typedef transform_range<select_second_mutable<StdPairRng>, StdPairRng> base;
+ public:
+ typedef select_second_mutable<StdPairRng> transform_fn_type;
+ typedef StdPairRng source_range_type;
+
+ select_second_mutable_range(transform_fn_type fn, source_range_type& rng)
+ : base(fn, rng)
+ {
+ }
+
+ select_second_mutable_range(const base& other) : base(other) {}
+ };
+
+ template<class StdPairRng>
+ class select_second_const_range
+ : public transform_range<
+ select_second_const<StdPairRng>,
+ const StdPairRng>
+ {
+ typedef transform_range<select_second_const<StdPairRng>, const StdPairRng> base;
+ public:
+ typedef select_second_const<StdPairRng> transform_fn_type;
+ typedef const StdPairRng source_range_type;
+
+ select_second_const_range(transform_fn_type fn, source_range_type& rng)
+ : base(fn, rng)
+ {
+ }
+
+ select_second_const_range(const base& other) : base(other) {}
+ };
+
+ template< class StdPairRng >
+ inline select_first_range<StdPairRng>
+ operator|( const StdPairRng& r, map_keys_forwarder )
+ {
+ return operator|( r,
+ boost::adaptors::transformed( select_first<StdPairRng>() ) );
+ }
+
+ template< class StdPairRng >
+ inline select_second_mutable_range<StdPairRng>
+ operator|( StdPairRng& r, map_values_forwarder )
+ {
+ return operator|( r,
+ boost::adaptors::transformed( select_second_mutable<StdPairRng>() ) );
+ }
+
+ template< class StdPairRng >
+ inline select_second_const_range<StdPairRng>
+ operator|( const StdPairRng& r, map_values_forwarder )
+ {
+ return operator|( r,
+ boost::adaptors::transformed( select_second_const<StdPairRng>() ) );
+ }
+
+ } // 'range_detail'
+
+ using range_detail::select_first_range;
+ using range_detail::select_second_mutable_range;
+ using range_detail::select_second_const_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::map_keys_forwarder map_keys =
+ range_detail::map_keys_forwarder();
+
+ const range_detail::map_values_forwarder map_values =
+ range_detail::map_values_forwarder();
+ }
+
+ template<class StdPairRange>
+ inline select_first_range<StdPairRange>
+ keys(const StdPairRange& rng)
+ {
+ return select_first_range<StdPairRange>(
+ range_detail::select_first<StdPairRange>(), rng );
+ }
+
+ template<class StdPairRange>
+ inline select_second_const_range<StdPairRange>
+ values(const StdPairRange& rng)
+ {
+ return select_second_const_range<StdPairRange>(
+ range_detail::select_second_const<StdPairRange>(), rng );
+ }
+
+ template<class StdPairRange>
+ inline select_second_mutable_range<StdPairRange>
+ values(StdPairRange& rng)
+ {
+ return select_second_mutable_range<StdPairRange>(
+ range_detail::select_second_mutable<StdPairRange>(), rng );
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/replaced.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/replaced.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,134 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class Value >
+ class replace_value
+ {
+ public:
+ typedef const Value& result_type;
+ typedef const Value& first_argument_type;
+
+ replace_value(const Value& from, const Value& to)
+ : _from(from), _to(to)
+ {
+ }
+
+ const Value& operator()(const Value& x) const
+ {
+ return (x == _from) ? _to : x;
+ }
+
+ private:
+ Value _from;
+ Value _to;
+ };
+
+ template< class R >
+ class replace_range :
+ public boost::iterator_range<
+ boost::transform_iterator<
+ replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type > >
+ {
+ private:
+ typedef replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn;
+
+ typedef boost::iterator_range<
+ boost::transform_iterator<
+ replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t;
+
+ public:
+ typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type;
+
+ replace_range( R& r, value_type from, value_type to )
+ : base_t( make_transform_iterator( boost::begin(r), Fn(from, to) ),
+ make_transform_iterator( boost::end(r), Fn(from, to) ) )
+ { }
+ };
+
+ template< class T >
+ class replace_holder : public holder2<T>
+ {
+ public:
+ replace_holder( const T& from, const T& to )
+ : holder2<T>(from, to)
+ { }
+ private:
+ // not assignable
+ void operator=(const replace_holder&);
+ };
+
+ template< class InputRng >
+ inline replace_range<InputRng>
+ operator|( InputRng& r,
+ const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+ {
+ return replace_range<InputRng>(r, f.val1, f.val2);
+ }
+
+ template< class InputRng >
+ inline replace_range<const InputRng>
+ operator|( const InputRng& r,
+ const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+ {
+ return replace_range<const InputRng>(r, f.val1, f.val2);
+ }
+ } // 'range_detail'
+
+ using range_detail::replace_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder2<range_detail::replace_holder>
+ replaced =
+ range_detail::forwarder2<range_detail::replace_holder>();
+ }
+
+ template<class InputRange>
+ inline replace_range<InputRange>
+ replace(InputRange& rng,
+ BOOST_DEDUCED_TYPENAME range_value<InputRange>::type from,
+ BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to)
+ {
+ return replace_range<InputRange>(rng, from, to);
+ }
+
+ template<class InputRange>
+ inline replace_range<const InputRange>
+ replace(const InputRange& rng,
+ BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type from,
+ BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to)
+ {
+ return replace_range<const InputRange>(rng, from ,to);
+ }
+
+ } // 'adaptors'
+} // 'boost'
+
+#endif // include guard

Added: trunk/boost/range/adaptor/replaced_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/replaced_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,136 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class Pred, class Value >
+ class replace_value_if
+ {
+ public:
+ typedef const Value& result_type;
+ typedef const Value& first_argument_type;
+
+ replace_value_if(const Pred& pred, const Value& to)
+ : m_pred(pred), m_to(to)
+ {
+ }
+
+ const Value& operator()(const Value& x) const
+ {
+ return m_pred(x) ? m_to : x;
+ }
+
+ private:
+ Pred m_pred;
+ Value m_to;
+ };
+
+ template< class Pred, class R >
+ class replace_if_range :
+ public boost::iterator_range<
+ boost::transform_iterator<
+ replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type > >
+ {
+ private:
+ typedef replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn;
+
+ typedef boost::iterator_range<
+ boost::transform_iterator<
+ replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t;
+
+ public:
+ typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type;
+
+ replace_if_range( R& r, const Pred& pred, value_type to )
+ : base_t( make_transform_iterator( boost::begin(r), Fn(pred, to) ),
+ make_transform_iterator( boost::end(r), Fn(pred, to) ) )
+ { }
+ };
+
+ template< class Pred, class T >
+ class replace_if_holder
+ {
+ public:
+ replace_if_holder( const Pred& pred, const T& to )
+ : m_pred(pred), m_to(to)
+ { }
+
+ const Pred& pred() const { return m_pred; }
+ const T& to() const { return m_to; }
+
+ private:
+ Pred m_pred;
+ T m_to;
+ };
+
+ template< class Pred, class InputRng >
+ inline replace_if_range<Pred, InputRng>
+ operator|( InputRng& r,
+ const replace_if_holder<Pred, BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+ {
+ return replace_if_range<Pred, InputRng>(r, f.pred(), f.to());
+ }
+
+ template< class Pred, class InputRng >
+ inline replace_if_range<Pred, const InputRng>
+ operator|( const InputRng& r,
+ const replace_if_holder<Pred, BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+ {
+ return replace_if_range<Pred, const InputRng>(r, f.pred(), f.to());
+ }
+ } // 'range_detail'
+
+ using range_detail::replace_if_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder2TU<range_detail::replace_if_holder>
+ replaced_if =
+ range_detail::forwarder2TU<range_detail::replace_if_holder>();
+ }
+
+ template<class Pred, class InputRange>
+ inline replace_if_range<Pred, InputRange>
+ replace_if(InputRange& rng, Pred pred,
+ BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to)
+ {
+ return range_detail::replace_if_range<Pred, InputRange>(rng, pred, to);
+ }
+
+ template<class Pred, class InputRange>
+ inline replace_if_range<Pred, const InputRange>
+ replace_if(const InputRange& rng, Pred pred,
+ BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to)
+ {
+ return range_detail::replace_if_range<Pred, const InputRange>(rng, pred, to);
+ }
+ } // 'adaptors'
+
+} // 'boost'
+
+#endif // include guard

Added: trunk/boost/range/adaptor/reversed.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/reversed.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REVERSED_HPP
+#define BOOST_RANGE_ADAPTOR_REVERSED_HPP
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class R >
+ struct reverse_range :
+ public boost::iterator_range<
+ boost::reverse_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ {
+ private:
+ typedef boost::iterator_range<
+ boost::reverse_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ base;
+
+ public:
+ typedef boost::reverse_iterator<BOOST_DEDUCED_TYPENAME range_iterator<R>::type> iterator;
+
+ reverse_range( R& r )
+ : base( iterator(boost::end(r)), iterator(boost::begin(r)) )
+ { }
+ };
+
+ struct reverse_forwarder {};
+
+ template< class BidirectionalRng >
+ inline reverse_range<BidirectionalRng>
+ operator|( BidirectionalRng& r, reverse_forwarder )
+ {
+ return reverse_range<BidirectionalRng>( r );
+ }
+
+ template< class BidirectionalRng >
+ inline reverse_range<const BidirectionalRng>
+ operator|( const BidirectionalRng& r, reverse_forwarder )
+ {
+ return reverse_range<const BidirectionalRng>( r );
+ }
+
+ } // 'range_detail'
+
+ using range_detail::reverse_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::reverse_forwarder reversed =
+ range_detail::reverse_forwarder();
+ }
+
+ template<class BidirectionalRange>
+ inline reverse_range<BidirectionalRange>
+ reverse(BidirectionalRange& rng)
+ {
+ return reverse_range<BidirectionalRange>(rng);
+ }
+
+ template<class BidirectionalRange>
+ inline reverse_range<const BidirectionalRange>
+ reverse(const BidirectionalRange& rng)
+ {
+ return reverse_range<const BidirectionalRange>(rng);
+ }
+ } // 'adaptors'
+
+} // 'boost'
+
+#endif

Added: trunk/boost/range/adaptor/sliced.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/sliced.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,92 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_SLICED_HPP
+#define BOOST_RANGE_ADAPTOR_SLICED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+ namespace adaptors
+ {
+ template< class RandomAccessRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
+ slice( RandomAccessRange& rng, std::size_t t, std::size_t u )
+ {
+ BOOST_ASSERT( t <= u && "error in slice indices" );
+ BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
+ "second slice index out of bounds" );
+
+ return make_iterator_range( rng, t, u - boost::size(rng) );
+ }
+
+ template< class RandomAccessRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
+ slice( const RandomAccessRange& rng, std::size_t t, std::size_t u )
+ {
+ BOOST_ASSERT( t <= u && "error in slice indices" );
+ BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
+ "second slice index out of bounds" );
+
+ return make_iterator_range( rng, t, u - boost::size(rng) );
+ }
+ } // 'adaptors'
+
+ namespace range_detail
+ {
+ template< class T >
+ struct slice_holder
+ : holder2<std::size_t>
+ {
+ slice_holder( std::size_t t, std::size_t u )
+ : holder2<std::size_t>(t,u)
+ { }
+ };
+
+ template<class R, class H>
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<R>::type >
+ sliced_impl( R& r, const H& f)
+ {
+ return adaptors::slice(r, f.val1, f.val2);
+ }
+
+ template< class RandomAccessRange, class Int >
+ inline iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
+ operator|( RandomAccessRange& r, const slice_holder<Int>& f )
+ {
+ return sliced_impl( r, f );
+ }
+
+ template< class RandomAccessRange, class Int >
+ inline iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
+ operator|( const RandomAccessRange& r, const slice_holder<Int>& f )
+ {
+ return sliced_impl( r, f );
+ }
+
+ } // 'range_detail'
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder2<range_detail::slice_holder>
+ sliced = range_detail::forwarder2<range_detail::slice_holder>();
+ }
+ }
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/strided.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/strided.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ADAPTOR_STRIDED_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_STRIDED_HPP_INCLUDED
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <iterator>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+ template<typename BaseIterator>
+ class strided_iterator
+ : public iterator_adaptor<
+ strided_iterator<BaseIterator>,
+ BaseIterator>
+ {
+ friend class iterator_core_access;
+
+ typedef iterator_adaptor<strided_iterator<BaseIterator>, BaseIterator> super_t;
+
+ public:
+ typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<BaseIterator>::difference_type difference_type;
+
+ strided_iterator() : m_stride() { }
+
+ strided_iterator(const strided_iterator& other)
+ : super_t(other), m_stride(other.m_stride) { }
+
+ explicit strided_iterator(BaseIterator base_it, difference_type stride)
+ : super_t(base_it), m_stride(stride) { }
+
+ strided_iterator&
+ operator=(const strided_iterator& other)
+ {
+ super_t::operator=(other);
+
+ // Is the interoperation of the stride safe?
+ m_stride = other.m_stride;
+ return *this;
+ }
+
+ void increment() { std::advance(this->base_reference(), m_stride); }
+
+ void decrement() { std::advance(this->base_reference(), -m_stride); }
+
+ void advance(difference_type n) { std::advance(this->base_reference(), n * m_stride); }
+
+ difference_type
+ distance_to(const strided_iterator& other) const
+ {
+ return std::distance(this->base_reference(), other.base_reference()) / m_stride;
+ }
+
+ // Using the compiler generated copy constructor and
+ // and assignment operator
+
+ private:
+ difference_type m_stride;
+ };
+
+ template<class BaseIterator> inline
+ strided_iterator<BaseIterator>
+ make_strided_iterator(
+ const BaseIterator& first,
+ BOOST_DEDUCED_TYPENAME std::iterator_traits<BaseIterator>::difference_type stride)
+ {
+ return strided_iterator<BaseIterator>(first, stride);
+ }
+
+ template< class Rng >
+ class strided_range
+ : public iterator_range<range_detail::strided_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> >
+ {
+ typedef range_detail::strided_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> iter_type;
+ typedef iterator_range<iter_type> super_t;
+ public:
+ template< typename Difference >
+ strided_range(Difference stride, Rng& rng)
+ : super_t(make_strided_iterator(boost::begin(rng), stride),
+ make_strided_iterator(boost::end(rng), stride))
+ {
+ }
+ };
+
+ template<class Difference>
+ class strided_holder : public holder<Difference>
+ {
+ public:
+ strided_holder(Difference value) : holder<Difference>(value) {}
+ };
+
+ template<class Rng, class Difference>
+ inline strided_range<Rng>
+ operator|(Rng& rng, const strided_holder<Difference>& stride)
+ {
+ return strided_range<Rng>(stride.val, rng);
+ }
+
+ template<class Rng, class Difference>
+ inline strided_range<const Rng>
+ operator|(const Rng& rng, const strided_holder<Difference>& stride)
+ {
+ return strided_range<const Rng>(stride.val, rng);
+ }
+
+ } // namespace range_detail
+
+ using range_detail::strided_range;
+
+ namespace adaptors
+ {
+
+ namespace
+ {
+ const range_detail::forwarder<range_detail::strided_holder>
+ strided = range_detail::forwarder<range_detail::strided_holder>();
+ }
+
+ template<class Range, class Difference>
+ inline strided_range<Range>
+ stride(Range& rng, Difference step)
+ {
+ return strided_range<Range>(step, rng);
+ }
+
+ template<class Range, class Difference>
+ inline strided_range<const Range>
+ stride(const Range& rng, Difference step)
+ {
+ return strided_range<const Range>(step, rng);
+ }
+
+ } // namespace 'adaptors'
+} // namespace 'boost'
+
+#endif

Added: trunk/boost/range/adaptor/tokenized.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/tokenized.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,137 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_TOKENIZED_HPP
+#define BOOST_RANGE_ADAPTOR_TOKENIZED_HPP
+
+#include <boost/regex.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+ template< class R >
+ struct token_range :
+ public boost::iterator_range<
+ boost::regex_token_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ {
+ private:
+ typedef
+ boost::regex_token_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ regex_iter;
+
+ typedef BOOST_DEDUCED_TYPENAME regex_iter::regex_type
+ regex_type;
+
+ typedef boost::iterator_range<regex_iter>
+ base;
+
+ public:
+ template< class Regex, class Submatch, class Flag >
+ token_range( R& r, const Regex& re, const Submatch& sub, Flag f )
+ : base( regex_iter( boost::begin(r), boost::end(r),
+ regex_type(re), sub, f ),
+ regex_iter() )
+ { }
+ };
+
+ template< class T, class U, class V >
+ struct regex_holder
+ {
+ const T& re;
+ const U& sub;
+ V f;
+
+ regex_holder( const T& rex, const U& subm, V flag ) :
+ re(rex), sub(subm), f(flag)
+ { }
+ private:
+ // Not assignable
+ void operator=(const regex_holder&);
+ };
+
+ struct regex_forwarder
+ {
+ template< class Regex >
+ regex_holder<Regex,int,regex_constants::match_flag_type>
+ operator()( const Regex& re,
+ int submatch = 0,
+ regex_constants::match_flag_type f =
+ regex_constants::match_default ) const
+ {
+ return regex_holder<Regex,int,
+ regex_constants::match_flag_type>( re, submatch, f );
+ }
+
+ template< class Regex, class Submatch >
+ regex_holder<Regex,Submatch,regex_constants::match_flag_type>
+ operator()( const Regex& re,
+ const Submatch& sub,
+ regex_constants::match_flag_type f =
+ regex_constants::match_default ) const
+ {
+ return regex_holder<Regex,Submatch,
+ regex_constants::match_flag_type>( re, sub, f );
+ }
+ };
+
+ template< class BidirectionalRng, class R, class S, class F >
+ inline token_range<BidirectionalRng>
+ operator|( BidirectionalRng& r,
+ const regex_holder<R,S,F>& f )
+ {
+ return token_range<BidirectionalRng>( r, f.re, f.sub, f.f );
+ }
+
+ template< class BidirectionalRng, class R, class S, class F >
+ inline token_range<const BidirectionalRng>
+ operator|( const BidirectionalRng& r,
+ const regex_holder<R,S,F>& f )
+ {
+ return token_range<const BidirectionalRng>( r, f.re, f.sub, f.f );
+ }
+
+ } // 'range_detail'
+
+ using range_detail::token_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::regex_forwarder tokenized =
+ range_detail::regex_forwarder();
+ }
+
+ template<class BidirectionalRange, class Regex, class Submatch, class Flag>
+ inline token_range<BidirectionalRange>
+ tokenize(BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f)
+ {
+ return token_range<BidirectionalRange>(rng, reg, sub, f);
+ }
+
+ template<class BidirectionalRange, class Regex, class Submatch, class Flag>
+ inline token_range<const BidirectionalRange>
+ tokenize(const BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f)
+ {
+ return token_range<const BidirectionalRange>(rng, reg, sub, f);
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/transformed.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/transformed.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,103 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_TRANSFORMED_HPP
+#define BOOST_RANGE_ADAPTOR_TRANSFORMED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+ template< class F, class R >
+ struct transform_range :
+ public boost::iterator_range<
+ boost::transform_iterator< F,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ {
+ private:
+ typedef boost::iterator_range<
+ boost::transform_iterator< F,
+ BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+ >
+ >
+ base;
+
+ public:
+ typedef F transform_fn_type;
+ typedef R source_range_type;
+
+ transform_range( F f, R& r )
+ : base( make_transform_iterator( boost::begin(r), f ),
+ make_transform_iterator( boost::end(r), f ) )
+
+ { }
+ };
+
+ template< class T >
+ struct transform_holder : holder<T>
+ {
+ transform_holder( T r ) : holder<T>(r)
+ { }
+ };
+
+ template< class InputRng, class UnaryFunction >
+ inline transform_range<UnaryFunction,InputRng>
+ operator|( InputRng& r,
+ const transform_holder<UnaryFunction>& f )
+ {
+ return transform_range<UnaryFunction,InputRng>( f.val, r );
+ }
+
+ template< class InputRng, class UnaryFunction >
+ inline transform_range<UnaryFunction, const InputRng>
+ operator|( const InputRng& r,
+ const transform_holder<UnaryFunction>& f )
+ {
+ return transform_range<UnaryFunction, const InputRng>( f.val, r );
+ }
+
+ } // 'range_detail'
+
+ using range_detail::transform_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::forwarder<range_detail::transform_holder>
+ transformed =
+ range_detail::forwarder<range_detail::transform_holder>();
+ }
+
+ template<class UnaryFunction, class InputRange>
+ inline transform_range<UnaryFunction, InputRange>
+ transform(InputRange& rng, UnaryFunction fn)
+ {
+ return transform_range<UnaryFunction, InputRange>(fn, rng);
+ }
+
+ template<class UnaryFunction, class InputRange>
+ inline transform_range<UnaryFunction, const InputRange>
+ transform(const InputRange& rng, UnaryFunction fn)
+ {
+ return transform_range<UnaryFunction, const InputRange>(fn, rng);
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptor/uniqued.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptor/uniqued.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_UNIQUED_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_UNIQUED_IMPL_HPP
+
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+
+namespace boost
+{
+
+ namespace range_detail
+ {
+ struct unique_forwarder { };
+
+ struct unique_not_equal_to
+ {
+ typedef bool result_type;
+
+ template< class T >
+ bool operator()( const T& l, const T& r ) const
+ {
+ return !(l == r);
+ }
+ };
+
+ template<class ForwardRng>
+ class unique_range : public adjacent_filter_range<unique_not_equal_to, ForwardRng>
+ {
+ typedef adjacent_filter_range<unique_not_equal_to, ForwardRng> base;
+ public:
+ explicit unique_range(ForwardRng& rng)
+ : base(unique_not_equal_to(), rng, true)
+ {
+ }
+ };
+
+ template< class ForwardRng >
+ inline unique_range<ForwardRng>
+ operator|( ForwardRng& r,
+ unique_forwarder )
+ {
+ return unique_range<ForwardRng>(r);
+ }
+
+ template< class ForwardRng >
+ inline unique_range<const ForwardRng>
+ operator|( const ForwardRng& r,
+ unique_forwarder )
+ {
+ return unique_range<const ForwardRng>(r);
+ }
+
+ } // 'range_detail'
+
+ using range_detail::unique_range;
+
+ namespace adaptors
+ {
+ namespace
+ {
+ const range_detail::unique_forwarder uniqued =
+ range_detail::unique_forwarder();
+ }
+
+ template<class ForwardRange>
+ inline unique_range<ForwardRange>
+ unique(ForwardRange& rng)
+ {
+ return unique_range<ForwardRange>(rng);
+ }
+
+ template<class ForwardRange>
+ inline unique_range<const ForwardRange>
+ unique(const ForwardRange& rng)
+ {
+ return unique_range<const ForwardRange>(rng);
+ }
+ } // 'adaptors'
+
+}
+
+#endif

Added: trunk/boost/range/adaptors.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/adaptors.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,29 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2007.
+// Copyright Thorsten Ottosen 2006.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTORS_HPP
+#define BOOST_RANGE_ADAPTORS_HPP
+
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+#include <boost/range/adaptor/copied.hpp>
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/adaptor/indexed.hpp>
+#include <boost/range/adaptor/indirected.hpp>
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/adaptor/replaced.hpp>
+#include <boost/range/adaptor/replaced_if.hpp>
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/adaptor/tokenized.hpp>
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/adaptor/uniqued.hpp>
+
+#endif

Added: trunk/boost/range/algorithm.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,104 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file algorithm.hpp
+/// Includes the range-based versions of the algorithms in the
+/// C++ standard header file <algorithm>
+//
+/////////////////////////////////////////////////////////////////////////////
+
+// Copyright 2009 Neil Groves.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Acknowledgements:
+// This code uses combinations of ideas, techniques and code snippets
+// from: Thorsten Ottosen, Eric Niebler, Jeremy Siek,
+// and Vladimir Prus'
+//
+// The original mutating algorithms that served as the first version
+// were originally written by Vladimir Prus'
+// <ghost_at_[hidden]> code from Boost Wiki
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
+#define BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
+
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/next_prior.hpp>
+#include <algorithm>
+
+// Non-mutating algorithms
+#include <boost/range/algorithm/adjacent_find.hpp>
+#include <boost/range/algorithm/count.hpp>
+#include <boost/range/algorithm/count_if.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm/for_each.hpp>
+#include <boost/range/algorithm/find.hpp>
+#include <boost/range/algorithm/find_end.hpp>
+#include <boost/range/algorithm/find_first_of.hpp>
+#include <boost/range/algorithm/find_if.hpp>
+#include <boost/range/algorithm/lexicographical_compare.hpp>
+#include <boost/range/algorithm/mismatch.hpp>
+#include <boost/range/algorithm/search.hpp>
+#include <boost/range/algorithm/search_n.hpp>
+
+// Mutating algorithms
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/algorithm/copy_backward.hpp>
+#include <boost/range/algorithm/fill.hpp>
+#include <boost/range/algorithm/fill_n.hpp>
+#include <boost/range/algorithm/generate.hpp>
+#include <boost/range/algorithm/inplace_merge.hpp>
+#include <boost/range/algorithm/merge.hpp>
+#include <boost/range/algorithm/nth_element.hpp>
+#include <boost/range/algorithm/partial_sort.hpp>
+#include <boost/range/algorithm/partial_sort_copy.hpp>
+#include <boost/range/algorithm/partition.hpp>
+#include <boost/range/algorithm/random_shuffle.hpp>
+#include <boost/range/algorithm/remove.hpp>
+#include <boost/range/algorithm/remove_copy.hpp>
+#include <boost/range/algorithm/remove_copy_if.hpp>
+#include <boost/range/algorithm/remove_if.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include <boost/range/algorithm/replace_copy.hpp>
+#include <boost/range/algorithm/replace_copy_if.hpp>
+#include <boost/range/algorithm/replace_if.hpp>
+#include <boost/range/algorithm/reverse.hpp>
+#include <boost/range/algorithm/reverse_copy.hpp>
+#include <boost/range/algorithm/rotate.hpp>
+#include <boost/range/algorithm/rotate_copy.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/range/algorithm/stable_partition.hpp>
+#include <boost/range/algorithm/stable_sort.hpp>
+#include <boost/range/algorithm/transform.hpp>
+#include <boost/range/algorithm/unique.hpp>
+#include <boost/range/algorithm/unique_copy.hpp>
+
+// Binary search
+#include <boost/range/algorithm/binary_search.hpp>
+#include <boost/range/algorithm/equal_range.hpp>
+#include <boost/range/algorithm/lower_bound.hpp>
+#include <boost/range/algorithm/upper_bound.hpp>
+
+// Set operations of sorted ranges
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+// Heap operations
+#include <boost/range/algorithm/heap_algorithm.hpp>
+
+// Minimum and Maximum
+#include <boost/range/algorithm/max_element.hpp>
+#include <boost/range/algorithm/min_element.hpp>
+
+// Permutations
+#include <boost/range/algorithm/permutation.hpp>
+
+#endif // include guard
+

Added: trunk/boost/range/algorithm/adjacent_find.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/adjacent_find.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,119 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function adjacent_find
+ ///
+ /// range-based version of the adjacent_find std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< typename ForwardRange >
+ inline typename range_iterator<ForwardRange>::type
+ adjacent_find(ForwardRange & rng)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::adjacent_find(boost::begin(rng),boost::end(rng));
+ }
+
+ /// \overload
+ template< typename ForwardRange >
+ inline typename range_iterator<const ForwardRange>::type
+ adjacent_find(const ForwardRange& rng)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::adjacent_find(boost::begin(rng),boost::end(rng));
+ }
+
+ /// \overload
+ template< typename ForwardRange, typename BinaryPredicate >
+ inline typename range_iterator<ForwardRange>::type
+ adjacent_find(ForwardRange & rng, BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<ForwardRange>::type,
+ typename range_value<ForwardRange>::type>));
+ return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
+ }
+
+ /// \overload
+ template< typename ForwardRange, typename BinaryPredicate >
+ inline typename range_iterator<const ForwardRange>::type
+ adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<const ForwardRange>::type,
+ typename range_value<const ForwardRange>::type>));
+ return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange >
+ inline typename range_return<ForwardRange,re>::type
+ adjacent_find(ForwardRange & rng)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<ForwardRange,re>::
+ pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange >
+ inline typename range_return<const ForwardRange,re>::type
+ adjacent_find(const ForwardRange& rng)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<const ForwardRange,re>::
+ pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
+ inline typename range_return<ForwardRange,re>::type
+ adjacent_find(ForwardRange& rng, BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<ForwardRange>::type,
+ typename range_value<ForwardRange>::type>));
+ return range_return<ForwardRange,re>::
+ pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
+ inline typename range_return<const ForwardRange,re>::type
+ adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<const ForwardRange,re>::
+ pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/binary_search.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/binary_search.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,43 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function binary_search
+ ///
+ /// range-based version of the binary_search std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class ForwardRange, class Value>
+ inline bool binary_search(const ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::binary_search(boost::begin(rng), boost::end(rng), val);
+ }
+
+ /// \overload
+ template<class ForwardRange, class Value, class BinaryPredicate>
+ inline bool binary_search(const ForwardRange& rng, const Value& val,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::binary_search(boost::begin(rng), boost::end(rng), val, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,35 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function copy
+ ///
+ /// range-based version of the copy std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ template< class SinglePassRange, class OutputIterator >
+ inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out)
+ {
+ //BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+ return std::copy(boost::begin(rng),boost::end(rng),out);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/copy_backward.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/copy_backward.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,37 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function copy_backward
+ ///
+ /// range-based version of the copy_backwards std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ /// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
+ /// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
+ template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
+ inline BidirectionalTraversalWriteableIterator
+ copy_backward(const BidirectionalRange& rng,
+ BidirectionalTraversalWriteableIterator out)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ return std::copy_backward(boost::begin(rng), boost::end(rng), out);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/count.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/count.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,44 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COUNT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COUNT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function count
+ ///
+ /// range-based version of the count std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ template< class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type
+ count(SinglePassRange& rng, const Value& val)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::count(boost::begin(rng), boost::end(rng), val);
+ }
+
+ /// \overload
+ template< class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange const>::type
+ count(const SinglePassRange& rng, const Value& val)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::count(boost::begin(rng), boost::end(rng), val);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/count_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/count_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COUNT_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COUNT_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function count_if
+ ///
+ /// range-based version of the count_if std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+ template< class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME boost::range_difference<SinglePassRange>::type
+ count_if(SinglePassRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::count_if(boost::begin(rng), boost::end(rng), pred);
+ }
+
+ /// \overload
+ template< class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME boost::range_difference<const SinglePassRange>::type
+ count_if(const SinglePassRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::count_if(boost::begin(rng), boost::end(rng), pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/equal.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/equal.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,182 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <iterator>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ // An implementation of equality comparison that is optimized for iterator
+ // traversal categories less than RandomAccessTraversal.
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2 >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ do
+ {
+ // If we have reached the end of the left range then this is
+ // the end of the loop. They are equal if and only if we have
+ // simultaneously reached the end of the right range.
+ if (first1 == last1)
+ return first2 == last2;
+
+ // If we have reached the end of the right range at this line
+ // it indicates that the right range is shorter than the left
+ // and hence the result is false.
+ if (first2 == last2)
+ return false;
+
+ // continue looping if and only if the values are equal
+ } while(*first1++ == *first2++);
+
+ // Reaching this line in the algorithm indicates that a value
+ // inequality has been detected.
+ return false;
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2,
+ class BinaryPredicate >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ do
+ {
+ // If we have reached the end of the left range then this is
+ // the end of the loop. They are equal if and only if we have
+ // simultaneously reached the end of the right range.
+ if (first1 == last1)
+ return first2 == last2;
+
+ // If we have reached the end of the right range at this line
+ // it indicates that the right range is shorter than the left
+ // and hence the result is false.
+ if (first2 == last2)
+ return false;
+
+ // continue looping if and only if the values are equal
+ } while(pred(*first1++, *first2++));
+
+ // Reaching this line in the algorithm indicates that a value
+ // inequality has been detected.
+ return false;
+ }
+
+ // An implementation of equality comparison that is optimized for
+ // random access iterators.
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2 >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ std::random_access_iterator_tag,
+ std::random_access_iterator_tag )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2);
+ }
+
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2, pred);
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2 >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2 )
+ {
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+ return equal_impl(first1, last1, first2, last2, tag1, tag2);
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+ return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
+ }
+
+ }
+
+ /// \brief template function equal
+ ///
+ /// range-based version of the equal std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::equal(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2) );
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::equal(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/equal_range.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/equal_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,74 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function equal_range
+ ///
+ /// range-based version of the equal_range std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre SortPredicate is a model of the BinaryPredicateConcept
+ template<class ForwardRange, class Value>
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+ >
+ equal_range(ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::equal_range(boost::begin(rng), boost::end(rng), val);
+ }
+
+ /// \overload
+ template<class ForwardRange, class Value>
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
+ >
+ equal_range(const ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::equal_range(boost::begin(rng), boost::end(rng), val);
+ }
+
+ /// \overload
+ template<class ForwardRange, class Value, class SortPredicate>
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+ >
+ equal_range(ForwardRange& rng, const Value& val, SortPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
+ }
+
+ /// \overload
+ template<class ForwardRange, class Value, class SortPredicate>
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
+ >
+ equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/fill.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/fill.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,34 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function fill
+ ///
+ /// range-based version of the fill std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Value >
+ inline ForwardRange& fill(ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::fill(boost::begin(rng), boost::end(rng), val);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/fill_n.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/fill_n.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FILL_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FILL_N_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function fill_n
+ ///
+ /// range-based version of the fill_n std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Size, class Value >
+ inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n );
+ std::fill_n(boost::begin(rng), n, val);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/find.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/find.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,66 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function find
+ ///
+ /// range-based version of the find std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ template< class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
+ find( SinglePassRange& rng, const Value& val )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::find(boost::begin(rng), boost::end(rng), val);
+ }
+ /// \overload
+ template< class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
+ find( const SinglePassRange& rng, const Value& val )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::find(boost::begin(rng), boost::end(rng), val);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+ find( SinglePassRange& rng, const Value& val )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return range_return<SinglePassRange,re>::
+ pack(std::find(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class SinglePassRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
+ find( const SinglePassRange& rng, const Value& val )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return range_return<const SinglePassRange,re>::
+ pack(std::find(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/find_end.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/find_end.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,136 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function find_end
+ ///
+ /// range-based version of the find_end std algorithm
+ ///
+ /// \pre ForwardRange1 is a model of the ForwardRangeConcept
+ /// \pre ForwardRange2 is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type
+ find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+ find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+ find_end(ForwardRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+ find_end(ForwardRange1 const & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_end(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+ find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+ find_end(const ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<const ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+ find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+ find_end(const ForwardRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<const ForwardRange1,re>::
+ pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/find_first_of.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/find_first_of.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,139 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function find_first_of
+ ///
+ /// range-based version of the find_first_of std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre ForwardRange2 is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+ find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
+ find_first_of(SinglePassRange1 const & rng1, ForwardRange2 const & rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+ find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
+ find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+// range return overloads
+ /// \overload
+ template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+ find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
+ find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<const SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class SinglePassRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+ find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class SinglePassRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange1,re>::type
+ find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+
+ return range_return<const SinglePassRange1,re>::
+ pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),pred),
+ rng1);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/find_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/find_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,69 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function find_if
+ ///
+ /// range-based version of the find_if std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+ template< class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
+ find_if( SinglePassRange& rng, UnaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::find_if(boost::begin(rng), boost::end(rng), pred);
+ }
+ /// \overload
+ template< class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type
+ find_if( const SinglePassRange& rng, UnaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::find_if(boost::begin(rng), boost::end(rng), pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+ find_if( SinglePassRange& rng, UnaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return range_return<SinglePassRange,re>::
+ pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class SinglePassRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const SinglePassRange,re>::type
+ find_if( const SinglePassRange& rng, UnaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return range_return<const SinglePassRange,re>::
+ pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/for_each.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/for_each.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,42 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function for_each
+ ///
+ /// range-based version of the for_each std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre UnaryFunction is a model of the UnaryFunctionConcept
+ template< class SinglePassRange, class UnaryFunction >
+ inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun)
+ {
+ boost::function_requires< SinglePassRangeConcept< SinglePassRange > >();
+ return std::for_each(boost::begin(rng),boost::end(rng),fun);
+ }
+
+ /// \overload
+ template< class SinglePassRange, class UnaryFunction >
+ inline UnaryFunction for_each(SinglePassRange const & rng, UnaryFunction fun)
+ {
+ boost::function_requires< SinglePassRangeConcept< SinglePassRange > >();
+ return std::for_each(boost::begin(rng),boost::end(rng),fun);
+ }
+} // namespace boost
+
+#endif // include guard

Added: trunk/boost/range/algorithm/generate.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/generate.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,44 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_GENERATE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_GENERATE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function generate
+ ///
+ /// range-based version of the generate std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre Generator is a model of the UnaryFunctionConcept
+ template< class ForwardRange, class Generator >
+ inline ForwardRange& generate( ForwardRange& rng, Generator gen )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::generate(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+ }
+
+ /// \overload
+ template< class ForwardRange, class Generator >
+ inline const ForwardRange& generate(const ForwardRange& rng, Generator gen)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::generate(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/heap_algorithm.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/heap_algorithm.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,169 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function push_heap
+ ///
+ /// range-based version of the push_heap std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void push_heap(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::push_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void push_heap(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::push_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void push_heap(RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void push_heap(const RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \brief template function pop_heap
+ ///
+ /// range-based version of the pop_heap std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void pop_heap(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::pop_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void pop_heap(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::pop_heap(boost::begin(rng),boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void pop_heap(RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void pop_heap(const RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \brief template function make_heap
+ ///
+ /// range-based version of the make_heap std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void make_heap(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::make_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void make_heap(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::make_heap(boost::begin(rng),boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void make_heap(RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void make_heap(const RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \brief template function sort_heap
+ ///
+ /// range-based version of the sort_heap std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void sort_heap(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void sort_heap(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort_heap(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void sort_heap(RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Compare>
+ inline void sort_heap(const RandomAccessRange& rng, Compare comp_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/inplace_merge.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/inplace_merge.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function inplace_merge
+ ///
+ /// range-based version of the inplace_merge std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class BidirectionalRange>
+ inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type middle)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class BidirectionalRange>
+ inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class BinaryPredicate>
+ inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<BidirectionalRange>::type middle,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
+ return rng;
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class BinaryPredicate>
+ inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
+ BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/lexicographical_compare.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/lexicographical_compare.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function lexicographic_compare
+ ///
+ /// range-based version of the lexicographic_compare std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ template<class SinglePassRange1, class SinglePassRange2>
+ inline bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class BinaryPredicate>
+ inline bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/lower_bound.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/lower_bound.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_LOWER_BOUND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_LOWER_BOUND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function lower_bound
+ ///
+ /// range-based version of the lower_bound std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ lower_bound( ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val);
+ }
+ /// \overload
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ lower_bound( const ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val);
+ }
+ /// \overload
+ template< class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
+ }
+ /// \overload
+ template< class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ lower_bound( ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ lower_bound( const ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/max_element.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/max_element.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,109 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function max_element
+ ///
+ /// range-based version of the max_element std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ max_element(ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::max_element(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ max_element(const ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::max_element(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ max_element(ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::max_element(boost::begin(rng), boost::end(rng), pred);
+ }
+
+ /// \overload
+ template<class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ max_element(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::max_element(boost::begin(rng), boost::end(rng), pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template<range_return_value re, class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ max_element(ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::pack(
+ std::max_element(boost::begin(rng), boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ max_element(const ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::pack(
+ std::max_element(boost::begin(rng), boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ max_element(ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::pack(
+ std::max_element(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ max_element(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::pack(
+ std::max_element(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/merge.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/merge.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MERGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MERGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function merge
+ ///
+ /// range-based version of the merge std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ ///
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+ inline OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::merge(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+ inline OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::merge(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/min_element.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/min_element.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,109 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function min_element
+ ///
+ /// range-based version of the min_element std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ min_element(ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::min_element(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ min_element(const ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::min_element(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ min_element(ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::min_element(boost::begin(rng), boost::end(rng), pred);
+ }
+
+ /// \overload
+ template<class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ min_element(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::min_element(boost::begin(rng), boost::end(rng), pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template<range_return_value re, class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ min_element(ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::pack(
+ std::min_element(boost::begin(rng), boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange>
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ min_element(const ForwardRange& rng)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::pack(
+ std::min_element(boost::begin(rng), boost::end(rng)),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ min_element(ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::pack(
+ std::min_element(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class ForwardRange, class BinaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ min_element(const ForwardRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::pack(
+ std::min_element(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/mismatch.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/mismatch.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,182 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MISMATCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MISMATCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2 >
+ inline std::pair<SinglePassTraversalReadableIterator1,
+ SinglePassTraversalReadableIterator2>
+ mismatch_impl(SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2)
+ {
+ while (first1 != last1 && first2 != last2 && *first1 == *first2)
+ {
+ ++first1;
+ ++first2;
+ }
+ return std::pair<SinglePassTraversalReadableIterator1,
+ SinglePassTraversalReadableIterator2>(first1, first2);
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline std::pair<SinglePassTraversalReadableIterator1,
+ SinglePassTraversalReadableIterator2>
+ mismatch_impl(SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred)
+ {
+ while (first1 != last1 && first2 != last2 && pred(*first1, *first2))
+ {
+ ++first1;
+ ++first2;
+ }
+ return std::pair<SinglePassTraversalReadableIterator1,
+ SinglePassTraversalReadableIterator2>(first1, first2);
+ }
+ }
+
+ /// \brief template function mismatch
+ ///
+ /// range-based version of the mismatch std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+ mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+ mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+ mismatch(SinglePassRange1& rng1, SinglePassRange2 & rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+ mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+ mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+ mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+ mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline std::pair<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+ mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+
+ return range_detail::mismatch_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/nth_element.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/nth_element.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function nth_element
+ ///
+ /// range-based version of the nth_element std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void nth_element(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::nth_element(boost::begin(rng), nth, boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void nth_element(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::nth_element(boost::begin(rng),nth,boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline void nth_element(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline void nth_element(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::nth_element(boost::begin(rng),nth,boost::end(rng), sort_pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/partial_sort.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/partial_sort.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,65 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function partial_sort
+ ///
+ /// range-based version of the partial_sort std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline void partial_sort(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline void partial_sort(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng));
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline void partial_sort(RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng),
+ sort_pred);
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline void partial_sort(const RandomAccessRange& rng,
+ BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::partial_sort(boost::begin(rng), middle, boost::end(rng), sort_pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/partial_sort_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/partial_sort_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function partial_sort_copy
+ ///
+ /// range-based version of the partial_sort_copy std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre RandomAccessRange is a model of the Mutable_RandomAccessRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<typename SinglePassRange, typename RandomAccessRange>
+ inline typename range_iterator<RandomAccessRange>::type
+ partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2)
+ {
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
+ BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<typename range_value<SinglePassRange>::type>));
+
+ return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+ }
+
+ /// \overload
+ template<typename SinglePassRange, typename RandomAccessRange,
+ typename BinaryPredicate>
+ inline typename range_iterator<RandomAccessRange>::type
+ partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2,
+ BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((WriteableRandomAccessRangeConcept<RandomAccessRange>));
+ BOOST_CONCEPT_ASSERT((range_detail::SameTypeConcept<typename range_value<SinglePassRange>::type, typename range_value<RandomAccessRange>::type>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, typename range_value<RandomAccessRange>::type, typename range_value<RandomAccessRange>::type>));
+
+ return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/partition.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/partition.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTITION__HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTITION__HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function partition
+ ///
+ /// range-based version of the partition std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template<class ForwardRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ partition(ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::partition(boost::begin(rng),boost::end(rng),pred);
+ }
+
+ /// \overload
+ template<class ForwardRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ partition(const ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::partition(boost::begin(rng),boost::end(rng),pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class ForwardRange,
+ class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ partition(ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::range_return<ForwardRange,re>::
+ pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange,
+ class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ partition(const ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::range_return<const ForwardRange,re>::
+ pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/permutation.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/permutation.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,117 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PERMUTATION_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PERMUTATION_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function next_permutation
+ ///
+ /// range-based version of the next_permutation std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class BidirectionalRange>
+ inline bool next_permutation(BidirectionalRange& rng)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::next_permutation(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class BidirectionalRange>
+ inline bool next_permutation(const BidirectionalRange& rng)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::next_permutation(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class Compare>
+ inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::next_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class Compare>
+ inline bool next_permutation(const BidirectionalRange& rng,
+ Compare comp_pred)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::next_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+ }
+
+ /// \brief template function prev_permutation
+ ///
+ /// range-based version of the prev_permutation std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ /// \pre Compare is a model of the BinaryPredicateConcept
+ template<class BidirectionalRange>
+ inline bool prev_permutation(BidirectionalRange& rng)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::prev_permutation(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class BidirectionalRange>
+ inline bool prev_permutation(const BidirectionalRange& rng)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::prev_permutation(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class Compare>
+ inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::prev_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class Compare>
+ inline bool prev_permutation(const BidirectionalRange& rng,
+ Compare comp_pred)
+ {
+ boost::function_requires<
+ BidirectionalRangeConcept<BidirectionalRange> >();
+
+ return std::prev_permutation(boost::begin(rng), boost::end(rng),
+ comp_pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/random_shuffle.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/random_shuffle.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function random_shuffle
+ ///
+ /// range-based version of the random_shuffle std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre Generator is a model of the UnaryFunctionConcept
+ template<class RandomAccessRange>
+ inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::random_shuffle(boost::begin(rng), boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::random_shuffle(boost::begin(rng),boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Generator>
+ inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class Generator>
+ inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/remove.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/remove.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,70 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function remove
+ ///
+ /// range-based version of the remove std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ remove(ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::remove(boost::begin(rng),boost::end(rng),val);
+ }
+
+ /// \overload
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ remove(const ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::remove(boost::begin(rng),boost::end(rng),val);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ remove(ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+
+ return range_return<ForwardRange,re>::pack(
+ std::remove(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ remove(const ForwardRange& rng, const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+
+ return range_return<const ForwardRange,re>::pack(
+ std::remove(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/remove_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/remove_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,38 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function remove_copy
+ ///
+ /// range-based version of the remove_copy std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre Value is a model of the EqualityComparableConcept
+ /// \pre Objects of type Value can be compared for equality with objects of
+ /// InputIterator's value type.
+ template< class SinglePassRange, class OutputIterator, class Value >
+ inline OutputIterator
+ remove_copy(SinglePassRange& rng, OutputIterator out_it, const Value& val)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/remove_copy_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/remove_copy_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,38 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function remove_copy_if
+ ///
+ /// range-based version of the remove_copy_if std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre Predicate is a model of the PredicateConcept
+ /// \pre InputIterator's value type is convertible to Predicate's argument type
+ /// \pre out_it is not an iterator in the range rng
+ template< class SinglePassRange, class OutputIterator, class Predicate >
+ inline OutputIterator
+ remove_copy_if(SinglePassRange& rng, OutputIterator out_it, Predicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::remove_copy_if(boost::begin(rng), boost::end(rng), out_it, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/remove_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/remove_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,70 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function remove_if
+ ///
+ /// range-based version of the remove_if std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+ template< class ForwardRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+ remove_if(ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::remove_if(boost::begin(rng), boost::end(rng), pred);
+ }
+
+ /// \overload
+ template< class ForwardRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
+ remove_if(const ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::remove_if(boost::begin(rng),boost::end(rng),pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class ForwardRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ remove_if(ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::pack(
+ std::remove_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange, class UnaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ remove_if(const ForwardRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::pack(
+ std::remove_if(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/replace.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/replace.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function replace
+ ///
+ /// range-based version of the replace std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Value >
+ inline ForwardRange&
+ replace(ForwardRange& rng, const Value& what,
+ const Value& with_what)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::replace(boost::begin(rng), boost::end(rng), what, with_what);
+ return rng;
+ }
+
+ /// \overload
+ template< class ForwardRange, class Value >
+ inline const ForwardRange&
+ replace(const ForwardRange& rng, const Value& what,
+ const Value& with_what)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::replace(boost::begin(rng), boost::end(rng), what, with_what);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/replace_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/replace_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function replace_copy
+ ///
+ /// range-based version of the replace_copy std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class OutputIterator, class Value >
+ inline OutputIterator
+ replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
+ const Value& with_what)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
+ what, with_what);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/replace_copy_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/replace_copy_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,40 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function replace_copy_if
+ ///
+ /// range-based version of the replace_copy_if std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre Predicate is a model of the PredicateConcept
+ /// \pre Value is convertible to Predicate's argument type
+ /// \pre Value is Assignable
+ /// \pre Value is convertible to a type in OutputIterator's set of value types.
+ template< class ForwardRange, class OutputIterator, class Predicate, class Value >
+ inline OutputIterator
+ replace_copy_if(ForwardRange& rng, OutputIterator out_it, Predicate pred,
+ const Value& with_what)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it,
+ pred, with_what);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/replace_if.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/replace_if.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,49 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function replace_if
+ ///
+ /// range-based version of the replace_if std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+ template< class ForwardRange, class UnaryPredicate, class Value >
+ inline ForwardRange&
+ replace_if(ForwardRange& rng, UnaryPredicate pred,
+ const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
+ return rng;
+ }
+
+ /// \overload
+ template< class ForwardRange, class UnaryPredicate, class Value >
+ inline const ForwardRange&
+ replace_if(const ForwardRange& rng, UnaryPredicate pred,
+ const Value& val)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
+ return rng;
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/reverse.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/reverse.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,44 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REVERSE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REVERSE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function reverse
+ ///
+ /// range-based version of the reverse std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ template<class BidirectionalRange>
+ inline BidirectionalRange& reverse(BidirectionalRange& rng)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::reverse(boost::begin(rng), boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class BidirectionalRange>
+ inline const BidirectionalRange& reverse(const BidirectionalRange& rng)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ std::reverse(boost::begin(rng), boost::end(rng));
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/reverse_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/reverse_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,42 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/iterator/iterator_concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function reverse_copy
+ ///
+ /// range-based version of the reverse_copy std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ template<typename BidirectionalRange, typename OutputIterator>
+ inline OutputIterator reverse_copy(BidirectionalRange& rng, OutputIterator out)
+ {
+ BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
+ return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
+ }
+
+ /// \overload
+ template<typename BidirectionalRange, typename OutputIterator>
+ inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
+ {
+ BOOST_CONCEPT_ASSERT((BidirectionalRangeConcept<BidirectionalRange>));
+ return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/rotate.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/rotate.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,46 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ROTATE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ROTATE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function rotate
+ ///
+ /// range-based version of the rotate std algorithm
+ ///
+ /// \pre Rng meets the requirements for a Forward range
+ template<typename ForwardRange>
+ inline ForwardRange& rotate(ForwardRange& rng,
+ typename range_iterator<ForwardRange>::type middle)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ std::rotate(boost::begin(rng), middle, boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<typename ForwardRange>
+ inline const ForwardRange&
+ rotate(const ForwardRange& rng,
+ typename range_iterator<const ForwardRange>::type middle)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ std::rotate(boost::begin(rng), middle, boost::end(rng));
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/rotate_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/rotate_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,38 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function rotate
+ ///
+ /// range-based version of the rotate std algorithm
+ ///
+ /// \pre Rng meets the requirements for a Forward range
+ template<typename ForwardRange, typename OutputIterator>
+ inline OutputIterator rotate_copy(
+ const ForwardRange& rng,
+ typename range_iterator<const ForwardRange>::type middle,
+ OutputIterator target
+ )
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/search.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/search.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,131 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SEARCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SEARCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function search
+ ///
+ /// range-based version of the search std algorithm
+ ///
+ /// \pre ForwardRange1 is a model of the ForwardRangeConcept
+ /// \pre ForwardRange2 is a model of the ForwardRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+ search(ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+ search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+ search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+ /// \overload
+ template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+ search(const ForwardRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+ search(ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<ForwardRange1,re>::
+ pack(std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+ search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<const ForwardRange1,re>::
+ pack(std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2)),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+ search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<ForwardRange1,re>::
+ pack(std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred),
+ rng1);
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+ search(const ForwardRange1& rng1, const ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange1> >();
+ boost::function_requires< ForwardRangeConcept<ForwardRange2> >();
+ return range_return<const ForwardRange1,re>::
+ pack(std::search(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2),pred),
+ rng1);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/search_n.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/search_n.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,140 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SEARCH_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SEARCH_N_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function search
+ ///
+ /// range-based version of the search std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ /// \pre Integer is an integral type
+ /// \pre Value is a model of the EqualityComparableConcept
+ /// \pre ForwardRange's value type is a model of the EqualityComparableConcept
+ /// \pre Object's of ForwardRange's value type can be compared for equality with Objects of type Value
+ template< typename ForwardRange, typename Integer, typename Value >
+ inline typename range_iterator<ForwardRange>::type
+ search_n(ForwardRange& rng, Integer count, const Value& value)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::search_n(boost::begin(rng),boost::end(rng), count, value);
+ }
+
+ /// \overload
+ template< typename ForwardRange, typename Integer, typename Value >
+ inline typename range_iterator<const ForwardRange>::type
+ search_n(const ForwardRange& rng, Integer count, const Value& value)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return std::search_n(boost::begin(rng), boost::end(rng), count, value);
+ }
+
+ /// \overload
+ template< typename ForwardRange, typename Integer, class Value,
+ typename BinaryPredicate >
+ inline typename range_iterator<ForwardRange>::type
+ search_n(ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate binary_pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<ForwardRange>::type, const Value&>));
+ return std::search_n(boost::begin(rng), boost::end(rng),
+ count, value, binary_pred);
+ }
+
+ /// \overload
+ template< typename ForwardRange, typename Integer, typename Value,
+ typename BinaryPredicate >
+ inline typename range_iterator<const ForwardRange>::type
+ search_n(const ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate binary_pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<const ForwardRange>::type, const Value&>));
+ return std::search_n(boost::begin(rng), boost::end(rng),
+ count, value, binary_pred);
+ }
+
+// range_return overloads
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename Integer,
+ typename Value >
+ inline typename range_return<ForwardRange,re>::type
+ search_n(ForwardRange& rng, Integer count, const Value& value)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<ForwardRange,re>::
+ pack(std::search_n(boost::begin(rng),boost::end(rng),
+ count, value),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename Integer,
+ class Value >
+ inline typename range_return<const ForwardRange,re>::type
+ search_n(const ForwardRange& rng, Integer count, const Value& value)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ return range_return<const ForwardRange,re>::
+ pack(std::search_n(boost::begin(rng), boost::end(rng),
+ count, value),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename Integer,
+ typename Value, typename BinaryPredicate >
+ inline typename range_return<ForwardRange,re>::type
+ search_n(ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<ForwardRange>::type,
+ const Value&>));
+ return range_return<ForwardRange,re>::
+ pack(std::search_n(boost::begin(rng), boost::end(rng),
+ count, value, pred),
+ rng);
+ }
+
+ /// \overload
+ template< range_return_value re, typename ForwardRange, typename Integer,
+ typename Value, typename BinaryPredicate >
+ inline typename range_return<const ForwardRange,re>::type
+ search_n(const ForwardRange& rng, Integer count, const Value& value,
+ BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+ typename range_value<const ForwardRange>::type,
+ const Value&>));
+ return range_return<const ForwardRange,re>::
+ pack(std::search_n(boost::begin(rng), boost::end(rng),
+ count, value, pred),
+ rng);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/set_algorithm.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/set_algorithm.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,188 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function includes
+ ///
+ /// range-based version of the includes std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class SinglePassRange1, class SinglePassRange2>
+ inline bool includes(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::includes(boost::begin(rng1),boost::end(rng1),
+ boost::begin(rng2),boost::end(rng2));
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class BinaryPredicate>
+ inline bool includes(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::includes(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), pred);
+ }
+
+ /// \brief template function set_union
+ ///
+ /// range-based version of the set_union std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+ inline OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_union(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+ inline OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_union(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+ }
+
+ /// \brief template function set_intersection
+ ///
+ /// range-based version of the set_intersection std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+ inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+ inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ out, pred);
+ }
+
+ /// \brief template function set_difference
+ ///
+ /// range-based version of the set_difference std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+ inline OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_difference(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+ inline OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_difference(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+ }
+
+ /// \brief template function set_symmetric_difference
+ ///
+ /// range-based version of the set_symmetric_difference std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator>
+ inline OutputIterator
+ set_symmetric_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out);
+ }
+
+ /// \overload
+ template<class SinglePassRange1, class SinglePassRange2,
+ class OutputIterator, class BinaryPredicate>
+ inline OutputIterator
+ set_symmetric_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return std::set_symmetric_difference(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), out, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/sort.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/sort.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,63 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function sort
+ ///
+ /// range-based version of the sort std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline RandomAccessRange& sort(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort(boost::begin(rng), boost::end(rng));
+
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline const RandomAccessRange& sort(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort(boost::begin(rng),boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort(boost::begin(rng), boost::end(rng), pred);
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::sort(boost::begin(rng), boost::end(rng), pred);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/stable_partition.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/stable_partition.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function stable_partition
+ ///
+ /// range-based version of the stable_partition std algorithm
+ ///
+ /// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+ /// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+ template<class BidirectionalRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type
+ stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ return std::stable_partition(boost::begin(rng), boost::end(rng), pred);
+ }
+
+ /// \overload
+ template<class BidirectionalRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const BidirectionalRange>::type
+ stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ return std::stable_partition(boost::begin(rng),boost::end(rng),pred);
+ }
+
+// range_return overloads
+ template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type
+ stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ return range_return<BidirectionalRange,re>::pack(
+ std::stable_partition(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+ /// \overload
+ template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
+ inline BOOST_DEDUCED_TYPENAME range_return<const BidirectionalRange,re>::type
+ stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
+ {
+ boost::function_requires< BidirectionalRangeConcept<BidirectionalRange> >();
+ return range_return<const BidirectionalRange,re>::pack(
+ std::stable_partition(boost::begin(rng),boost::end(rng),pred),
+ rng);
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/stable_sort.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/stable_sort.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_STABLE_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_STABLE_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function stable_sort
+ ///
+ /// range-based version of the stable_sort std algorithm
+ ///
+ /// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template<class RandomAccessRange>
+ inline RandomAccessRange& stable_sort(RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::stable_sort(boost::begin(rng), boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange>
+ inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::stable_sort(boost::begin(rng), boost::end(rng));
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
+ return rng;
+ }
+
+ /// \overload
+ template<class RandomAccessRange, class BinaryPredicate>
+ inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred)
+ {
+ boost::function_requires< RandomAccessRangeConcept<RandomAccessRange> >();
+ std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
+ return rng;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/swap_ranges.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/swap_ranges.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,81 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<typename Iterator1, typename Iterator2>
+ void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
+ Iterator2 it2, Iterator2 last2,
+ single_pass_traversal_tag,
+ single_pass_traversal_tag)
+ {
+ ignore_unused_variable_warning(last2);
+ for (; it1 != last1; ++it1, ++it2)
+ {
+ BOOST_ASSERT( it2 != last2 );
+ std::iter_swap(it1, it2);
+ }
+ }
+
+ template<typename Iterator1, typename Iterator2>
+ void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
+ Iterator2 it2, Iterator2 last2,
+ random_access_traversal_tag,
+ random_access_traversal_tag)
+ {
+ ignore_unused_variable_warning(last2);
+ BOOST_ASSERT( last2 - it2 >= last1 - it1 );
+ std::swap_ranges(it1, last1, it2);
+ }
+
+ template<typename Iterator1, typename Iterator2>
+ void swap_ranges_impl(Iterator1 first1, Iterator1 last1,
+ Iterator2 first2, Iterator2 last2)
+ {
+ swap_ranges_impl(first1, last1, first2, last2,
+ typename iterator_traversal<Iterator1>::type(),
+ typename iterator_traversal<Iterator2>::type());
+ }
+ } // namespace range_detail
+
+ /// \brief template function swap_ranges
+ ///
+ /// range-based version of the swap_ranges std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ template< typename SinglePassRange1, typename SinglePassRange2 >
+ inline SinglePassRange2&
+ swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
+ {
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));
+
+ boost::range_detail::swap_ranges_impl(
+ boost::begin(range1), boost::end(range1),
+ boost::begin(range2), boost::end(range2));
+
+ return range2;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/transform.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/transform.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,85 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_TRANSFORM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_TRANSFORM_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function transform
+ ///
+ /// range-based version of the transform std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre UnaryOperation is a model of the UnaryFunctionConcept
+ /// \pre BinaryOperation is a model of the BinaryFunctionConcept
+ template< class SinglePassRange1,
+ class OutputIterator,
+ class UnaryOperation >
+ inline OutputIterator
+ transform(const SinglePassRange1& rng,
+ OutputIterator out,
+ UnaryOperation fun)
+ {
+ return std::transform(boost::begin(rng),boost::end(rng),out,fun);
+ }
+
+ namespace range_detail
+ {
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class OutputIterator,
+ class BinaryFunction >
+ inline OutputIterator
+ transform_impl(SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ OutputIterator out,
+ BinaryFunction fn)
+ {
+ for (; first1 != last1; ++first1, ++first2)
+ {
+ BOOST_ASSERT( first2 != last2 );
+ *out = fn(*first1, *first2);
+ ++out;
+ }
+ return out;
+ }
+ }
+
+ /// \overload
+ template< class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryOperation >
+ inline OutputIterator
+ transform(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryOperation fun)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ return range_detail::transform_impl(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ out, fun);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/unique.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/unique.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,101 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UNIQUE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UNIQUE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function unique
+ ///
+ /// range-based version of the unique std algorithm
+ ///
+ /// \pre Rng meets the requirements for a Forward range
+ template< range_return_value re, class ForwardRange >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ unique( ForwardRange& rng )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack( std::unique( boost::begin(rng),
+ boost::end(rng)), rng );
+ }
+
+ /// \overload
+ template< range_return_value re, class ForwardRange >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ unique( const ForwardRange& rng )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack( std::unique( boost::begin(rng),
+ boost::end(rng)), rng );
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ unique( ForwardRange& rng, BinaryPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack(std::unique(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ unique( const ForwardRange& rng, BinaryPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack(std::unique(boost::begin(rng), boost::end(rng), pred),
+ rng);
+ }
+
+ /// \overload
+ template< class ForwardRange >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
+ unique( ForwardRange& rng )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::unique<return_begin_found>(rng);
+ }
+ /// \overload
+ template< class ForwardRange >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type
+ unique( const ForwardRange& rng )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::unique<return_begin_found>(rng);
+ }
+ /// \overload
+ template< class ForwardRange, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
+ unique( ForwardRange& rng, BinaryPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::unique<return_begin_found>(rng);
+ }
+ /// \overload
+ template< class ForwardRange, class BinaryPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ unique( const ForwardRange& rng, BinaryPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return boost::unique<return_begin_found>(rng, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/unique_copy.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/unique_copy.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function unique_copy
+ ///
+ /// range-based version of the unique_copy std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange, class OutputIterator >
+ inline OutputIterator
+ unique_copy( const SinglePassRange& rng, OutputIterator out_it )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::unique_copy(boost::begin(rng), boost::end(rng), out_it);
+ }
+ /// \overload
+ template< class SinglePassRange, class OutputIterator, class BinaryPredicate >
+ inline OutputIterator
+ unique_copy( const SinglePassRange& rng, OutputIterator out_it,
+ BinaryPredicate pred )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm/upper_bound.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm/upper_bound.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,101 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UPPER_BOUND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UPPER_BOUND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function upper_bound
+ ///
+ /// range-based version of the upper_bound std algorithm
+ ///
+ /// \pre ForwardRange is a model of the ForwardRangeConcept
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ upper_bound( ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val);
+ }
+ /// \overload
+ template< class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ upper_bound( const ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val);
+ }
+ /// \overload
+ template< class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+ upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
+ }
+ /// \overload
+ template< class ForwardRange, class Value, class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+ upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ upper_bound( ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ upper_bound( const ForwardRange& rng, Value val )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value,
+ class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+ upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+ }
+ /// \overload
+ template< range_return_value re, class ForwardRange, class Value,
+ class SortPredicate >
+ inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+ upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
+ {
+ boost::function_requires< ForwardRangeConcept<ForwardRange> >();
+ return range_return<const ForwardRange,re>::
+ pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
+ rng);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,27 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Copyright Thorsten Ottosen 2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_HPP
+#define BOOST_RANGE_ALGORITHM_EXT_HPP
+
+#include <boost/range/algorithm_ext/copy_n.hpp>
+#include <boost/range/algorithm_ext/for_each.hpp>
+#include <boost/range/algorithm_ext/is_sorted.hpp>
+#include <boost/range/algorithm_ext/overwrite.hpp>
+#include <boost/range/algorithm_ext/push_back.hpp>
+#include <boost/range/algorithm_ext/push_front.hpp>
+#include <boost/range/algorithm_ext/insert.hpp>
+#include <boost/range/algorithm_ext/erase.hpp>
+
+#endif

Added: trunk/boost/range/algorithm_ext/copy_n.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/copy_n.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_N_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/distance.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ /// \brief template function copy
+ ///
+ /// range-based version of the copy std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ /// \pre OutputIterator is a model of the OutputIteratorConcept
+ /// \pre 0 <= n < distance(rng)
+ template< class SinglePassRange, class Size, class OutputIterator >
+ inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out)
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ BOOST_ASSERT( n < static_cast<Size>(boost::distance(rng)) );
+ BOOST_ASSERT( n >= static_cast<Size>(0) );
+
+ BOOST_DEDUCED_TYPENAME range_const_iterator<SinglePassRange>::type source = boost::begin(rng);
+
+ for (Size i = 0; i < n; ++i, ++out, ++source)
+ *out = *source;
+
+ return out;
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/erase.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/erase.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_ERASE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_ERASE_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ template< class Container >
+ inline void erase( Container& on,
+ iterator_range<BOOST_DEDUCED_TYPENAME Container::iterator> to_erase )
+ {
+ on.erase( boost::begin(to_erase), boost::end(to_erase) );
+ }
+
+ template< class Container, class T >
+ inline void remove_erase( Container& on, const T& val )
+ {
+ on.erase(
+ std::remove(boost::begin(on), boost::end(on), val),
+ boost::end(on));
+ }
+
+ template< class Container, class Pred >
+ inline void remove_erase_if( Container& on, Pred pred )
+ {
+ on.erase(
+ std::remove_if(boost::begin(on), boost::end(on), pred),
+ boost::end(on));
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/for_each.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/for_each.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,65 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<class InputIterator1, class InputIterator2, class Fn2>
+ inline Fn2 for_each_impl(InputIterator1 first1, InputIterator1 last1,
+ InputIterator2 first2, InputIterator2 last2,
+ Fn2 fn)
+ {
+ for (; first1 != last1 && first2 != last2; ++first1, ++first2)
+ {
+ fn(*first1, *first2);
+ }
+ return fn;
+ }
+ }
+
+ template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+ inline Fn2 for_each(const SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn)
+ {
+ return range_detail::for_each_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), fn);
+ }
+
+ template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+ inline Fn2 for_each(const SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn)
+ {
+ return range_detail::for_each_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), fn);
+ }
+
+ template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+ inline Fn2 for_each(SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn)
+ {
+ return range_detail::for_each_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), fn);
+ }
+
+ template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+ inline Fn2 for_each(SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn)
+ {
+ return range_detail::for_each_impl(boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2), fn);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/insert.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/insert.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ template< class Container, class Range >
+ inline void insert( Container& on,
+ BOOST_DEDUCED_TYPENAME Container::iterator before,
+ const Range& from )
+ {
+ BOOST_ASSERT( (void*)&on != (void*)&from &&
+ "cannot copy from a container to itself" );
+ on.insert( before, boost::begin(from), boost::end(from) );
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/is_sorted.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/is_sorted.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,65 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<typename ForwardIterator>
+ inline bool is_sorted(ForwardIterator first, ForwardIterator last)
+ {
+ for (ForwardIterator next = first; first != last && ++next != last; ++first)
+ if (*next < *first)
+ return false;
+ return true;
+ }
+
+ template<typename ForwardIterator, typename BinaryPredicate>
+ inline bool is_sorted(ForwardIterator first, ForwardIterator last, BinaryPredicate pred)
+ {
+ for (ForwardIterator next = first; first != last && ++next != last; ++first)
+ if (pred(*next, *first))
+ return false;
+ return true;
+ }
+ }
+
+ /// \brief template function count
+ ///
+ /// range-based version of the count std algorithm
+ ///
+ /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+ template<typename SinglePassRange>
+ inline bool is_sorted(const SinglePassRange& rng)
+ {
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((LessThanComparableConcept<typename range_value<SinglePassRange>::type>));
+ return range_detail::is_sorted(boost::begin(rng), boost::end(rng));
+ }
+
+ /// \overload
+ template<typename SinglePassRange, typename BinaryPredicate>
+ inline bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred)
+ {
+ BOOST_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+ BOOST_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, typename range_value<SinglePassRange>::type, typename range_value<SinglePassRange>::type>));
+ return range_detail::is_sorted(boost::begin(rng), boost::end(rng), pred);
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/overwrite.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/overwrite.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,46 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline void overwrite( const SinglePassRange1& from, SinglePassRange2& to )
+ {
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+ i = boost::begin(from), e = boost::end(from);
+
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type
+ out = boost::begin(to);
+
+#ifndef NDEBUG
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type
+ last_out = boost::end(to);
+#endif
+
+ for( ; i != e; ++out, ++i )
+ {
+#ifndef NDEBUG
+ BOOST_ASSERT( out != last_out
+ && "out of bounds in boost::overwrite()" );
+#endif
+ *out = *i;
+ }
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/push_back.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/push_back.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,31 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ template< class Container, class Range >
+ inline void push_back( Container& on, const Range& from )
+ {
+ BOOST_ASSERT( (void*)&on != (void*)&from &&
+ "cannot copy from a container to itself" );
+ on.insert( on.end(), boost::begin(from), boost::end(from) );
+ }
+
+}
+
+#endif // include guard

Added: trunk/boost/range/algorithm_ext/push_front.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/algorithm_ext/push_front.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,30 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ template< class Container, class Range >
+ inline void push_front( Container& on, const Range& from )
+ {
+ BOOST_ASSERT( (void*)&on != (void*)&from &&
+ "cannot copy from a container to itself" );
+ on.insert( on.begin(), boost::begin(from), boost::end(from) );
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/combine.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/combine.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,310 @@
+#ifndef BOOST_RANGE_COMBINE_HPP
+#define BOOST_RANGE_COMBINE_HPP
+
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/arithmetic.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ struct void_ { typedef void_ type; };
+ }
+
+ template<> struct range_iterator<detail::void_>
+ {
+ typedef tuples::null_type type;
+ };
+
+ namespace detail
+ {
+ inline tuples::null_type range_begin( void_& )
+ { return tuples::null_type(); }
+
+ inline tuples::null_type range_end( void_& )
+ { return tuples::null_type(); }
+
+ template< class T >
+ struct tuple_iter
+ {
+ typedef typename mpl::eval_if_c< is_same<T,void_>::value,
+ mpl::identity<tuples::null_type>,
+ range_iterator<T> >::type
+ type;
+ };
+
+ template< class Rng1, class Rng2 >
+ struct tuple_range
+ {
+ typedef typename mpl::eval_if_c< is_same<Rng1,void_>::value,
+ void_,
+ mpl::identity<Rng1> >::type
+ type;
+ };
+
+ template
+ <
+ class R1,
+ class R2,
+ class R3,
+ class R4,
+ class R5,
+ class R6
+ >
+ struct generate_tuple
+ {
+ typedef boost::tuple< typename tuple_iter<R1>::type,
+ typename tuple_iter<R2>::type,
+ typename tuple_iter<R3>::type,
+ typename tuple_iter<R4>::type,
+ typename tuple_iter<R5>::type,
+ typename tuple_iter<R6>::type >
+ type;
+
+ static type begin( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+ {
+ return make_tuple( boost::begin(r1),
+ boost::begin(r2),
+ boost::begin(r3),
+ boost::begin(r4),
+ boost::begin(r5),
+ boost::begin(r6) );
+ }
+
+ static type end( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+ {
+ return make_tuple( boost::end(r1),
+ boost::end(r2),
+ boost::end(r3),
+ boost::end(r4),
+ boost::end(r5),
+ boost::end(r6) );
+ }
+ };
+
+ template
+ <
+ class R1,
+ class R2 = void_,
+ class R3 = void_,
+ class R4 = void_,
+ class R5 = void_,
+ class R6 = void_
+ >
+ struct zip_rng
+ : iterator_range<
+ zip_iterator< typename generate_tuple<R1,R2,R3,R4,R5,R6>::type >
+ >
+ {
+ private:
+ typedef generate_tuple<R1,R2,R3,R4,R5,R6>
+ generator;
+ typedef typename generator::type
+ tuple;
+ typedef zip_iterator<tuple>
+ zip_iter;
+ typedef iterator_range<zip_iter>
+ base;
+
+ public:
+ zip_rng( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+ : base( zip_iter( generator::begin(r1,r2,r3,r4,r5,r6) ),
+ zip_iter( generator::end(r1,r2,r3,r4,r5,r6) ) )
+ {
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r2));
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r3));
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r4));
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r5));
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r6));
+ }
+
+ template< class Zip, class Rng >
+ zip_rng( Zip& z, Rng& r )
+ : base( zip_iter( generator::begin( z, r ) ),
+ zip_iter( generator::end( z, r ) ) )
+ {
+
+ // @todo: tuple::begin( should be overloaded for this situation
+ }
+
+ struct tuple_length : tuples::length<tuple>
+ { };
+
+ template< unsigned N >
+ struct get
+ {
+ template< class Z, class R >
+ static typename tuples::element<N,tuple>::type begin( Z& z, R& )
+ {
+ return get<N>( z.begin().get_iterator_tuple() );
+ }
+
+ template< class Z, class R >
+ static typename tuples::element<N,tuple>::type end( Z& z, R& r )
+ {
+ return get<N>( z.end().get_iterator_tuple() );
+ }
+ };
+
+ };
+
+ template< class Rng1, class Rng2 >
+ struct zip_range
+ : iterator_range<
+ zip_iterator<
+ tuple< typename range_iterator<Rng1>::type,
+ typename range_iterator<Rng2>::type >
+ > >
+ {
+ private:
+ typedef zip_iterator<
+ tuple< typename range_iterator<Rng1>::type,
+ typename range_iterator<Rng2>::type >
+ >
+ zip_iter;
+ typedef iterator_range<zip_iter>
+ base;
+
+ public:
+ zip_range( Rng1& r1, Rng2& r2 )
+ : base( zip_iter( make_tuple(boost::begin(r1),
+ boost::begin(r2)) ),
+ zip_iter( make_tuple(boost::end(r1),
+ boost::end(r2)) ) )
+ {
+ BOOST_ASSERT(boost::distance(r1) <= boost::distance(r2));
+ }
+ };
+
+ template< class Rng1, class Rng2, class Rng3 >
+ struct zip_range3
+ : iterator_range<
+ zip_iterator<
+ tuple< typename range_iterator<Rng1>::type,
+ typename range_iterator<Rng2>::type,
+ typename range_iterator<Rng3>::type >
+ > >
+ {
+ private:
+ typedef zip_iterator<
+ tuple< typename range_iterator<Rng1>::type,
+ typename range_iterator<Rng2>::type,
+ typename range_iterator<Rng3>::type >
+ >
+ zip_iter;
+ typedef iterator_range<zip_iter>
+ base;
+
+ public:
+ zip_range3( Rng1& r1, Rng2& r2, Rng3& r3 )
+ : base( zip_iter( make_tuple(boost::begin(r1),
+ boost::begin(r2),
+ boost::begin(r3)) ),
+ zip_iter( make_tuple(boost::end(r1),
+ boost::end(r2),
+ boost::end(r3)) )
+ )
+ {
+ BOOST_ASSERT(distance(r1) <= distance(r2));
+ BOOST_ASSERT(distance(r1) <= distance(r3));
+ }
+ };
+
+
+ struct combine_tag {};
+
+ template< class Rng >
+ inline zip_rng<Rng>
+ operator&( combine_tag, Rng& r )
+ {
+ return zip_rng<Rng>(r);
+ }
+
+ template< class Rng >
+ inline iterator_range<const Rng>
+ operator&( combine_tag, const Rng& r )
+ {
+ return iterator_range<const Rng>(r);
+ }
+
+ template
+ <
+ class R1,
+ class R2,
+ class R3,
+ class R4,
+ class R5,
+ class Rng
+ >
+ inline typename zip_rng<R1,R2,R3,R4,R5>::next
+ operator&( const zip_rng<R1,R2,R3,R4,R5>& zip,
+ Rng& r )
+ {
+ return zip_rng<R1,R2,R3,R4,R5>::next( zip, r );
+ }
+
+ //
+ // This one should be able to be made generic
+ //
+ // template
+ // <
+ // class R1,
+ // class R2 = void,
+ // class R3 = void,
+ // class R4 = void,
+ // class R5 = void,
+ // class R6 = void
+ // >
+ // inline zip_range<R1,R2,R3,R4,R4,R5,R6>::type
+ // x
+ //
+ //
+ /*
+ template< class Rng1, class Rng2, class Rng3 >
+ inline zip_range3<Rng1,Rng2,Rng3>
+ operator&( const zip_range<Rng1,Rng2>& r1, const Rng3& r3 )
+ {
+ return zip_range3<Rn1,Rng2,Rng3>(
+ }*/
+
+ } // namespace 'detail'
+
+ template< class Rng1, class Rng2 >
+ inline detail::zip_range<Rng1,Rng2> combine( Rng1& r1, Rng2& r2 )
+ {
+ return detail::zip_range<Rng1,Rng2>(r1,r2);
+ }
+
+ template< class Rng1, class Rng2 >
+ inline detail::zip_range<const Rng1,Rng2> combine( const Rng1& r1, Rng2& r2 )
+ {
+ return detail::zip_range<const Rng1,Rng2>(r1,r2);
+ }
+
+ template< class Rng1, class Rng2 >
+ inline detail::zip_range<Rng1,const Rng2> combine( Rng1& r1, const Rng2& r2 )
+ {
+ return detail::zip_range<Rng1,Rng2>(r1,r2);
+ }
+
+ template< class Rng1, class Rng2 >
+ inline detail::zip_range<const Rng1,const Rng2> combine( const Rng1& r1, const Rng2& r2 )
+ {
+ return detail::zip_range<const Rng1,const Rng2>(r1,r2);
+ }
+
+ //
+ // @todo: find a solution that scales better
+ // instead of adding 6 overloads!
+ //
+}
+
+#endif

Modified: trunk/boost/range/concepts.hpp
==============================================================================
--- trunk/boost/range/concepts.hpp (original)
+++ trunk/boost/range/concepts.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,5 +1,10 @@
 // Boost.Range library concept checks
 //
+// Copyright Neil Groves 2009. Use, modification and distribution
+// are subject to the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
 // Copyright Daniel Walker 2006. Use, modification and distribution
 // are subject to the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -15,6 +20,9 @@
 #include <boost/iterator/iterator_concepts.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/detail/misc_concept.hpp>
 
 /*!
  * \file
@@ -29,20 +37,15 @@
  * concept.
  *
  * \code
- * function_requires<ForwardRangeConcept<T> >();
+ * BOOST_CONCEPT_ASSERT((ForwardRangeConcept<T>));
  * \endcode
  *
- * An additional concept check is required for the value access
- * property of the range. For example to check for a
- * ForwardReadableRange, the following code is required.
+ * A different concept check is required to ensure writeable value
+ * access. For example to check for a ForwardRange that can be written
+ * to, the following code is required.
  *
  * \code
- * function_requires<ForwardRangeConcept<T> >();
- * function_requires<
- * ReadableIteratorConcept<
- * typename range_iterator<T>::type
- * >
- * >();
+ * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept<T>));
  * \endcode
  *
  * \see http://www.boost.org/libs/range/doc/range.html for details
@@ -55,84 +58,218 @@
 
 namespace boost {
 
+ namespace range_detail {
+
+ // Rationale for the inclusion of redefined iterator concept
+ // classes:
+ //
+ // The Range algorithms often do not require that the iterators are
+ // Assignable, but the correct standard conformant iterators
+ // do require the iterators to be a model of the Assignable concept.
+ // Iterators that contains a functor that is not assignable therefore
+ // are not correct models of the standard iterator concepts,
+ // despite being adequate for most algorithms. An example of this
+ // use case is the combination of the boost::adaptors::filtered
+ // class with a boost::lambda::bind generated functor.
+ // Ultimately modeling the range concepts using composition
+ // with the Boost.Iterator concepts would render the library
+ // incompatible with many common Boost.Lambda expressions.
+ template<typename Iterator>
+ struct IncrementableIteratorConcept : CopyConstructible<Iterator>
+ {
+ typedef typename iterator_traversal<Iterator>::type traversal_category;
+
+ BOOST_CONCEPT_ASSERT((
+ Convertible<
+ traversal_category,
+ incrementable_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(IncrementableIteratorConcept)
+ {
+ ++i;
+ (void)i++;
+ }
+ private:
+ Iterator i;
+ };
+
+ template<typename Iterator>
+ struct SinglePassIteratorConcept
+ : IncrementableIteratorConcept<Iterator>
+ , EqualityComparable<Iterator>
+ {
+ BOOST_CONCEPT_ASSERT((
+ Convertible<
+ typename SinglePassIteratorConcept::traversal_category,
+ single_pass_traversal_tag
+ >));
+ };
+
+ template<typename Iterator>
+ struct ForwardIteratorConcept
+ : SinglePassIteratorConcept<Iterator>
+ , DefaultConstructible<Iterator>
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+
+ BOOST_MPL_ASSERT((is_integral<difference_type>));
+ BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+ BOOST_CONCEPT_ASSERT((
+ Convertible<
+ typename ForwardIteratorConcept::traversal_category,
+ forward_traversal_tag
+ >));
+ };
+
+ template<typename Iterator>
+ struct BidirectionalIteratorConcept
+ : ForwardIteratorConcept<Iterator>
+ {
+ BOOST_CONCEPT_ASSERT((
+ Convertible<
+ typename BidirectionalIteratorConcept::traversal_category,
+ bidirectional_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept)
+ {
+ --i;
+ (void)i--;
+ }
+ private:
+ Iterator i;
+ };
+
+ template<typename Iterator>
+ struct RandomAccessIteratorConcept
+ : BidirectionalIteratorConcept<Iterator>
+ {
+ BOOST_CONCEPT_ASSERT((
+ Convertible<
+ typename RandomAccessIteratorConcept::traversal_category,
+ random_access_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept)
+ {
+ i += n;
+ i = i + n;
+ i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ }
+ private:
+ typename RandomAccessIteratorConcept::difference_type n;
+ Iterator i;
+ Iterator j;
+ };
+
+ } // namespace range_detail
+
     //! Check if a type T models the SinglePassRange range concept.
     template<typename T>
- struct SinglePassRangeConcept
+ struct SinglePassRangeConcept
     {
- typedef typename range_iterator<T const>::type range_const_iterator;
- typedef typename range_iterator<T>::type range_iterator;
+ typedef typename range_iterator<T const>::type const_iterator;
+ typedef typename range_iterator<T>::type iterator;
 
- void constraints()
- {
- function_requires<
- boost_concepts::SinglePassIteratorConcept<
- range_iterator
- >
- >();
- i = boost::begin(a);
- i = boost::end(a);
- const_constraints(a);
+ BOOST_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<iterator>));
+ BOOST_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<const_iterator>));
+
+ BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
+ {
+ // This has been modified from assigning to this->i
+ // (where i was a member variable) to improve
+ // compatibility with Boost.Lambda
+ iterator i1 = boost::begin(*m_range);
+ iterator i2 = boost::end(*m_range);
+
+ ignore_unused_variable_warning(i1);
+ ignore_unused_variable_warning(i2);
+
+ const_constraints(*m_range);
         }
-
- void const_constraints(const T& a)
+
+ private:
+ void const_constraints(const T& const_range)
         {
- ci = boost::begin(a);
- ci = boost::end(a);
+ const_iterator ci1 = boost::begin(const_range);
+ const_iterator ci2 = boost::end(const_range);
+
+ ignore_unused_variable_warning(ci1);
+ ignore_unused_variable_warning(ci2);
         }
- T a;
- range_iterator i;
- range_const_iterator ci;
+
+ // Rationale:
+ // The type of m_range is T* rather than T because it allows
+ // T to be an abstract class. The other obvious alternative of
+ // T& produces a warning on some compilers.
+ T* m_range;
     };
 
     //! Check if a type T models the ForwardRange range concept.
     template<typename T>
- struct ForwardRangeConcept
+ struct ForwardRangeConcept : SinglePassRangeConcept<T>
     {
- void constraints()
+ BOOST_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::iterator>));
+ BOOST_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::const_iterator>));
+ };
+
+ template<typename Range>
+ struct WriteableRangeConcept
+ {
+ typedef typename range_iterator<Range>::type iterator;
+
+ BOOST_CONCEPT_USAGE(WriteableRangeConcept)
         {
- function_requires<
- SinglePassRangeConcept<T>
- >();
- function_requires<
- boost_concepts::ForwardTraversalConcept<
- typename range_iterator<T>::type
- >
- >();
+ *i = v;
         }
+ private:
+ iterator i;
+ typename range_value<Range>::type v;
+ };
+
+ //! Check if a type T models the WriteableForwardRange range concept.
+ template<typename T>
+ struct WriteableForwardRangeConcept
+ : ForwardRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
     };
 
     //! Check if a type T models the BidirectionalRange range concept.
     template<typename T>
- struct BidirectionalRangeConcept
+ struct BidirectionalRangeConcept : ForwardRangeConcept<T>
+ {
+ BOOST_CONCEPT_ASSERT((BidirectionalIteratorConcept<typename BidirectionalRangeConcept::iterator>));
+ BOOST_CONCEPT_ASSERT((BidirectionalIteratorConcept<typename BidirectionalRangeConcept::const_iterator>));
+ };
+
+ //! Check if a type T models the WriteableBidirectionalRange range concept.
+ template<typename T>
+ struct WriteableBidirectionalRangeConcept
+ : BidirectionalRangeConcept<T>
+ , WriteableRangeConcept<T>
     {
- void constraints()
- {
- function_requires<
- ForwardRangeConcept<T>
- >();
- function_requires<
- boost_concepts::BidirectionalTraversalConcept<
- typename range_iterator<T>::type
- >
- >();
- }
     };
 
     //! Check if a type T models the RandomAccessRange range concept.
     template<typename T>
- struct RandomAccessRangeConcept
+ struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
+ {
+ BOOST_CONCEPT_ASSERT((RandomAccessIteratorConcept<typename RandomAccessRangeConcept::iterator>));
+ BOOST_CONCEPT_ASSERT((RandomAccessIteratorConcept<typename RandomAccessRangeConcept::const_iterator>));
+ };
+
+ //! Check if a type T models the WriteableRandomAccessRange range concept.
+ template<typename T>
+ struct WriteableRandomAccessRangeConcept
+ : RandomAccessRangeConcept<T>
+ , WriteableRangeConcept<T>
     {
- void constraints()
- {
- function_requires<
- BidirectionalRangeConcept<T>
- >();
- function_requires<
- boost_concepts::RandomAccessTraversalConcept<
- typename range_iterator<T>::type
- >
- >();
- }
     };
 
 } // namespace boost

Modified: trunk/boost/range/const_iterator.hpp
==============================================================================
--- trunk/boost/range/const_iterator.hpp (original)
+++ trunk/boost/range/const_iterator.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -21,6 +21,7 @@
 #include <boost/range/detail/const_iterator.hpp>
 #else
 
+#include <boost/range/detail/extract_optional_type.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <cstddef>
 #include <utility>
@@ -31,11 +32,13 @@
     // default
     //////////////////////////////////////////////////////////////////////////
     
+ namespace range_detail {
+ BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
+ }
+
     template< typename C >
- struct range_const_iterator
- {
- typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
- };
+ struct range_const_iterator : range_detail::extract_const_iterator<C>
+ {};
     
     //////////////////////////////////////////////////////////////////////////
     // pair

Added: trunk/boost/range/counting_range.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/counting_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,69 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2008. Use, modification and
+// distribution is subject to the Boost Software Licence, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// For more information, see http://www.boost.org/libs/range
+//
+
+#ifndef BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#if BOOST_MSVC >= 1400
+#pragma warning(push)
+#pragma warning(disable : 4244)
+#endif
+
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+#include <boost/utility.hpp>
+
+namespace boost
+{
+
+ template<class Value>
+ inline iterator_range<counting_iterator<Value> >
+ counting_range(Value first, Value last)
+ {
+ typedef counting_iterator<Value> counting_iterator_t;
+ typedef iterator_range<counting_iterator_t> result_t;
+ return result_t(counting_iterator_t(first),
+ counting_iterator_t(last));
+ }
+
+ template<class Range>
+ inline iterator_range<counting_iterator<BOOST_DEDUCED_TYPENAME range_value<const Range>::type> >
+ counting_range(const Range& rng)
+ {
+ typedef counting_iterator<BOOST_DEDUCED_TYPENAME range_value<const Range>::type> counting_iterator_t;
+ typedef iterator_range<counting_iterator_t> result_t;
+ return boost::empty(rng)
+ ? result_t()
+ : result_t(
+ counting_iterator_t(*boost::begin(rng)),
+ counting_iterator_t(*boost::prior(boost::end(rng))));
+ }
+
+ template<class Range>
+ inline iterator_range<counting_iterator<BOOST_DEDUCED_TYPENAME range_value<Range>::type> >
+ counting_range(Range& rng)
+ {
+ typedef counting_iterator<BOOST_DEDUCED_TYPENAME range_value<Range>::type> counting_iterator_t;
+ typedef iterator_range<counting_iterator_t> result_t;
+ return boost::empty(rng)
+ ? result_t()
+ : result_t(
+ counting_iterator_t(*boost::begin(rng)),
+ counting_iterator_t(*boost::prior(boost::end(rng))));
+ }
+} // namespace boost
+
+#if BOOST_MSVC >= 1400
+#pragma warning(pop)
+#endif
+
+#endif // include guard

Added: trunk/boost/range/detail/demote_iterator_traversal_tag.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/detail/demote_iterator_traversal_tag.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,79 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED
+
+#include <boost/iterator/iterator_categories.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+template<class IteratorTraversalTag1, class IteratorTraversalTag2>
+struct demote_iterator_traversal_tag
+{
+};
+
+#define BOOST_DEMOTE_TRAVERSAL_TAG( Tag1, Tag2, ResultTag ) \
+template<> struct demote_iterator_traversal_tag< Tag1 , Tag2 > \
+{ \
+ typedef ResultTag type; \
+};
+
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, incrementable_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, single_pass_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, forward_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, bidirectional_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, random_access_traversal_tag, no_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, single_pass_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, forward_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, bidirectional_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, random_access_traversal_tag, incrementable_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, forward_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, bidirectional_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, random_access_traversal_tag, single_pass_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, forward_traversal_tag, forward_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, bidirectional_traversal_tag, forward_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, random_access_traversal_tag, forward_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, forward_traversal_tag, forward_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, random_access_traversal_tag, bidirectional_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, no_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, single_pass_traversal_tag, single_pass_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, forward_traversal_tag, forward_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, random_access_traversal_tag, random_access_traversal_tag )
+
+#undef BOOST_DEMOTE_TRAVERSAL_TAG
+
+ } // namespace range_detail
+} // namespace boost
+
+#endif // include guard

Added: trunk/boost/range/detail/extract_optional_type.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/detail/extract_optional_type.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+// Boost.Range library
+//
+// Copyright Arno Schoedl & Neil Groves 2009.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION
+
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
+ template< typename C > \
+ struct extract_ ## a_typedef \
+ { \
+ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
+ };
+
+#else
+
+namespace boost {
+ namespace range_detail {
+ template< typename T > struct exists { typedef void type; };
+ }
+}
+
+// Defines extract_some_typedef<T> which exposes T::some_typedef as
+// extract_some_typedef<T>::type if T::some_typedef exists. Otherwise
+// extract_some_typedef<T> is empty.
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
+ template< typename C, typename Enable=void > \
+ struct extract_ ## a_typedef \
+ {}; \
+ template< typename C > \
+ struct extract_ ## a_typedef< C \
+ , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \
+ > { \
+ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
+ };
+
+#endif
+
+#endif // include guard

Added: trunk/boost/range/detail/join_iterator.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/detail/join_iterator.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,357 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/empty.hpp>
+#include <boost/range/detail/demote_iterator_traversal_tag.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/utility.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+template<typename Iterator1, typename Iterator2>
+struct join_iterator_link
+{
+private:
+ class reference_count_t
+ {
+ public:
+ reference_count_t() : m_count(0u) {}
+ reference_count_t(const reference_count_t&) : m_count(0u) {}
+ reference_count_t& operator=(const reference_count_t&) { return *this; }
+
+ void increment() { ++m_count; }
+ bool decrement() { return --m_count ? false : true; }
+
+ private:
+ unsigned int m_count;
+ };
+
+public:
+ join_iterator_link(Iterator1 last1, Iterator2 first2)
+ : last1(last1)
+ , first2(first2)
+ {
+ }
+
+ void add_reference() const
+ {
+ count.increment();
+ }
+
+ bool release_reference() const
+ {
+ return count.decrement();
+ }
+
+ Iterator1 last1;
+ Iterator2 first2;
+
+private:
+ join_iterator_link() /* = delete */ ;
+
+ mutable reference_count_t count;
+};
+
+} // range_detail
+
+template<typename Iterator1, typename Iterator2>
+inline void intrusive_ptr_add_ref(const range_detail::join_iterator_link<Iterator1,Iterator2>* p)
+{
+ p->add_reference();
+}
+
+template<typename Iterator1, typename Iterator2>
+inline void intrusive_ptr_release(const range_detail::join_iterator_link<Iterator1,Iterator2>* p)
+{
+ if (p->release_reference())
+ delete p;
+}
+
+namespace range_detail
+{
+
+class join_iterator_begin_tag {};
+class join_iterator_end_tag {};
+
+template<typename Iterator1
+ , typename Iterator2
+ , typename Reference
+>
+class join_iterator_union
+{
+public:
+ typedef Iterator1 iterator1_t;
+ typedef Iterator2 iterator2_t;
+
+ join_iterator_union() {}
+ join_iterator_union(unsigned int /*selected*/, const iterator1_t& it1, const iterator2_t& it2) : m_it1(it1), m_it2(it2) {}
+
+ iterator1_t& it1() { return m_it1; }
+ const iterator1_t& it1() const { return m_it1; }
+
+ iterator2_t& it2() { return m_it2; }
+ const iterator2_t& it2() const { return m_it2; }
+
+ Reference dereference(unsigned int selected) const
+ {
+ return selected ? *m_it2 : *m_it1;
+ }
+
+ bool equal(const join_iterator_union& other, unsigned int selected) const
+ {
+ return selected
+ ? m_it2 == other.m_it2
+ : m_it1 == other.m_it1;
+ }
+
+private:
+ iterator1_t m_it1;
+ iterator2_t m_it2;
+};
+
+template<class Iterator, class Reference>
+class join_iterator_union<Iterator, Iterator, Reference>
+{
+public:
+ typedef Iterator iterator1_t;
+ typedef Iterator iterator2_t;
+
+ join_iterator_union() {}
+
+ join_iterator_union(unsigned int selected, const iterator1_t& it1, const iterator2_t& it2)
+ : m_it(selected ? it2 : it1)
+ {
+ }
+
+ iterator1_t& it1() { return m_it; }
+ const iterator1_t& it1() const { return m_it; }
+
+ iterator2_t& it2() { return m_it; }
+ const iterator2_t& it2() const { return m_it; }
+
+ Reference dereference(unsigned int) const
+ {
+ return *m_it;
+ }
+
+ bool equal(const join_iterator_union& other, unsigned int selected) const
+ {
+ return m_it == other.m_it;
+ }
+
+private:
+ iterator1_t m_it;
+};
+
+template<typename Iterator1
+ , typename Iterator2
+ , typename ValueType = typename iterator_value<Iterator1>::type
+ , typename Reference = typename iterator_reference<Iterator1>::type
+ , typename Traversal = typename demote_iterator_traversal_tag<
+ typename iterator_traversal<Iterator1>::type
+ , typename iterator_traversal<Iterator2>::type>::type
+>
+class join_iterator
+ : public iterator_facade<join_iterator<Iterator1,Iterator2,ValueType,Reference,Traversal>, ValueType, Traversal, Reference>
+{
+ typedef join_iterator_link<Iterator1, Iterator2> link_t;
+ typedef join_iterator_union<Iterator1, Iterator2, Reference> iterator_union;
+public:
+ typedef Iterator1 iterator1_t;
+ typedef Iterator2 iterator2_t;
+
+ join_iterator() : m_section(0u) {}
+
+ join_iterator(unsigned int section, Iterator1 current1, Iterator1 last1, Iterator2 first2, Iterator2 current2)
+ : m_section(section)
+ , m_it(section, current1, current2)
+ , m_link(new link_t(last1, first2))
+ {
+ }
+
+ template<typename Range1, typename Range2>
+ join_iterator(Range1& r1, Range2& r2, join_iterator_begin_tag)
+ : m_section(boost::empty(r1) ? 1u : 0u)
+ , m_it(boost::empty(r1) ? 1u : 0u, boost::begin(r1), boost::begin(r2))
+ , m_link(new link_t(boost::end(r1), boost::begin(r2)))
+ {
+ }
+
+ template<typename Range1, typename Range2>
+ join_iterator(const Range1& r1, const Range2& r2, join_iterator_begin_tag)
+ : m_section(boost::empty(r1) ? 1u : 0u)
+ , m_it(boost::empty(r1) ? 1u : 0u, boost::const_begin(r1), boost::const_begin(r2))
+ , m_link(new link_t(boost::const_end(r1), boost::const_begin(r2)))
+ {
+ }
+
+ template<typename Range1, typename Range2>
+ join_iterator(Range1& r1, Range2& r2, join_iterator_end_tag)
+ : m_section(1u)
+ , m_it(1u, boost::end(r1), boost::end(r2))
+ , m_link(new link_t(boost::end(r1), boost::begin(r2)))
+ {
+ }
+
+ template<typename Range1, typename Range2>
+ join_iterator(const Range1& r1, const Range2& r2, join_iterator_end_tag)
+ : m_section(1u)
+ , m_it(1u, boost::const_end(r1), boost::const_end(r2))
+ , m_link(new link_t(boost::const_end(r1), boost::const_begin(r2)))
+ {
+ }
+
+private:
+ void increment()
+ {
+ if (m_section)
+ ++m_it.it2();
+ else
+ {
+ ++m_it.it1();
+ if (m_it.it1() == m_link->last1)
+ {
+ m_it.it2() = m_link->first2;
+ m_section = 1u;
+ }
+ }
+ }
+
+ void decrement()
+ {
+ if (m_section)
+ {
+ if (m_it.it2() == m_link->first2)
+ {
+ m_it.it1() = boost::prior(m_link->last1);
+ m_section = 0u;
+ }
+ else
+ --m_it.it2();
+ }
+ else
+ --m_it.it1();
+ }
+
+ typename join_iterator::reference dereference() const
+ {
+ return m_it.dereference(m_section);
+ }
+
+ bool equal(const join_iterator& other) const
+ {
+ return m_section == other.m_section
+ && m_it.equal(other.m_it, m_section);
+ }
+
+ void advance(typename join_iterator::difference_type offset)
+ {
+ if (m_section)
+ advance_from_range2(offset);
+ else
+ advance_from_range1(offset);
+ }
+
+ typename join_iterator::difference_type distance_to(const join_iterator& other) const
+ {
+ typename join_iterator::difference_type result;
+ if (m_section)
+ {
+ if (other.m_section)
+ result = other.m_it.it2() - m_it.it2();
+ else
+ {
+ result = (m_link->first2 - m_it.it2())
+ + (other.m_it.it1() - m_link->last1);
+
+ BOOST_ASSERT( result <= 0 );
+ }
+ }
+ else
+ {
+ if (other.m_section)
+ {
+ result = (m_link->last1 - m_it.it1())
+ + (other.m_it.it2() - m_link->first2);
+ }
+ else
+ result = other.m_it.it1() - m_it.it1();
+ }
+ return result;
+ }
+
+ void advance_from_range2(typename join_iterator::difference_type offset)
+ {
+ typedef typename join_iterator::difference_type difference_t;
+ BOOST_ASSERT( m_section == 1u );
+ if (offset < 0)
+ {
+ difference_t r2_dist = m_link->first2 - m_it.it2();
+ BOOST_ASSERT( r2_dist <= 0 );
+ if (offset >= r2_dist)
+ std::advance(m_it.it2(), offset);
+ else
+ {
+ difference_t r1_dist = offset - r2_dist;
+ BOOST_ASSERT( r1_dist <= 0 );
+ m_it.it1() = m_link->last1 + r1_dist;
+ m_section = 0u;
+ }
+ }
+ else
+ std::advance(m_it.it2(), offset);
+ }
+
+ void advance_from_range1(typename join_iterator::difference_type offset)
+ {
+ typedef typename join_iterator::difference_type difference_t;
+ BOOST_ASSERT( m_section == 0u );
+ if (offset > 0)
+ {
+ difference_t r1_dist = m_link->last1 - m_it.it1();
+ BOOST_ASSERT( r1_dist >= 0 );
+ if (offset < r1_dist)
+ std::advance(m_it.it1(), offset);
+ else
+ {
+ difference_t r2_dist = offset - r1_dist;
+ BOOST_ASSERT( r2_dist >= 0 );
+ m_it.it2() = m_link->first2 + r2_dist;
+ m_section = 1u;
+ }
+ }
+ else
+ std::advance(m_it.it1(), offset);
+ }
+
+ unsigned int m_section;
+ iterator_union m_it;
+ intrusive_ptr<const link_t> m_link;
+
+ friend class ::boost::iterator_core_access;
+};
+
+ } // namespace range_detail
+
+} // namespace boost
+
+#endif // include guard

Added: trunk/boost/range/detail/misc_concept.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/detail/misc_concept.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,33 @@
+// Boost.Range library concept checks
+//
+// Copyright Neil Groves 2009. Use, modification and distribution
+// are subject to the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<typename T1, typename T2>
+ class SameTypeConcept
+ {
+ public:
+ BOOST_CONCEPT_USAGE(SameTypeConcept)
+ {
+ same_type(a,b);
+ }
+ private:
+ template<typename T> void same_type(T,T) {}
+ T1 a;
+ T2 b;
+ };
+ }
+}
+
+#endif // include guard

Added: trunk/boost/range/detail/range_return.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/detail/range_return.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,180 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+ enum range_return_value
+ {
+ // (*) indicates the most common values
+ return_found, // only the found resulting iterator (*)
+ return_next, // next(found) iterator
+ return_prior, // prior(found) iterator
+ return_begin_found, // [begin, found) range (*)
+ return_begin_next, // [begin, next(found)) range
+ return_begin_prior, // [begin, prior(found)) range
+ return_found_end, // [found, end) range (*)
+ return_next_end, // [next(found), end) range
+ return_prior_end, // [prior(found), end) range
+ return_begin_end // [begin, end) range
+ };
+
+ template< class SinglePassRange, range_return_value >
+ struct range_return
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type(found, boost::end(rng));
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_found >
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type;
+
+ static type pack(type found, SinglePassRange&)
+ {
+ return found;
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_next >
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type;
+
+ static type pack(type found, SinglePassRange& rng)
+ {
+ return found == boost::end(rng)
+ ? found
+ : boost::next(found);
+ }
+ };
+
+ template< class BidirectionalRange >
+ struct range_return< BidirectionalRange, return_prior >
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type type;
+
+ static type pack(type found, BidirectionalRange& rng)
+ {
+ return found == boost::begin(rng)
+ ? found
+ : boost::prior(found);
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_begin_found >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type(boost::begin(rng), found);
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_begin_next >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type( boost::begin(rng),
+ found == boost::end(rng) ? found : boost::next(found) );
+ }
+ };
+
+ template< class BidirectionalRange >
+ struct range_return< BidirectionalRange, return_begin_prior >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found,
+ BidirectionalRange& rng)
+ {
+ return type( boost::begin(rng),
+ found == boost::begin(rng) ? found : boost::prior(found) );
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_found_end >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type(found, boost::end(rng));
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_next_end >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type( found == boost::end(rng) ? found : boost::next(found),
+ boost::end(rng) );
+ }
+ };
+
+ template< class BidirectionalRange >
+ struct range_return< BidirectionalRange, return_prior_end >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found,
+ BidirectionalRange& rng)
+ {
+ return type( found == boost::begin(rng) ? found : boost::prior(found),
+ boost::end(rng) );
+ }
+ };
+
+ template< class SinglePassRange >
+ struct range_return< SinglePassRange, return_begin_end >
+ {
+ typedef boost::iterator_range<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+ static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+ SinglePassRange& rng)
+ {
+ return type(boost::begin(rng), boost::end(rng));
+ }
+ };
+
+}
+
+#endif // include guard

Added: trunk/boost/range/irange.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/irange.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,202 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2010. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_IRANGE_HPP_INCLUDED
+#define BOOST_RANGE_IRANGE_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ // integer_iterator is an iterator over an integer sequence that
+ // is bounded only by the limits of the underlying integer
+ // representation.
+ //
+ // This is useful for implementing the irange(first, last)
+ // function.
+ //
+ // Note:
+ // This use of this iterator and irange is appreciably less
+ // performant than the corresponding hand-written integer
+ // loop on many compilers.
+ template<typename Integer>
+ class integer_iterator
+ : public boost::iterator_facade<
+ integer_iterator<Integer>,
+ Integer,
+ boost::random_access_traversal_tag,
+ const Integer&
+ >
+ {
+ typedef boost::iterator_facade<
+ integer_iterator<Integer>,
+ Integer,
+ boost::random_access_traversal_tag,
+ const Integer&
+ > base_t;
+ public:
+ typedef typename base_t::value_type value_type;
+ typedef typename base_t::difference_type difference_type;
+ typedef typename base_t::reference reference;
+
+ integer_iterator() : m_value() {}
+ explicit integer_iterator(value_type x) : m_value(x) {}
+
+ private:
+ void increment()
+ {
+ ++m_value;
+ }
+
+ void decrement()
+ {
+ --m_value;
+ }
+
+ void advance(difference_type offset)
+ {
+ m_value += offset;
+ }
+
+ difference_type distance_to(const integer_iterator& other) const
+ {
+ return other.m_value - m_value;
+ }
+
+ bool equal(const integer_iterator& other) const
+ {
+ return m_value == other.m_value;
+ }
+
+ reference dereference() const
+ {
+ return m_value;
+ }
+
+ friend class ::boost::iterator_core_access;
+ value_type m_value;
+ };
+
+ // integer_iterator_with_step is similar in nature to the
+ // integer_iterator but provides the ability to 'move' in
+ // a number of steps specified at construction time.
+ //
+ // The three variable implementation provides the best guarantees
+ // of loop termination upon various combinations of input.
+ //
+ // While this design is less performant than some less
+ // safe alternatives, the use of ranges and iterators to
+ // perform counting will never be optimal anyhow, hence
+ // if optimal performance is desired a handcoded loop
+ // is the solution.
+ template<typename Integer>
+ class integer_iterator_with_step
+ : public boost::iterator_facade<
+ integer_iterator_with_step<Integer>,
+ Integer,
+ boost::random_access_traversal_tag,
+ Integer,
+ std::ptrdiff_t
+ >
+ {
+ typedef boost::iterator_facade<
+ integer_iterator_with_step<Integer>,
+ Integer,
+ boost::random_access_traversal_tag,
+ Integer,
+ std::ptrdiff_t
+ > base_t;
+ public:
+ typedef typename base_t::value_type value_type;
+ typedef typename base_t::difference_type difference_type;
+ typedef typename base_t::reference reference;
+
+ integer_iterator_with_step(value_type first, value_type step, difference_type step_size)
+ : m_first(first)
+ , m_step(step)
+ , m_step_size(step_size)
+ {
+ BOOST_ASSERT( step >= 0 );
+ BOOST_ASSERT( step_size != 0 );
+ }
+
+ private:
+ void increment()
+ {
+ ++m_step;
+ }
+
+ void decrement()
+ {
+ --m_step;
+ }
+
+ void advance(difference_type offset)
+ {
+ m_step += offset;
+ }
+
+ difference_type distance_to(const integer_iterator_with_step& other) const
+ {
+ return other.m_step - m_step;
+ }
+
+ bool equal(const integer_iterator_with_step& other) const
+ {
+ return m_step == other.m_step;
+ }
+
+ reference dereference() const
+ {
+ return m_first + (m_step * m_step_size);
+ }
+
+ friend class ::boost::iterator_core_access;
+ value_type m_first;
+ value_type m_step;
+ difference_type m_step_size;
+ };
+
+ } // namespace range_detail
+
+ template<typename Integer>
+ iterator_range< range_detail::integer_iterator<Integer> >
+ irange(Integer first, Integer last)
+ {
+ BOOST_ASSERT( first <= last );
+ return boost::iterator_range< range_detail::integer_iterator<Integer> >(
+ range_detail::integer_iterator<Integer>(first),
+ range_detail::integer_iterator<Integer>(last));
+ }
+
+ template<typename Integer, typename StepSize>
+ iterator_range< range_detail::integer_iterator_with_step<Integer> >
+ irange(Integer first, Integer last, StepSize step_size)
+ {
+ BOOST_ASSERT( step_size != 0 );
+ BOOST_ASSERT( (step_size > 0) ? (last >= first) : (last <= first) );
+ typedef typename range_detail::integer_iterator_with_step<Integer> iterator_t;
+
+ const std::ptrdiff_t last_step
+ = (static_cast<std::ptrdiff_t>(last) - static_cast<std::ptrdiff_t>(first))
+ / (static_cast<std::ptrdiff_t>(step_size));
+
+ return boost::iterator_range< iterator_t >(
+ iterator_t(first, 0, step_size),
+ iterator_t(first, last_step, step_size));
+ }
+
+} // namespace boost
+
+#endif // include guard

Added: trunk/boost/range/istream_range.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/istream_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,34 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2008. Use, modification and
+// distribution is subject to the Boost Software Licence, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// For more information, see http://www.boost.org/libs/range
+//
+
+#ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
+
+/*!
+ * \file istream_range.hpp
+ */
+
+#include <iterator>
+#include <boost/config.hpp>
+#include <boost/range/range.hpp>
+
+namespace boost
+{
+ template<class Type, class Elem, class Traits> inline
+ range<std::istream_iterator<Type, Elem, Traits> >
+ istream_range(std::basic_istream<Elem, Traits>& in)
+ {
+ return range<std::istream_iterator<Type, Elem, Traits> >(
+ std::istream_iterator<Type>(in),
+ std::istream_iterator<Type>());
+ }
+} // namespace boost
+
+#endif // include guard

Modified: trunk/boost/range/iterator_range.hpp
==============================================================================
--- trunk/boost/range/iterator_range.hpp (original)
+++ trunk/boost/range/iterator_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,659 +1,16 @@
 // Boost.Range library
 //
-// Copyright Thorsten Ottosen & Pavol Droba 2003-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// Copyright Neil Groves 2009.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 // For more information, see http://www.boost.org/libs/range/
 //
+#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
 
-#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
-#define BOOST_RANGE_ITERATOR_RANGE_HPP
-
-#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
-#include <boost/detail/workaround.hpp>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
- #pragma warning( push )
- #pragma warning( disable : 4996 )
-#endif
-
-// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
-#ifndef BOOST_OLD_IOSTREAMS
-# if defined(__STL_CONFIG_H) && \
- !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
- /**/
-# define BOOST_OLD_IOSTREAMS
-# endif
-#endif // #ifndef BOOST_OLD_IOSTREAMS
-
-#include <boost/assert.hpp>
-#include <boost/iterator/iterator_traits.hpp>
-#include <boost/type_traits/is_abstract.hpp>
-#include <boost/range/functions.hpp>
-#include <boost/range/iterator.hpp>
-#include <boost/range/difference_type.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <iterator>
-#include <algorithm>
-#ifndef _STLP_NO_IOSTREAMS
-# ifndef BOOST_OLD_IOSTREAMS
-# include <ostream>
-# else
-# include <ostream.h>
-# endif
-#endif // _STLP_NO_IOSTREAMS
-#include <cstddef>
-
-/*! \file
- Defines the \c iterator_class and related functions.
- \c iterator_range is a simple wrapper of iterator pair idiom. It provides
- a rich subset of Container interface.
-*/
-
-
-namespace boost
-{
- namespace iterator_range_detail
- {
- //
- // The functions adl_begin and adl_end are implemented in a separate
- // class for gcc-2.9x
- //
- template<typename IteratorT>
- struct iterator_range_impl {
- template< class ForwardRange >
- static IteratorT adl_begin( ForwardRange& r )
- {
- return IteratorT( boost::begin( r ) );
- }
-
- template< class ForwardRange >
- static IteratorT adl_end( ForwardRange& r )
- {
- return IteratorT( boost::end( r ) );
- }
- };
-
- template< class Left, class Right >
- inline bool equal( const Left& l, const Right& r )
- {
- typedef BOOST_DEDUCED_TYPENAME boost::range_difference<Left>::type sz_type;
-
- sz_type l_size = boost::distance( l ),
- r_size = boost::distance( r );
-
- if( l_size != r_size )
- return false;
-
- return std::equal( boost::begin(l), boost::end(l),
- boost::begin(r) );
- }
-
- template< class Left, class Right >
- inline bool less_than( const Left& l, const Right& r )
- {
- return std::lexicographical_compare( boost::begin(l),
- boost::end(l),
- boost::begin(r),
- boost::end(r) );
- }
-
- struct range_tag { };
- struct const_range_tag { };
-
- }
-
-// iterator range template class -----------------------------------------//
-
- //! iterator_range class
- /*!
- An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
- An iterator_range can be passed to an algorithm which requires a sequence as an input.
- For example, the \c toupper() function may be used most frequently on strings,
- but can also be used on iterator_ranges:
-
- \code
- boost::tolower( find( s, "UPPERCASE STRING" ) );
- \endcode
-
- Many algorithms working with sequences take a pair of iterators,
- delimiting a working range, as an arguments. The \c iterator_range class is an
- encapsulation of a range identified by a pair of iterators.
- It provides a collection interface,
- so it is possible to pass an instance to an algorithm requiring a collection as an input.
- */
- template<typename IteratorT>
- class iterator_range
- {
- protected: // Used by sub_range
- //! implementation class
- typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
- public:
-
- //! this type
- typedef iterator_range<IteratorT> type;
- //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
-
- //! Encapsulated value type
- typedef BOOST_DEDUCED_TYPENAME
- iterator_value<IteratorT>::type value_type;
-
- //! Difference type
- typedef BOOST_DEDUCED_TYPENAME
- iterator_difference<IteratorT>::type difference_type;
-
- //! Size type
- typedef std::size_t size_type; // note: must be unsigned
-
- //! This type
- typedef iterator_range<IteratorT> this_type;
-
- //! Refence type
- //
- // Needed because value-type is the same for
- // const and non-const iterators
- //
- typedef BOOST_DEDUCED_TYPENAME
- iterator_reference<IteratorT>::type reference;
-
- //! const_iterator type
- /*!
- There is no distinction between const_iterator and iterator.
- These typedefs are provides to fulfill container interface
- */
- typedef IteratorT const_iterator;
- //! iterator type
- typedef IteratorT iterator;
-
- private: // for return value of operator()()
- typedef BOOST_DEDUCED_TYPENAME
- boost::mpl::if_< boost::is_abstract<value_type>,
- reference, value_type >::type abstract_value_type;
-
- public:
- iterator_range() : m_Begin( iterator() ), m_End( iterator() )
- #ifndef NDEBUG
- , singular( true )
- #endif
- { }
-
- //! Constructor from a pair of iterators
- template< class Iterator >
- iterator_range( Iterator Begin, Iterator End ) :
- m_Begin(Begin), m_End(End)
- #ifndef NDEBUG
- , singular(false)
- #endif
- {}
-
- //! Constructor from a Range
- template< class Range >
- iterator_range( const Range& r ) :
- m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
- #ifndef NDEBUG
- , singular(false)
- #endif
- {}
-
- //! Constructor from a Range
- template< class Range >
- iterator_range( Range& r ) :
- m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
- #ifndef NDEBUG
- , singular(false)
- #endif
- {}
-
- //! Constructor from a Range
- template< class Range >
- iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
- m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
- #ifndef NDEBUG
- , singular(false)
- #endif
- {}
-
- //! Constructor from a Range
- template< class Range >
- iterator_range( Range& r, iterator_range_detail::range_tag ) :
- m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
- #ifndef NDEBUG
- , singular(false)
- #endif
- {}
-
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- this_type& operator=( const this_type& r )
- {
- m_Begin = r.begin();
- m_End = r.end();
-
- #ifndef NDEBUG
- singular = r.singular;
- #endif
- return *this;
- }
- #endif
-
- template< class Iterator >
- iterator_range& operator=( const iterator_range<Iterator>& r )
- {
- m_Begin = r.begin();
- m_End = r.end();
- #ifndef NDEBUG
- singular = r.is_singular();
- #endif
- return *this;
- }
-
- template< class ForwardRange >
- iterator_range& operator=( ForwardRange& r )
- {
- m_Begin = impl::adl_begin( r );
- m_End = impl::adl_end( r );
- #ifndef NDEBUG
- singular = false;
- #endif
- return *this;
- }
-
- template< class ForwardRange >
- iterator_range& operator=( const ForwardRange& r )
- {
- m_Begin = impl::adl_begin( r );
- m_End = impl::adl_end( r );
- #ifndef NDEBUG
- singular = false;
- #endif
- return *this;
- }
-
- IteratorT begin() const
- {
- BOOST_ASSERT( !is_singular() );
- return m_Begin;
- }
-
- IteratorT end() const
- {
- BOOST_ASSERT( !is_singular() );
- return m_End;
- }
-
- difference_type size() const
- {
- BOOST_ASSERT( !is_singular() );
- return m_End - m_Begin;
- }
-
- bool empty() const
- {
- BOOST_ASSERT( !is_singular() );
- return m_Begin == m_End;
- }
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- operator bool() const
- {
- return !empty();
- }
-#else
- typedef iterator (iterator_range::*unspecified_bool_type) () const;
- operator unspecified_bool_type() const
- {
- return empty() ? 0: &iterator_range::end;
- }
-#endif
-
- bool equal( const iterator_range& r ) const
- {
- BOOST_ASSERT( !is_singular() );
- return m_Begin == r.m_Begin && m_End == r.m_End;
- }
-
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
- bool operator==( const iterator_range& r ) const
- {
- BOOST_ASSERT( !is_singular() );
- return iterator_range_detail::equal( *this, r );
- }
-
- bool operator!=( const iterator_range& r ) const
- {
- BOOST_ASSERT( !is_singular() );
- return !operator==(r);
- }
-
- bool operator<( const iterator_range& r ) const
- {
- BOOST_ASSERT( !is_singular() );
- return iterator_range_detail::less_than( *this, r );
- }
-
-#endif
-
- public: // convenience
- reference front() const
- {
- BOOST_ASSERT( !empty() );
- return *m_Begin;
- }
-
- reference back() const
- {
- BOOST_ASSERT( !empty() );
- IteratorT last( m_End );
- return *--last;
- }
-
- reference operator[]( difference_type at ) const
- {
- BOOST_ASSERT( at >= 0 && at < size() );
- return m_Begin[at];
- }
-
- //
- // When storing transform iterators, operator[]()
- // fails because it returns by reference. Therefore
- // operator()() is provided for these cases.
- //
- abstract_value_type operator()( difference_type at ) const
- {
- BOOST_ASSERT( at >= 0 && at < size() );
- return m_Begin[at];
- }
-
- iterator_range& advance_begin( difference_type n )
- {
- BOOST_ASSERT( !is_singular() );
- std::advance( m_Begin, n );
- return *this;
- }
-
- iterator_range& advance_end( difference_type n )
- {
- BOOST_ASSERT( !is_singular() );
- std::advance( m_End, n );
- return *this;
- }
-
- private:
- // begin and end iterators
- IteratorT m_Begin;
- IteratorT m_End;
-
- #ifndef NDEBUG
- bool singular;
- #endif
-
- public:
- bool is_singular() const
- {
- #ifndef NDEBUG
- return singular;
- #else
- return false;
- #endif
- }
-
- protected:
- //
- // Allow subclasses an easy way to access the
- // base type
- //
- typedef iterator_range iterator_range_;
- };
-
-// iterator range free-standing operators ---------------------------//
-
-#ifndef _STLP_NO_IOSTREAMS
-# ifndef BOOST_OLD_IOSTREAMS
-
- //! iterator_range output operator
- /*!
- Output the range to an ostream. Elements are outputed
- in a sequence without separators.
- */
- template< typename IteratorT, typename Elem, typename Traits >
- inline std::basic_ostream<Elem,Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& Os,
- const iterator_range<IteratorT>& r )
- {
- std::copy( r.begin(), r.end(),
- std::ostream_iterator< BOOST_DEDUCED_TYPENAME
- iterator_value<IteratorT>::type,
- Elem, Traits>(Os) );
- return Os;
- }
-
-# else
-
- //! iterator_range output operator
- /*!
- Output the range to an ostream. Elements are outputed
- in a sequence without separators.
- */
- template< typename IteratorT >
- inline std::ostream& operator<<(
- std::ostream& Os,
- const iterator_range<IteratorT>& r )
- {
- std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
- return Os;
- }
-
-# endif
-#endif // _STLP_NO_IOSTREAMS
-
- /////////////////////////////////////////////////////////////////////
- // comparison operators
- /////////////////////////////////////////////////////////////////////
-
- template< class IteratorT, class ForwardRange >
- inline bool operator==( const ForwardRange& l,
- const iterator_range<IteratorT>& r )
- {
- return iterator_range_detail::equal( l, r );
- }
-
- template< class IteratorT, class ForwardRange >
- inline bool operator!=( const ForwardRange& l,
- const iterator_range<IteratorT>& r )
- {
- return !iterator_range_detail::equal( l, r );
- }
-
- template< class IteratorT, class ForwardRange >
- inline bool operator<( const ForwardRange& l,
- const iterator_range<IteratorT>& r )
- {
- return iterator_range_detail::less_than( l, r );
- }
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#else
- template< class Iterator1T, class Iterator2T >
- inline bool operator==( const iterator_range<Iterator1T>& l,
- const iterator_range<Iterator2T>& r )
- {
- return iterator_range_detail::equal( l, r );
- }
-
- template< class IteratorT, class ForwardRange >
- inline bool operator==( const iterator_range<IteratorT>& l,
- const ForwardRange& r )
- {
- return iterator_range_detail::equal( l, r );
- }
-
-
- template< class Iterator1T, class Iterator2T >
- inline bool operator!=( const iterator_range<Iterator1T>& l,
- const iterator_range<Iterator2T>& r )
- {
- return !iterator_range_detail::equal( l, r );
- }
-
- template< class IteratorT, class ForwardRange >
- inline bool operator!=( const iterator_range<IteratorT>& l,
- const ForwardRange& r )
- {
- return !iterator_range_detail::equal( l, r );
- }
-
-
- template< class Iterator1T, class Iterator2T >
- inline bool operator<( const iterator_range<Iterator1T>& l,
- const iterator_range<Iterator2T>& r )
- {
- return iterator_range_detail::less_than( l, r );
- }
-
- template< class IteratorT, class ForwardRange >
- inline bool operator<( const iterator_range<IteratorT>& l,
- const ForwardRange& r )
- {
- return iterator_range_detail::less_than( l, r );
- }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-// iterator range utilities -----------------------------------------//
-
- //! iterator_range construct helper
- /*!
- Construct an \c iterator_range from a pair of iterators
-
- \param Begin A begin iterator
- \param End An end iterator
- \return iterator_range object
- */
- template< typename IteratorT >
- inline iterator_range< IteratorT >
- make_iterator_range( IteratorT Begin, IteratorT End )
- {
- return iterator_range<IteratorT>( Begin, End );
- }
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
- template< typename Range >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
- make_iterator_range( Range& r )
- {
- return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
- ( boost::begin( r ), boost::end( r ) );
- }
-
-#else
- //! iterator_range construct helper
- /*!
- Construct an \c iterator_range from a \c Range containing the begin
- and end iterators.
- */
- template< class ForwardRange >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
- make_iterator_range( ForwardRange& r )
- {
- return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
- ( r, iterator_range_detail::range_tag() );
- }
-
- template< class ForwardRange >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
- make_iterator_range( const ForwardRange& r )
- {
- return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
- ( r, iterator_range_detail::const_range_tag() );
- }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
- namespace iterator_range_detail
- {
- template< class Range >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
- make_range_impl( Range& r,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
- {
- //
- // Not worth the effort
- //
- //if( advance_begin == 0 && advance_end == 0 )
- // return make_iterator_range( r );
- //
-
- BOOST_DEDUCED_TYPENAME range_iterator<Range>::type
- new_begin = boost::begin( r ),
- new_end = boost::end( r );
- std::advance( new_begin, advance_begin );
- std::advance( new_end, advance_end );
- return make_iterator_range( new_begin, new_end );
- }
- }
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
- template< class Range >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
- make_iterator_range( Range& r,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
- {
- //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
- return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
- }
-
-#else
-
- template< class Range >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
- make_iterator_range( Range& r,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
- {
- //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
- return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
- }
-
- template< class Range >
- inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
- make_iterator_range( const Range& r,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
- BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
- {
- //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
- return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
- }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
- //! copy a range into a sequence
- /*!
- Construct a new sequence of the specified type from the elements
- in the given range
-
- \param Range An input range
- \return New sequence
- */
- template< typename SeqT, typename Range >
- inline SeqT copy_range( const Range& r )
- {
- return SeqT( boost::begin( r ), boost::end( r ) );
- }
-
-} // namespace 'boost'
-
-#undef BOOST_OLD_IOSTREAMS
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
- #pragma warning( pop )
-#endif
-
-#endif
+#include "boost/range/iterator_range_core.hpp"
+#include "boost/range/iterator_range_io.hpp"
 
+#endif // include guard

Added: trunk/boost/range/iterator_range_core.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/iterator_range_core.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,540 @@
+// Boost.Range library
+//
+// Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+
+#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning( push )
+ #pragma warning( disable : 4996 )
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/range/functions.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+/*! \file
+ Defines the \c iterator_class and related functions.
+ \c iterator_range is a simple wrapper of iterator pair idiom. It provides
+ a rich subset of Container interface.
+*/
+
+
+namespace boost
+{
+ namespace iterator_range_detail
+ {
+ //
+ // The functions adl_begin and adl_end are implemented in a separate
+ // class for gcc-2.9x
+ //
+ template<typename IteratorT>
+ struct iterator_range_impl {
+ template< class ForwardRange >
+ static IteratorT adl_begin( ForwardRange& r )
+ {
+ return IteratorT( boost::begin( r ) );
+ }
+
+ template< class ForwardRange >
+ static IteratorT adl_end( ForwardRange& r )
+ {
+ return IteratorT( boost::end( r ) );
+ }
+ };
+
+ template< class Left, class Right >
+ inline bool less_than( const Left& l, const Right& r )
+ {
+ return std::lexicographical_compare( boost::begin(l),
+ boost::end(l),
+ boost::begin(r),
+ boost::end(r) );
+ }
+
+ // This version is maintained since it is used in other boost libraries
+ // such as Boost.Assign
+ template< class Left, class Right >
+ inline bool equal(const Left& l, const Right& r)
+ {
+ return boost::equal(l, r);
+ }
+
+ struct range_tag { };
+ struct const_range_tag { };
+
+ }
+
+// iterator range template class -----------------------------------------//
+
+ //! iterator_range class
+ /*!
+ An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
+ An iterator_range can be passed to an algorithm which requires a sequence as an input.
+ For example, the \c toupper() function may be used most frequently on strings,
+ but can also be used on iterator_ranges:
+
+ \code
+ boost::tolower( find( s, "UPPERCASE STRING" ) );
+ \endcode
+
+ Many algorithms working with sequences take a pair of iterators,
+ delimiting a working range, as an arguments. The \c iterator_range class is an
+ encapsulation of a range identified by a pair of iterators.
+ It provides a collection interface,
+ so it is possible to pass an instance to an algorithm requiring a collection as an input.
+ */
+ template<typename IteratorT>
+ class iterator_range
+ {
+ protected: // Used by sub_range
+ //! implementation class
+ typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
+ public:
+
+ //! this type
+ typedef iterator_range<IteratorT> type;
+ //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
+
+ //! Encapsulated value type
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_value<IteratorT>::type value_type;
+
+ //! Difference type
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_difference<IteratorT>::type difference_type;
+
+ //! Size type
+ typedef std::size_t size_type; // note: must be unsigned
+
+ //! This type
+ typedef iterator_range<IteratorT> this_type;
+
+ //! Reference type
+ //
+ // Needed because value-type is the same for
+ // const and non-const iterators
+ //
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_reference<IteratorT>::type reference;
+
+ //! const_iterator type
+ /*!
+ There is no distinction between const_iterator and iterator.
+ These typedefs are provides to fulfill container interface
+ */
+ typedef IteratorT const_iterator;
+ //! iterator type
+ typedef IteratorT iterator;
+
+ private: // for return value of operator()()
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::mpl::if_< boost::is_abstract<value_type>,
+ reference, value_type >::type abstract_value_type;
+
+ public:
+ iterator_range() : m_Begin( iterator() ), m_End( iterator() )
+ { }
+
+ //! Constructor from a pair of iterators
+ template< class Iterator >
+ iterator_range( Iterator Begin, Iterator End ) :
+ m_Begin(Begin), m_End(End)
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( const Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( Range& r, iterator_range_detail::range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+ this_type& operator=( const this_type& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+ #endif
+
+ template< class Iterator >
+ iterator_range& operator=( const iterator_range<Iterator>& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+
+ template< class ForwardRange >
+ iterator_range& operator=( ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+
+ template< class ForwardRange >
+ iterator_range& operator=( const ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+
+ IteratorT begin() const
+ {
+ return m_Begin;
+ }
+
+ IteratorT end() const
+ {
+ return m_End;
+ }
+
+ difference_type size() const
+ {
+ return m_End - m_Begin;
+ }
+
+ bool empty() const
+ {
+ return m_Begin == m_End;
+ }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ operator bool() const
+ {
+ return !empty();
+ }
+#else
+ typedef iterator (iterator_range::*unspecified_bool_type) () const;
+ operator unspecified_bool_type() const
+ {
+ return empty() ? 0: &iterator_range::end;
+ }
+#endif
+
+ bool equal( const iterator_range& r ) const
+ {
+ return m_Begin == r.m_Begin && m_End == r.m_End;
+ }
+
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ bool operator==( const iterator_range& r ) const
+ {
+ return boost::equal( *this, r );
+ }
+
+ bool operator!=( const iterator_range& r ) const
+ {
+ return !operator==(r);
+ }
+
+ bool operator<( const iterator_range& r ) const
+ {
+ return iterator_range_detail::less_than( *this, r );
+ }
+
+#endif
+
+ public: // convenience
+ reference front() const
+ {
+ BOOST_ASSERT( !empty() );
+ return *m_Begin;
+ }
+
+ reference back() const
+ {
+ BOOST_ASSERT( !empty() );
+ IteratorT last( m_End );
+ return *--last;
+ }
+
+ reference operator[]( difference_type at ) const
+ {
+ BOOST_ASSERT( at >= 0 && at < size() );
+ return m_Begin[at];
+ }
+
+ //
+ // When storing transform iterators, operator[]()
+ // fails because it returns by reference. Therefore
+ // operator()() is provided for these cases.
+ //
+ abstract_value_type operator()( difference_type at ) const
+ {
+ BOOST_ASSERT( at >= 0 && at < size() );
+ return m_Begin[at];
+ }
+
+ iterator_range& advance_begin( difference_type n )
+ {
+ std::advance( m_Begin, n );
+ return *this;
+ }
+
+ iterator_range& advance_end( difference_type n )
+ {
+ std::advance( m_End, n );
+ return *this;
+ }
+
+ private:
+ // begin and end iterators
+ IteratorT m_Begin;
+ IteratorT m_End;
+
+ protected:
+ //
+ // Allow subclasses an easy way to access the
+ // base type
+ //
+ typedef iterator_range iterator_range_;
+ };
+
+// iterator range free-standing operators ---------------------------//
+
+ /////////////////////////////////////////////////////////////////////
+ // comparison operators
+ /////////////////////////////////////////////////////////////////////
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#else
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator==( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return boost::equal( l, r );
+ }
+
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator!=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator<( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+// iterator range utilities -----------------------------------------//
+
+ //! iterator_range construct helper
+ /*!
+ Construct an \c iterator_range from a pair of iterators
+
+ \param Begin A begin iterator
+ \param End An end iterator
+ \return iterator_range object
+ */
+ template< typename IteratorT >
+ inline iterator_range< IteratorT >
+ make_iterator_range( IteratorT Begin, IteratorT End )
+ {
+ return iterator_range<IteratorT>( Begin, End );
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ template< typename Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ ( boost::begin( r ), boost::end( r ) );
+ }
+
+#else
+ //! iterator_range construct helper
+ /*!
+ Construct an \c iterator_range from a \c Range containing the begin
+ and end iterators.
+ */
+ template< class ForwardRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+ make_iterator_range( ForwardRange& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+ ( r, iterator_range_detail::range_tag() );
+ }
+
+ template< class ForwardRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+ make_iterator_range( const ForwardRange& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+ ( r, iterator_range_detail::const_range_tag() );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ namespace iterator_range_detail
+ {
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_range_impl( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //
+ // Not worth the effort
+ //
+ //if( advance_begin == 0 && advance_end == 0 )
+ // return make_iterator_range( r );
+ //
+
+ BOOST_DEDUCED_TYPENAME range_iterator<Range>::type
+ new_begin = boost::begin( r ),
+ new_end = boost::end( r );
+ std::advance( new_begin, advance_begin );
+ std::advance( new_end, advance_end );
+ return make_iterator_range( new_begin, new_end );
+ }
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+#else
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
+ make_iterator_range( const Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ //! copy a range into a sequence
+ /*!
+ Construct a new sequence of the specified type from the elements
+ in the given range
+
+ \param Range An input range
+ \return New sequence
+ */
+ template< typename SeqT, typename Range >
+ inline SeqT copy_range( const Range& r )
+ {
+ return SeqT( boost::begin( r ), boost::end( r ) );
+ }
+
+} // namespace 'boost'
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning( pop )
+#endif
+
+#endif
+

Added: trunk/boost/range/iterator_range_io.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/iterator_range_io.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,93 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009.
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning( push )
+ #pragma warning( disable : 4996 )
+#endif
+
+// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
+#ifndef BOOST_OLD_IOSTREAMS
+# if defined(__STL_CONFIG_H) && \
+ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
+ /**/
+# define BOOST_OLD_IOSTREAMS
+# endif
+#endif // #ifndef BOOST_OLD_IOSTREAMS
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS
+# include <ostream>
+# else
+# include <ostream.h>
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+#include <boost/range/iterator_range_core.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+namespace boost
+{
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS
+
+ //! iterator_range output operator
+ /*!
+ Output the range to an ostream. Elements are outputed
+ in a sequence without separators.
+ */
+ template< typename IteratorT, typename Elem, typename Traits >
+ inline std::basic_ostream<Elem,Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& Os,
+ const iterator_range<IteratorT>& r )
+ {
+ std::copy( r.begin(), r.end(),
+ std::ostream_iterator< BOOST_DEDUCED_TYPENAME
+ iterator_value<IteratorT>::type,
+ Elem, Traits>(Os) );
+ return Os;
+ }
+
+# else
+
+ //! iterator_range output operator
+ /*!
+ Output the range to an ostream. Elements are outputed
+ in a sequence without separators.
+ */
+ template< typename IteratorT >
+ inline std::ostream& operator<<(
+ std::ostream& Os,
+ const iterator_range<IteratorT>& r )
+ {
+ std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
+ return Os;
+ }
+
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+} // namespace boost
+
+#undef BOOST_OLD_IOSTREAMS
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning(pop)
+#endif
+
+#endif // include guard

Added: trunk/boost/range/join.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/join.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_JOIN_HPP_INCLUDED
+#define BOOST_RANGE_JOIN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/detail/join_iterator.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+
+template<class SinglePassRange1, class SinglePassRange2>
+iterator_range<range_detail::join_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type,
+ BOOST_DEDUCED_TYPENAME add_const<
+ BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange1>::type>::type>
+>
+join(const SinglePassRange1& r1, const SinglePassRange2& r2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ typedef range_detail::join_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type,
+ BOOST_DEDUCED_TYPENAME add_const<
+ BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange1>::type>::type> iterator_t;
+
+ return iterator_range<iterator_t>(
+ iterator_t(r1, r2, range_detail::join_iterator_begin_tag()),
+ iterator_t(r1, r2, range_detail::join_iterator_end_tag()));
+}
+
+template<class SinglePassRange1, class SinglePassRange2>
+iterator_range<range_detail::join_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type,
+ BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type>
+>
+join(SinglePassRange1& r1, SinglePassRange2& r2)
+{
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+ BOOST_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+ typedef range_detail::join_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+ BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type,
+ BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type> iterator_t;
+
+ return iterator_range<iterator_t>(
+ iterator_t(r1, r2, range_detail::join_iterator_begin_tag()),
+ iterator_t(r1, r2, range_detail::join_iterator_end_tag()));
+}
+
+} // namespace boost
+
+#endif // include guard

Modified: trunk/boost/range/mutable_iterator.hpp
==============================================================================
--- trunk/boost/range/mutable_iterator.hpp (original)
+++ trunk/boost/range/mutable_iterator.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -21,6 +21,7 @@
 #include <boost/range/detail/iterator.hpp>
 #else
 
+#include <boost/range/detail/extract_optional_type.hpp>
 #include <boost/iterator/iterator_traits.hpp>
 #include <cstddef>
 #include <utility>
@@ -31,11 +32,13 @@
     // default
     //////////////////////////////////////////////////////////////////////////
     
+ namespace range_detail {
+ BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
+ }
+
     template< typename C >
- struct range_mutable_iterator
- {
- typedef BOOST_DEDUCED_TYPENAME C::iterator type;
- };
+ struct range_mutable_iterator : range_detail::extract_iterator<C>
+ {};
     
     //////////////////////////////////////////////////////////////////////////
     // pair

Added: trunk/boost/range/numeric.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/numeric.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file algorithm.hpp
+/// Contains range-based versions of the std algorithms
+//
+/////////////////////////////////////////////////////////////////////////////
+// Copyright 2009 Neil Groves.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Copyright 2006 Thorsten Ottosen.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Copyright 2004 Eric Niebler.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+ #pragma once
+#endif
+
+#ifndef BOOST_RANGE_NUMERIC_HPP
+#define BOOST_RANGE_NUMERIC_HPP
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <numeric>
+
+
+namespace boost
+{
+ template< class SinglePassRange, class Value >
+ inline Value accumulate( const SinglePassRange& rng, Value init )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::accumulate( boost::begin(rng), boost::end(rng), init );
+ }
+
+ template< class SinglePassRange, class Value, class BinaryOperation >
+ inline Value accumulate( const SinglePassRange& rng, Value init, BinaryOperation op )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::accumulate( boost::begin(rng), boost::end(rng), init, op );
+ }
+
+
+ template< class SinglePassRange1, class SinglePassRange2, class Value >
+ inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ BOOST_ASSERT( boost::distance(rng2) >= boost::distance(rng1) );
+ return std::inner_product( boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), init );
+ }
+
+ template< class SinglePassRange1,
+ class SinglePassRange2,
+ class Value,
+ class BinaryOperation1, class BinaryOperation2 >
+ inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ Value init,
+ BinaryOperation1 op1, BinaryOperation2 op2 )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+ BOOST_ASSERT( boost::distance(rng2) >= boost::distance(rng1) );
+
+ return std::inner_product( boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), init, op1, op2 );
+ }
+
+ template< class SinglePassRange, class OutputIterator >
+ inline OutputIterator partial_sum ( const SinglePassRange& rng,
+ OutputIterator result )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::partial_sum( boost::begin(rng), boost::end(rng), result );
+ }
+
+ template< class SinglePassRange, class OutputIterator, class BinaryOperation >
+ inline OutputIterator partial_sum ( const SinglePassRange& rng, OutputIterator result,
+ BinaryOperation op )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::partial_sum( boost::begin(rng), boost::end(rng), result, op );
+ }
+
+ template< class SinglePassRange, class OutputIterator >
+ inline OutputIterator adjacent_difference ( const SinglePassRange& rng,
+ OutputIterator result )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::adjacent_difference( boost::begin(rng), boost::end(rng),
+ result );
+ }
+
+ template< class SinglePassRange, class OutputIterator, class BinaryOperation >
+ inline OutputIterator adjacent_difference ( const SinglePassRange& rng,
+ OutputIterator result,
+ BinaryOperation op )
+ {
+ boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+ return std::adjacent_difference( boost::begin(rng), boost::end(rng),
+ result, op );
+ }
+
+}
+
+#endif

Modified: trunk/boost/range/sub_range.hpp
==============================================================================
--- trunk/boost/range/sub_range.hpp (original)
+++ trunk/boost/range/sub_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,5 +1,6 @@
 // Boost.Range library
 //
+// Copyright Neil Groves 2009.
 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
 // distribution is subject to the Boost Software License, Version
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -22,6 +23,7 @@
 #include <boost/range/value_type.hpp>
 #include <boost/range/size_type.hpp>
 #include <boost/range/difference_type.hpp>
+#include <boost/range/algorithm/equal.hpp>
 #include <boost/assert.hpp>
 #include <boost/type_traits/is_reference.hpp>
 #include <boost/type_traits/remove_reference.hpp>
@@ -151,14 +153,14 @@
     inline bool operator==( const sub_range<ForwardRange>& l,
                             const sub_range<ForwardRange2>& r )
     {
- return iterator_range_detail::equal( l, r );
+ return boost::equal( l, r );
     }
 
     template< class ForwardRange, class ForwardRange2 >
     inline bool operator!=( const sub_range<ForwardRange>& l,
                             const sub_range<ForwardRange2>& r )
     {
- return !iterator_range_detail::equal( l, r );
+ return !boost::equal( l, r );
     }
 
     template< class ForwardRange, class ForwardRange2 >

Added: trunk/boost/range/unbounded_range.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/range/unbounded_range.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,73 @@
+#ifndef BOOST_RANGE_UNBOUNDED_RANGE_HPP
+#define BOOST_RANGE_UNBOUNDED_RANGE_HPP
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+ template< class Iter >
+ struct unbounded_iterator_range : iterator_range<Iter>
+ {
+ explicit unbounded_iterator_range( Iter r )
+ : iterator_range<Iter>( r, r )
+ {
+ //
+ // Remark: by storing the same iterator
+ // twice, we can still allow
+ // comparison to execute without leading to
+ // operations on singular iterators
+ //
+ }
+
+ private:
+
+ bool empty() const
+ {
+ return false;
+ }
+ //
+ // Hide members that are illegal to use.
+ //
+ /*
+ void end() const;
+ void size() const;
+ void empty() const;
+ void equal() const;
+ operator bool() const;
+ bool operator==( unbounded_iterator_range );
+ bool operator!=( unbounded_iterator_range );
+ template< class S >
+ void operator[]( S s ) const;
+ template< class D >
+ void advance_end( D d ) const;
+ void back() const;
+ */
+ };
+
+ template< class Iter >
+ inline unbounded_iterator_range<Iter> unbounded_range( Iter r )
+ {
+ return unbounded_iterator_range<Iter>(r);
+ }
+
+ namespace detail
+ {
+ char is_unbounded_range( ... );
+ template< class Iter >
+ long is_unbounded_range( const unbounded_iterator_range<Iter>* );
+ }
+
+ template< class T >
+ struct is_unbounded_range
+ {
+ private:
+ static T* ptr_;
+
+ public:
+ BOOST_STATIC_CONSTANT( bool,
+ value = sizeof(long) == sizeof(detail::is_unbounded_range(ptr_) ) );
+ };
+}
+
+#endif

Modified: trunk/libs/range/doc/Jamfile.v2
==============================================================================
--- trunk/libs/range/doc/Jamfile.v2 (original)
+++ trunk/libs/range/doc/Jamfile.v2 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -9,25 +9,36 @@
 #//
 
 
-use-project boost : $(BOOST_ROOT) ;
-
+#use-project boost : $(BOOST_ROOT) ;
 
+project boost/libs/range/doc ;
 import boostbook : boostbook ;
-import quickbook ;
+#import quickbook ;
+using quickbook ;
+
+path-constant images_location : html ;
+
+#xml boost_range : boost_range.qbk ;
 
-xml boost_range : boost_range.qbk ;
+#boostbook standalone
 
-boostbook standalone
+boostbook quickbook
   :
- boost_range
+ boost_range.qbk
   :
- <xsl:param>toc.max.depth=2
- <xsl:param>toc.section.depth=4
- <xsl:param>chunk.section.depth=2
+ <xsl:param>boost.root=../../../..
+ <xsl:param>boost.libraries=../../../libraries.htm
+ <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ <xsl:param>chunk.section.depth=4
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>toc.section.depth=3
+ <xsl:param>toc.max.depth=3
+ <xsl:param>generate.section.toc.level=4
  
 # <xsl:param>generate.section.toc.level=4
 # <xsl:param>chunk.first.sections=7
 # <xsl:param>toc.section.depth=10
      <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+ <format>pdf:<xsl:param>img.src.path=$(images_location)/
   ;
 

Modified: trunk/libs/range/doc/boost_range.qbk
==============================================================================
--- trunk/libs/range/doc/boost_range.qbk (original)
+++ trunk/libs/range/doc/boost_range.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,7 +1,16 @@
-[article Boost.Range Documentation
- [quickbook 1.3]
- [id boost.range]
- [copyright 2003-2007 Thorsten Ottosen]
+[/==============================================================================
+ Copyright (C) 2003-2010 Thorsten Ottosen, Neil Groves
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt
+==============================================================================/]
+[library Range
+ [quickbook 1.5]
+ [version 2.0]
+ [authors [Ottosen, Thorsten], [Groves, Neil]]
+ [copyright 2003-2010 Thorsten Ottosen, Neil Groves]
+ [purpose Half-open range library]
     [license
         Distributed under the Boost Software License, Version 1.0.
         (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,19 +20,49 @@
 
 [/ Converted to Quickbook format by Darren Garvey, 2007]
 
-[def __ranges__ [link boost.range.concepts Ranges]]
-[def __range_concepts__ [link boost.range.concepts Range concepts]]
-[def __forward_range__ [link boost.range.concepts.forward_range Forward Range]]
-[def __single_pass_range__ [link boost.range.concepts.single_pass_range Single Pass Range]]
-[def __bidirectional_range__ [link boost.range.concepts.bidirectional_range Bidirectional Range]]
-[def __random_access_range__ [link boost.range.concepts.random_access_range Random Access Range]]
+[def __note__ [$images/note.png]]
+[def __alert__ [$images/alert.png]]
+[def __tip__ [$images/tip.png]]
+[def __caution__ [$images/caution.png]]
+
+[def __boost_range_home__ [link range Boost.Range]]
+[def __ranges__ [link range.concepts Ranges]]
+[def __range_concepts__ [link range.concepts Range concepts]]
+[def __forward_range__ [link range.concepts.forward_range Forward Range]]
+[def __single_pass_range__ [link range.concepts.single_pass_range Single Pass Range]]
+[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 __minimal_interface__ [link range.reference.extending minimal interface]]
+[def __range_result_iterator__ [link range.reference.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 __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 __iterator_range__ [link boost.range.utilities.iterator_range `iterator_range`]]
-[def __sub_range__ [link boost.range.utilities.sub_range `sub_range`]]
-[def __minimal_interface__ [link boost.range.reference.extending minimal interface]]
-[def __range_result_iterator__ [link boost.range.reference.semantics.metafunctions `range_result_iterator`]]
-[def __implementation_of_metafunctions__ [link boost.range.reference.semantics.metafunctions implementation of metafunctions]]
-[def __implementation_of_functions__ [link boost.range.reference.semantics.functions implementation of functions]]
+[def __range_adaptors__ [link range.reference.adaptors Range adaptors]]
+[def __range_algorithms__ [link range.reference.algorithms Range algorithms]]
 
 [def __single_pass_iterator__ [@../../libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators Single Pass Iterator]]
 [def __forward_traversal_iterator__ [@../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators Forward Traversal Iterator]]
@@ -38,1197 +77,20 @@
 [def __boost_array__ [@../../libs/array/index.html boost::array]]
 [def __the_forwarding_problem__ [@http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm The Forwarding Problem]]
 
+[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.
+[include introduction.qbk]
+[include concepts.qbk]
+[include reference.qbk]
+[include utilities.qbk]
+[include style.qbk]
+[include headers.qbk]
+[include examples.qbk]
+[include mfc_atl.qbk]
+[include upgrade.qbk]
+[include portability.qbk]
+[include faq.qbk]
+[include history_ack.qbk]
 
-
-[section Introduction]
-
-Generic algorithms have so far been specified in terms of two or more iterators. Two iterators would together form a range of values that the algorithm could work on. This leads to a very general interface, but also to a somewhat clumsy use of the algorithms with redundant specification of container names. Therefore we would like to raise the abstraction level for algorithms so they specify their interface in terms of __ranges__ as much as possible.
-
-The most common form of ranges we are used to work with is standard library containers. However, one often finds it desirable to extend that code to work with other types that offer enough functionality to satisfy the needs of the generic code if a suitable layer of indirection is applied . For example, raw arrays are often suitable for use with generic code that works with containers, provided a suitable adapter is used. Likewise, null terminated strings can be treated as containers of characters, if suitably adapted.
-
-This library therefore provides the means to adapt standard-like containers, null terminated strings, `std::pairs` of iterators, and raw arrays (and more), such that the same generic code can work with them all. The basic idea is to add another layer of indirection using __metafunctions__ and free-standing functions so syntactic and/or semantic differences can be removed.
-
-The main advantages are
-
-* simpler implementation and specification of generic range algorithms
-* more flexible, compact and maintainable client code
-* correct handling of null-terminated strings
-
-[:[*Warning: support for null-terminated strings is deprecated and will disappear in the next Boost release (1.34).]]
-
-* safe use of built-in arrays (for legacy code; why else would you use built-in arrays?)
-
-Below are given a small example (the complete example can be found [@http://www.boost.org/libs/range/test/algorithm_example.cpp here] ):
-
-``
- //
- // example: extracting bounds in a generic algorithm
- //
- template< class ForwardReadableRange, class T >
- inline typename boost::range_iterator< ForwardReadableRange >::type
- find( ForwardReadableRange& c, const T& value )
- {
- return std::find( boost::begin( c ), boost::end( c ), value );
- }
-
- template< class ForwardReadableRange, class T >
- inline typename boost::range_const_iterator< ForwardReadableRange >::type
- find( const ForwardReadableRange& c, const T& value )
- {
- return std::find( boost::begin( c ), boost::end( c ), value );
- }
-
- //
- // replace first value and return its index
- //
- template< class ForwardReadableWriteableRange, class T >
- inline typename boost::range_size< ForwardReadableWriteableRange >::type
- my_generic_replace( ForwardReadableWriteableRange& c, const T& value, const T& replacement )
- {
- typename boost::range_iterator< ForwardReadableWriteableRange >::type found = find( c, value );
-
- if( found != boost::end( c ) )
- *found = replacement;
- return std::distance( boost::begin( c ), found );
- }
-
- //
- // usage
- //
- const int N = 5;
- std::vector<int> my_vector;
- int values[] = { 1,2,3,4,5,6,7,8,9 };
-
- my_vector.assign( values, boost::end( values ) );
- typedef std::vector<int>::iterator iterator;
- std::pair<iterator,iterator> my_view( boost::begin( my_vector ),
- boost::begin( my_vector ) + N );
- char str_val[] = "a string";
- char* str = str_val;
-
- std::cout << my_generic_replace( my_vector, 4, 2 );
- std::cout << my_generic_replace( my_view, 4, 2 );
- std::cout << my_generic_replace( str, 'a', 'b' );
-
- // prints '3', '5' and '0'
-``
-
-By using the free-standing functions and __metafunctions__, the code automatically works for all the types supported by this library; now and in the future. Notice that we have to provide two version of `find()` since we cannot forward a non-const rvalue with reference arguments (see this article about __the_forwarding_problem__ ).
-
-[endsect]
-
-
-
-[section:concepts Range Concepts]
-
-[section Overview]
-
-A Range is a ['concept] similar to the STL [@http://www.sgi.com/Technology/STL/Container.html Container] concept. A Range provides iterators for accessing a half-open range `[first,one_past_last)` of elements and provides information about the number of elements in the Range. However, a Range has fewer requirements than a Container.
-
-The motivation for the Range concept is that there are many useful Container-like types that do not meet the full requirements of Container, and many algorithms that can be written with this reduced set of requirements. In particular, a Range does not necessarily
-
-* own the elements that can be accessed through it,
-* have copy semantics,
-
-Because of the second requirement, a Range object must be passed by (const or non-const) reference in generic code.
-
-The operations that can be performed on a Range is dependent on the [@../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal traversal category] of the underlying iterator type. Therefore the range concepts are named to reflect which traversal category its iterators support. See also terminology and style guidelines. for more information about naming of ranges.
-
-The concepts described below specifies associated types as [@../../libs/mpl/doc/refmanual/metafunction.html metafunctions] and all functions as free-standing functions to allow for a layer of indirection.
-
-[endsect]
-
-
-[section Single Pass Range]
-
-[h4 Notation]
-
-`X` A type that is a model of __single_pass_range__.
-`a` Object of type X.
-
-[h4 Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of __single_pass_iterator__.
-
-[h4 Associated types]
-
-[table
- []
- [[Value type ] [`boost::range_value<X>::type` ] [The type of the object stored in a Range.]]
- [[Iterator type ] [`boost::range_iterator<X>::type` ] [The type of iterator used to iterate through a Range's elements. The iterator's value type is expected to be the Range's value type. A conversion from the iterator type to the `const` iterator type must exist.]]
- [[Const iterator type] [`boost::range_const_iterator<X>::type`] [A type of iterator that may be used to examine, but not to modify, a Range's elements.]]
-]
-
-[h4 Valid expressions]
-
-The following expressions must be valid.
-
-[table
- [[Name ] [Expression ] [Return type ]]
- [[Beginning of range] [`boost::begin(a)`] [`boost::range_iterator<X>::type` if `a` is mutable,[br] `boost::range_const_iterator<X>::type` otherwise]]
- [[End of range ] [`boost::end(a)` ] [`boost::range_iterator<X>::type` if `a` is mutable,[br] `boost::range_const_iterator<X>::type` otherwise]]
- [[Is range empty? ] [boost::empty(a) ] [Convertible to bool]]
-]
-
-[h4 Expression semantics]
-
-[table
- [[Expression ] [Semantics ] [Postcondition]]
- [[`boost::begin(a)`] [Returns an iterator pointing to the first element in the Range. ] [`boost::begin(a)` is either dereferenceable or past-the-end. It is past-the-end if and only if `boost::size(a) == 0`.]]
- [[`boost::end(a)` ] [Returns an iterator pointing one past the last element in the Range. ] [`boost::end(a)` is past-the-end.]]
- [[`boost::empty(a)`] [Equivalent to `boost::begin(a) == boost::end(a)`. (But possibly faster.)] [- ]]
-]
-
-[h4 Complexity guarantees]
-
-All three functions are at most amortized linear time. For most practical purposes, one can expect `boost::begin(a)`, `boost::end(a)` and `boost::empty(a)` to be amortized constant time.
-
-[h4 Invariants]
-
-[table
- []
- [[Valid range ] [For any Range `a`, `[boost::begin(a),boost::end(a))` is a valid range, that is, `boost::end(a)` is reachable from `boost::begin(a)` in a finite number of increments.]]
-
- [[Completeness] [An algorithm that iterates through the range `[boost::begin(a),boost::end(a))` will pass through every element of `a`.]]
-]
-
-[h4 See also]
-
-__container__
-
-__implementation_of_metafunctions__
-
-__implementation_of_functions__
-
-[endsect]
-
-
-[section Forward Range]
-
-[h4 Notation]
-
-`X` A type that is a model of __forward_range__.
-`a` Object of type X.
-
-[h4 Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of __forward_traversal_iterator__.
-
-[h4 Refinement of]
-
-__single_pass_range__
-
-[h4 Associated types]
-
-[table
- []
- [[Distance type] [`boost::range_difference<X>::type`] [A signed integral type used to represent the distance between two of the Range's iterators. This type must be the same as the iterator's distance type.]]
- [[Size type ] [`boost::range_size<X>::type` ] [An unsigned integral type that can represent any nonnegative value of the Range's distance type.]]
-]
-
-[h4 Valid expressions]
-
-[table
- [[Name ] [Expression ] [Return type ]]
- [[Size of range] [`boost::size(a)`] [`boost::range_size<X>::type`]]
-]
-
-[h4 Expression semantics]
-
-[table
- [[Expression ] [Semantics] [Postcondition]]
- [[`boost::size(a)`] [Returns the size of the Range, that is, its number of elements. Note `boost::size(a) == 0u` is equivalent to `boost::empty(a)`.] [`boost::size(a) >= 0`]]
-]
-
-[h4 Complexity guarantees]
-
-`boost::size(a)` is at most amortized linear time.
-
-[h4 Invariants]
-
-[table
- []
- [[Range size] [`boost::size(a)` is equal to the distance from `boost::begin(a)` to `boost::end(a)`.]]
-]
-
-[h4 See also]
-
-__implementation_of_metafunctions__
-
-__implementation_of_functions__
-
-[endsect]
-
-
-[section Bidirectional Range]
-
-[h4 Notation]
-
-`X` A type that is a model of __bidirectional_range__.
-`a` Object of type X.
-
-[h4 Description]
-
-This concept provides access to iterators that traverse in both directions (forward and reverse). The `boost::range_iterator<X>::type` iterator must meet all of the requirements of __bidirectional_traversal_iterator__.
-
-[h4 Refinement of]
-
-__forward_range__
-
-[h4 Associated types]
-
-[table
- []
- [[Reverse Iterator type ] [`boost::range_reverse_iterator<X>::type` ] [The type of iterator used to iterate through a Range's elements in reverse order. The iterator's value type is expected to be the Range's value type. A conversion from the reverse iterator type to the const reverse iterator type must exist.]]
-
- [[Const reverse iterator type] [`boost::range_const_reverse_iterator<X>::type`] [A type of reverse iterator that may be used to examine, but not to modify, a Range's elements.]]
-]
-
-[h4 Valid expressions]
-
-[table
- [[Name ] [Expression ] [Return type] [Semantics]]
- [[Beginning of range] [`boost::rbegin(a)`] [`boost::range_reverse_iterator<X>::type` if `a` is mutable[br] `boost::range_const_reverse_iterator<X>::type` otherwise.] [Equivalent to `boost::range_reverse_iterator<X>::type(boost::end(a))`.]]
-
- [[End of range ] [`boost::rend(a)` ] [`boost::range_reverse_iterator<X>::type` if `a` is mutable,[br] `boost::range_const_reverse_iterator<X>::type` otherwise.] [Equivalent to `boost::range_reverse_iterator<X>::type(boost::begin(a))`.]]
-]
-
-[h4 Complexity guarantees]
-
-`boost::rbegin(a)` has the same complexity as `boost::end(a)` and `boost::rend(a)` has the same complexity as `boost::begin(a)` from __forward_range__.
-
-[h4 Invariants]
-
-[table
- []
- [[Valid reverse range] [For any Bidirectional Range a, `[boost::rbegin(a),boost::rend(a))` is a valid range, that is, `boost::rend(a)` is reachable from `boost::rbegin(a)` in a finite number of increments.]]
-
- [[Completeness ] [`An algorithm that iterates through the range `[boost::rbegin(a),boost::rend(a))` will pass through every element of `a`.]]
-]
-
-[h4 See also]
-
-__implementation_of_metafunctions__
-
-__implementation_of_functions__
-
-[endsect]
-
-
-[section Random Access Range]
-
-[h4 Description]
-
-A range `X` where `boost::range_iterator<X>::type` is a model of __random_access_traversal_iterator__.
-
-[h4 Refinement of]
-
-__bidirectional_range__
-
-[endsect]
-
-
-[section Concept Checking]
-
-Each of the range concepts has a corresponding concept checking class in the file [@../../boost/range/concepts.hpp `boost/range/concepts.hpp`]. These classes may be used in conjunction with the __concept_check__ to insure that the type of a template parameter is compatible with a range concept. If not, a meaningful compile time error is generated. Checks are provided for the range concepts related to iterator traversal categories. For example, the following line checks that the type `T` models the __forward_range__ concept.
-
-``
-function_requires<ForwardRangeConcept<T> >();
-``
-
-An additional concept check is required for the value access property of the range based on the range's iterator type. For example to check for a ForwardReadableRange, the following code is required.
-
-``
-function_requires<ForwardRangeConcept<T> >();
- function_requires<
- ReadableIteratorConcept<
- typename range_iterator<T>::type
- >
- >();
-``
-
-The following range concept checking classes are provided.
-
-* Class SinglePassRangeConcept checks for __single_pass_range__
-* Class ForwardRangeConcept checks for __forward_range__
-* Class BidirectionalRangeConcept checks for __bidirectional_range__
-* Class RandomAccessRangeConcept checks for __random_access_range__
-
-[h4 See also]
-
-[link boost.range.style_guide Range Terminology and style guidelines]
-
-__iterator_concepts__
-
-__concept_check__
-
-[endsect]
-
-[endsect]
-
-
-
-[section Reference]
-
-[section Overview]
-
-Four types of objects are currently supported by the library:
-
-* standard-like containers
-* `std::pair<iterator,iterator>`
-* null terminated strings (this includes `char[]`,`wchar_t[]`, `char*`, and `wchar_t*`)
-
-[:[*Warning: ['support for null-terminated strings is deprecated and will disappear in the next Boost release (1.34).]]]
-
-* 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.
-
-[endsect]
-
-
-[section Synopsis]
-
-``
-namespace boost
-{
- //
- // Single Pass Range metafunctions
- //
-
- template< class T >
- struct range_value;
-
- template< class T >
- struct range_iterator;
-
- template< class T >
- struct range_const_iterator;
-
- //
- // Forward Range metafunctions
- //
-
- template< class T >
- struct range_difference;
-
- template< class T >
- struct range_size;
-
- //
- // Bidirectional Range metafunctions
- //
-
- template< class T >
- struct range_reverse_iterator;
-
- template< class T >
- struct range_const_reverse_iterator;
-
- //
- // Special metafunctions
- //
-
- template< class T >
- struct range_result_iterator;
-
- template< class T >
- struct range_reverse_result_iterator;
-
- //
- // Single Pass Range functions
- //
-
- template< class T >
- typename range_iterator<T>::type
- begin( T& c );
-
- template< class T >
- typename range_const_iterator<T>::type
- begin( const T& c );
-
- template< class T >
- typename range_iterator<T>::type
- end( T& c );
-
- template< class T >
- typename range_const_iterator<T>::type
- end( const T& c );
-
- template< class T >
- bool
- empty( const T& c );
-
- //
- // Forward Range functions
- //
-
- template< class T >
- typename range_size<T>::type
- size( const T& c );
-
- //
- // Bidirectional Range functions
- //
-
- template< class T >
- typename range_reverse_iterator<T>::type
- rbegin( T& c );
-
- template< class T >
- typename range_const_reverse_iterator<T>::type
- rbegin( const T& c );
-
- template< class T >
- typename range_reverse_iterator<T>::type
- rend( T& c );
-
- template< class T >
- typename range_const_reverse_iterator<T>::type
- rend( const T& c );
-
- //
- // Special const Range functions
- //
-
- template< class T >
- typename range_const_iterator<T>::type
- const_begin( const T& r );
-
- template< class T >
- typename range_const_iterator<T>::type
- const_end( const T& r );
-
- template< class T >
- typename range_const_reverse_iterator<T>::type
- const_rbegin( const T& r );
-
- template< class T >
- typename range_const_reverse_iterator<T>::type
- const_rend( const T& r );
-
-} // namespace 'boost'
-``
-
-[endsect]
-
-
-[section Semantics]
-
-[h5 notation]
-
-[table
- [[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*` ]]
-]
-
-Please notice in tables below that when four lines appear in a cell, the first line will describe the primary template, the second line pairs of iterators, the third line arrays and the last line null-terminated strings.
-
-[section Metafunctions]
-
-[table
- [[Expression] [Return type] [Complexity]]
- [[`range_value<X>::type`] [`T::value_type`[br]
-`boost::iterator_value<P::first_type>::type`[br]
-`A`[br]
-`Char`] [compile time]]
- [[`range_iterator<X>::type`] [`T::iterator`[br]
-`P::first_type`[br]
-`A*`[br]
-`Char*`] [compile time]]
- [[`range_const_iterator<X>::type`] [`T::const_iterator`[br]
-`P::first_type`[br]
-`const A*`[br]
-`const Char*`] [compile time]]
- [[`range_difference<X>::type`] [`T::difference_type`[br]
-`boost::iterator_difference<P::first_type>::type`[br]
-`std::ptrdiff_t`[br]
-`std::ptrdiff_t`] [compile time]]
- [[`range_size<X>::type`] [`T::size_type`[br]
-`std::size_t`[br]
-`std::size_t`[br]
-`std::size_t`] [compile time]]
- [[`range_result_iterator<X>::type`] [`range_const_iterator<X>::type` if `X` is `const`[br]
-`range_iterator<X>::type` otherwise] [compile time]]
- [[`range_reverse_iterator<X>::type`] [`boost::reverse_iterator< typename range_iterator<T>::type >`] [compile time]]
- [[`range_const_reverse_iterator<X>::type`] [`boost::reverse_iterator< typename range_const_iterator<T>::type >`] [compile time]]
- [[`range_reverse_result_iterator<X>::type`] [`boost::reverse_iterator< typename range_result_iterator<T>::type >`] [compile time]]
-]
-
-The special metafunctions `range_result_iterator` and `range_reverse_result_iterator` are not part of any Range concept, but they are very useful when implementing certain Range classes like __sub_range__ because of their ability to select iterators based on constness.
-
-[endsect]
-
-[section Functions]
-
-[table
- [[Expression] [Return type] [Returns] [Complexity]]
-
- [[`begin(x)`] [`range_result_iterator<X>::type`] [`p.first` if `p` is of type `std::pair<T>`[br]
-`a` if `a` is an array[br]
-`s` if `s` is a string literal[br]
-`boost_range_begin(x)` if that expression would invoke a function found by ADL[br]
-`t.begin()` otherwise] [constant time]]
-
- [[`end(x)`] [`range_result_iterator<X>::type`] [`p.second` if `p` is of type `std::pair<T>`[br]
-`a + sz` if `a` is an array of size `sz`[br]
-`s + std::char_traits<X>::length( s )` if `s` is a `Char*`[br]
-`s + sz - 1` if `s` is a string literal of size `sz`[br]
-`boost_range_end(x)` if that expression would invoke a function found by ADL[br]
-`t.end()` otherwise] [linear if `X` is `Char*`
-constant time otherwise]]
-
- [[`empty(x)`] [`bool`] [`begin(x) == end( x )`] [linear if `X` is `Char*`[br]
-constant time otherwise]]
-
- [[`size(x)`] [`range_size<X>::type`] [`std::distance(p.first,p.second)` if `p` is of type `std::pair<T>`[br]
-`sz` if `a` is an array of size `sz`[br]
-`end(s) - s` if `s` is a string literal or a `Char*`[br]
-`boost_range_size(x)` if that expression would invoke a function found by ADL[br]
-`t.size()` otherwise] [linear if `X` is `Char*` or if `std::distance()` is linear[br]
-constant time otherwise]]
-
- [[`rbegin(x)`] [`range_reverse_result_iterator<X>::type`] [`range_reverse_result_iterator<X>::type( end(x) )`] [same as `end(x)`]]
-
- [[`rend(x)`] [`range_reverse_result_iterator<X>::type`] [`range_reverse_result_iterator<X>::type( begin(x) )`] [same as `begin(x)`]]
-
- [[`const_begin(x)`] [`range_const_iterator<X>::type`] [`range_const_iterator<X>::type( begin(x) )`] [same as `begin(x)`]]
-
- [[`const_end(x)`] [`range_const_iterator<X>::type`] [`range_const_iterator<X>::type( end(x) )`] [same as `end(x)`]]
-
- [[`const_rbegin(x)`] [`range_const_reverse_iterator<X>::type`] [`range_const_reverse_iterator<X>::type( rbegin(x) )`] [same as `rbegin(x)`]]
-
- [[`const_rend(x)`] [`range_const_reverse_iterator<X>::type`] [`range_const_reverse_iterator<X>::type( rend(x) )`] [same as `rend(x)`]]
-]
-
-The special const functions are not part of any Range concept, but are very useful when you want to document clearly that your code is read-only.
-
-[endsect]
-
-[endsect]
-
-[section:extending Extending the library]
-
-[section:method_1 Method 1: provide member functions and nested types]
-
-This procedure assumes that you have control over the types that should be made conformant to a Range concept. If not, see [link boost.range.reference.extending.method_2 method 2].
-
-The primary templates in this library are implemented such that standard containers will work automatically and so will __boost_array__. Below is given an overview of which member functions and member types a class must specify to be useable as a certain Range concept.
-
-[table
- [[Member function] [Related concept ]]
- [[`begin()` ] [__single_pass_range__]]
- [[`end()` ] [__single_pass_range__]]
- [[`size()` ] [__forward_range__ ]]
-]
-
-Notice that `rbegin()` and `rend()` member functions are not needed even though the container can support bidirectional iteration.
-
-The required member types are:
-
-[table
- [[Member type ] [Related concept ]]
- [[`iterator` ] [__single_pass_range__]]
- [[`const_iterator`] [__single_pass_range__]]
- [[`size_type` ] [__forward_range__ ]]
-]
-
-Again one should notice that member types `reverse_iterator` and `const_reverse_iterator` are not needed.
-
-[endsect]
-
-[section:method_2 Method 2: provide free-standing functions and specialize metafunctions]
-
-This procedure assumes that you cannot (or do not wish to) change the types that should be made conformant to a Range concept. If this is not true, see [link boost.range.reference.extending.method_1 method 1].
-
-The primary templates in this library are implemented such that certain functions are found via argument-dependent-lookup (ADL). Below is given an overview of which free-standing functions a class must specify to be useable as a certain Range concept. Let `x` be a variable (`const` or `mutable`) of the class in question.
-
-[table
- [[Function ] [Related concept ]]
- [[`boost_range_begin(x)`] [__single_pass_range__]]
- [[`boost_range_end(x)` ] [__single_pass_range__]]
- [[`boost_range_size(x)` ] [__forward_range__ ]]
-]
-
-`boost_range_begin()` and `boost_range_end()` must be overloaded for both `const` and `mutable` reference arguments.
-
-You must also specialize 3 metafunctions for your type `X`:
-
-[table
- [[Metafunction ] [Related concept ]]
- [[`boost::range_iterator` ] [__single_pass_range__]]
- [[`boost::range_const_iterator`] [__single_pass_range__]]
- [[`boost::range_size` ] [__forward_range__ ]]
-]
-
-A complete example is given here:
-
-``
- #include <boost/range.hpp>
- #include <iterator> // for std::iterator_traits, std::distance()
-
- namespace Foo
- {
- //
- // Our sample UDT. A 'Pair'
- // will work as a range when the stored
- // elements are iterators.
- //
- template< class T >
- struct Pair
- {
- T first, last;
- };
-
- } // namespace 'Foo'
-
- namespace boost
- {
- //
- // Specialize metafunctions. We must include the range.hpp header.
- // We must open the 'boost' namespace.
- //
-
- template< class T >
- struct range_iterator< Foo::Pair<T> >
- {
- typedef T type;
- };
-
- template< class T >
- struct range_const_iterator< Foo::Pair<T> >
- {
- //
- // Remark: this is defined similar to 'range_iterator'
- // because the 'Pair' type does not distinguish
- // between an iterator and a const_iterator.
- //
- typedef T type;
- };
-
- template< class T >
- struct range_size< Foo::Pair<T> >
- {
-
- typedef std::size_t type;
- };
-
- } // namespace 'boost'
-
- namespace Foo
- {
- //
- // The required functions. These should be defined in
- // the same namespace as 'Pair', in this case
- // in namespace 'Foo'.
- //
-
- template< class T >
- inline T boost_range_begin( Pair<T>& x )
- {
- return x.first;
- }
-
- template< class T >
- inline T boost_range_begin( const Pair<T>& x )
- {
- return x.first;
- }
-
- template< class T >
- inline T boost_range_end( Pair<T>& x )
- {
- return x.last;
- }
-
- template< class T >
- inline T boost_range_end( const Pair<T>& x )
- {
- return x.last;
- }
-
- template< class T >
- inline typename boost::range_size< Pair<T> >::type
- boost_range_size( const Pair<T>& x )
- {
- return std::distance(x.first,x.last);
- }
-
- } // namespace 'Foo'
-
- #include <vector>
-
- int main()
- {
- typedef std::vector<int>::iterator iter;
- std::vector<int> vec;
- Foo::Pair<iter> pair = { vec.begin(), vec.end() };
- const Foo::Pair<iter>& cpair = pair;
- //
- // Notice that we call 'begin' etc with qualification.
- //
- iter i = boost::begin( pair );
- iter e = boost::end( pair );
- i = boost::begin( cpair );
- e = boost::end( cpair );
- boost::range_size< Foo::Pair<iter> >::type s = boost::size( pair );
- s = boost::size( cpair );
- boost::range_const_reverse_iterator< Foo::Pair<iter> >::type
- ri = boost::rbegin( cpair ),
- re = boost::rend( cpair );
- }
-``
-
-[endsect]
-
-[endsect]
-
-[endsect]
-
-
-
-[section Utilities]
-
-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`
-
-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.
-
-[section:iterator_range Class `iterator_range`]
-
-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 Forward 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 means that the `iterator_range` will still be usable in many contexts even though the iterators underneath are not.
-
-[h4 Synopsis]
-
-``
-namespace boost
-{
- template< class ForwardTraversalIterator >
- class iterator_range
- {
- public: // Forward Range types
- typedef ... value_type;
- typedef ... difference_type;
- typedef ... size_type;
- typedef ForwardTraversalIterator iterator;
- typedef ForwardTraversalIterator const_iterator;
-
- 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;
- size_type size() const;
- bool empty() const;
-
- public: // convenience
- operator unspecified_bool_type() const;
- bool equal( const iterator_range& ) const;
- value_type& front() const;
- value_type& back() const;
- // for Random Access Range only:
- value_type& operator[]( size_type at ) 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 iterator_of<ForwardRange>::type >
- make_iterator_range( ForwardRange& r );
-
- template< class ForwardRange >
- iterator_range< typename const_iterator_of<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_const_iterator<Range>::type >
- make_iterator_range( const Range& r,
- typename range_difference<Range>::type advance_begin,
- typename range_difference<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.
-
-[h4 Details member functions]
-
-`operator unspecified_bool_type() const;`
-
-[:['[*Returns]] `!empty();`]
-
-`bool equal( iterator_range& r ) const;`
-
-[:['[*Returns]] `begin() == r.begin() && end() == r.end();`]
-
-[h4 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) );`]
-
-[endsect]
-
-[section:sub_range Class `sub_range`]
-
-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.
-
-[h4 Synopsis]
-
-``
-namespace boost
-{
- template< class ForwardRange >
- class sub_range : public iterator_range< typename range_result_iterator<ForwardRange>::type >
- {
- public:
- typedef typename range_result_iterator<ForwardRange>::type iterator;
- typedef typename range_const_iterator<ForwardRange>::type const_iterator;
-
- 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" );
-``
-
-[endsect]
-
-[endsect]
-
-
-
-[section:style_guide Terminology and style guidelines]
-
-The use of a consistent terminology is as important for __ranges__ and range-based algorithms as it is for iterators and iterator-based algorithms. If a conventional set of names are adopted, we can avoid misunderstandings and write generic function prototypes that are ['self-documenting].
-
-Since ranges are characterized by a specific underlying iterator type, we get a type of range for each type of iterator. Hence we can speak of the following types of ranges:
-
-* ['Value access] category:
- * Readable Range
- * Writeable Range
- * Swappable Range
- * Lvalue Range
-* ['Traversal] category:
- * __single_pass_range__
- * __forward_range__
- * __bidirectional_range__
- * __random_access_range__
-
-Notice how we have used the categories from the __new_style_iterators__.
-
-Notice that an iterator (and therefore an range) has one ['traversal] property and one or more properties from the ['value access] category. So in reality we will mostly talk about mixtures such as
-
-* Random Access Readable Writeable Range
-* Forward Lvalue Range
-
-By convention, we should always specify the ['traversal] property first as done above. This seems reasonable since there will only be one ['traversal] property, but perhaps many ['value access] properties.
-
-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 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] property (Single Pass).
-
-As another example, consider how we specify the interface of `std::sort()`. Algorithms are usually more cumbersome to specify the interface of since both traversal and value access properties must be exactly defined. The iterator-based version looks like this:
-
-``
- template< class RandomAccessTraversalReadableWritableIterator >
- void sort( RandomAccessTraversalReadableWritableIterator first,
- RandomAccessTraversalReadableWritableIterator last );
-``
-
-For ranges the interface becomes
-
-``
- template< class RandomAccessReadableWritableRange >
- void sort( RandomAccessReadableWritableRange& r );
-``
-
-[endsect]
-
-
-
-[section Library Headers]
-
-[table
- [[Header ] [Includes ] [Related Concept ]]
- [[`<boost/range.hpp>` ] [everything ] [- ]]
- [[`<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/const_iterator.hpp>` ] [`range_const_iterator` ] [__single_pass_range__ ]]
- [[`<boost/range/difference_type.hpp>` ] [`range_difference` ] [__forward_range__ ]]
- [[`<boost/range/size_type.hpp>` ] [`range_size` ] [__forward_range__ ]]
- [[`<boost/range/result_iterator.hpp>` ] [`range_result_iterator` ] [- ]]
- [[`<boost/range/reverse_iterator.hpp>`] [`range_reverse_iterator` ] [__bidirectional_range__ ]]
- [[`<boost/range/const_reverse_iterator.hpp>`]
- [`range_const_reverse_iterator`]
- [_bidirectional_range__ ]]
- [[`<boost/range/reverse_result_iterator.hpp>`]
- [`range_reverse_result_iterator`]
- [- ]]
- [[`<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/size.hpp>` ] [`size` ] [__forward_range__ ]]
- [[`<boost/range/rbegin.hpp>` ] [`rbegin` and `const_rbegin`] [__bidirectional_range__ ]]
- [[`<boost/range/rend.hpp>` ] [`rend` and `const_rend` ] [__bidirectional_range__ ]]
- [[`<boost/range/iterator_range.hpp>` ] [`iterator_range` ] [- ]]
- [[`<boost/range/sub_range.hpp>` ] [`sub_range` ] [- ]]
- [[`<boost/range/concepts.hpp>` ] [`concept checks` ] [- ]]
-]
-
-[endsect]
-
-
-
-[section Examples]
-
-Some examples are given in the accompanying test files:
-
-* [@http://www.boost.org/libs/range/test/string.cpp string.cpp][br]
-shows how to implement a container version of `std::find()` that works with `char[]`,`wchar_t[]`,`char*`,`wchar_t*`.
-
-[:[*Warning: ['support for null-terminated strings is deprecated and will disappear in the next Boost release (1.34).]]]
-
-* [@http://www.boost.org/libs/range/test/algorithm_example.cpp algorithm_example.cpp][br]shows the replace example from the introduction.
-
-* [@http://www.boost.org/libs/range/test/iterator_range.cpp iterator_range.cpp]
-
-* [@http://www.boost.org/libs/range/test/sub_range.cpp sub_range.cpp]
-
-* [@http://www.boost.org/libs/range/test/iterator_pair.cpp iterator_pair.cpp]
-
-* [@http://www.boost.org/libs/range/test/reversible_range.cpp reversible_range.cpp]
-
-* [@http://www.boost.org/libs/range/test/std_container.cpp std_container.cpp]
-
-* [@http://www.boost.org/libs/range/test/array.cpp array.cpp]
-
-[endsect]
-
-
-
-[section Portability]
-
-A huge effort has been made to port the library to as many compilers as possible.
-
-Full support for built-in arrays require that the compiler supports class template partial specialization. For non-conforming compilers there might be a chance that it works anyway thanks to workarounds in the type traits library.
-Visual C++ 6/7.0 has a limited support for arrays: as long as the arrays are of built-in type it should work.
-
-Notice also that some compilers cannot do function template ordering properly. In that case one must rely of __range_result_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.
-
-For maximum portability you should follow these guidelines:
-
-# do not use built-in arrays,
-# do not pass rvalues to `begin()`, `end()` and `iterator_range` Range constructors and assignment operators,
-# use `const_begin()` and `const_end()` whenever your code by intention is read-only; this will also solve most rvalue problems,
-# do not rely on ADL:
- * if you overload functions, include that header before the headers in this library,
- * put all overloads in namespace boost.
-
-
-
-[endsect]
-
-
-
-[section FAQ]
-
-1. ['[*Why is there no difference between `range_iterator<C>::type` and `range_const_iterator<C>::type` for `std::pair<iterator, iterator>`?]]
-
-[:In general it is not possible nor desirable to find a corresponding `const_iterator`. When it is possible to come up with one, the client might choose to construct a `std::pair<const_iterator,const_iterator>` object.]
-
-[:Note that an __iterator_range__ is somewhat more convenient than a `pair` and that a __sub_range__ does propagate const-ness.]
-
-2. ['[*Why is there not supplied more types or more functions?]]
-
-[:The library has been kept small because its current interface will serve most purposes. If and when a genuine need arises for more functionality, it can be implemented.]
-
-3. ['[*How should I implement generic algorithms for ranges?]]
-
-[:One should always start with a generic algorithm that takes two iterators (or more) as input. Then use Boost.Range to build handier versions on top of the iterator based algorithm. Please notice that once the range version of the algorithm is done, it makes sense not to expose the iterator version in the public interface.]
-
-4. ['[*Why is there no Incrementable Range concept?]]
-
-[:Even though we speak of incrementable iterators, it would not make much sense for ranges; for example, we cannot determine the size and emptiness of a range since we cannot even compare its iterators.]
-
-[:Note also that incrementable iterators are derived from output iterators and so there exist no output range.]
-
-[endsect]
-
-[section:history_ack History and Acknowledgement]
-
-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.
-
-Special thanks goes to
-
-* Pavol Droba for help with documentation and implementation
-* 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.
-
-The concept checks and their documentation was provided by Daniel Walker.
-
-[endsect]
\ No newline at end of file

Added: trunk/libs/range/doc/concepts.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/concepts.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,251 @@
+[section:concepts Range Concepts]
+
+[section Overview]
+
+A Range is a [*/concept/] similar to the STL [@http://www.sgi.com/Technology/STL/Container.html Container] concept. A Range provides iterators for accessing a half-open range `[first,one_past_last)` of elements and provides information about the number of elements in the Range. However, a Range has fewer requirements than a Container.
+
+The motivation for the Range concept is that there are many useful Container-like types that do not meet the full requirements of Container, and many algorithms that can be written with this reduced set of requirements. In particular, a Range does not necessarily
+
+* own the elements that can be accessed through it,
+* have copy semantics,
+
+Because of the second requirement, a Range object must be passed by (const or non-const) reference in generic code.
+
+The operations that can be performed on a Range is dependent on the [@../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal traversal category] of the underlying iterator type. Therefore the range concepts are named to reflect which traversal category its iterators support. See also terminology and style guidelines. for more information about naming of ranges.
+
+The concepts described below specifies associated types as [@../../libs/mpl/doc/refmanual/metafunction.html metafunctions] and all functions as free-standing functions to allow for a layer of indirection.
+
+[endsect]
+
+
+[section Single Pass Range]
+
+[heading Notation]
+
+[table
+ []
+ [[`X`] [A type that is a model of __single_pass_range__.]]
+ [[`a`] [Object of type X.]]
+]
+
+[heading Description]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of __single_pass_iterator__.
+
+[heading Associated types]
+
+[table
+ []
+ [[Iterator type ] [`boost::range_iterator<X>::type` ] [The type of iterator used to iterate through a Range's elements. The iterator's value type is expected to be the Range's value type. A conversion from the iterator type to the `const` iterator type must exist.]]
+ [[Const iterator type] [`boost::range_iterator<const X>::type`] [A type of iterator that may be used to examine, but not to modify, a Range's elements.]]
+]
+
+[heading Valid expressions]
+
+The following expressions must be valid.
+
+[table
+ [[Name ] [Expression ] [Return type ]]
+ [[Beginning of range] [`boost::begin(a)`] [`boost::range_iterator<X>::type` if `a` is mutable, `boost::range_iterator<const X>::type` otherwise]]
+ [[End of range ] [`boost::end(a)` ] [`boost::range_iterator<X>::type` if `a` is mutable, `boost::range_iterator<const X>::type` otherwise]]
+]
+
+[heading Expression semantics]
+
+[table
+ [[Expression ] [Semantics ] [Postcondition]]
+ [[`boost::begin(a)`] [Returns an iterator pointing to the first element in the Range. ] [`boost::begin(a)` is either dereferenceable or past-the-end. It is past-the-end if and only if `boost::distance(a) == 0`.]]
+ [[`boost::end(a)` ] [Returns an iterator pointing one past the last element in the Range. ] [`boost::end(a)` is past-the-end.]]
+]
+
+[heading Complexity guarantees]
+
+`boost::end(a)` is at most amortized linear time, `boost::begin(a)` is amortized constant time. For most practical purposes, one can expect both to be amortized constant time.
+
+[heading Invariants]
+
+[table
+ []
+ [[Valid range ] [For any Range `a`, `[boost::begin(a),boost::end(a))` is a valid range, that is, `boost::end(a)` is reachable from `boost::begin(a)` in a finite number of increments.]]
+
+ [[Completeness] [An algorithm that iterates through the range `[boost::begin(a),boost::end(a))` will pass through every element of `a`.]]
+]
+
+[heading See also]
+
+__extending_for_udts__
+
+__implementation_of_metafunctions__
+
+__implementation_of_functions__
+
+__container__
+
+[endsect]
+
+
+[section Forward Range]
+
+[heading Notation]
+
+[table
+ []
+ [[`X`] [A type that is a model of __forward_range__.]]
+ [[`a`] [Object of type X.]]
+]
+
+[heading Description]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of __forward_traversal_iterator__.
+
+[heading Refinement of]
+
+__single_pass_range__
+
+[heading Associated types]
+
+[table
+ []
+ [[Distance type] [`boost::range_difference<X>::type`] [A signed integral type used to represent the distance between two of the Range's iterators. This type must be the same as the iterator's distance type.]]
+ [[Size type ] [`boost::range_size<X>::type` ] [An unsigned integral type that can represent any nonnegative value of the Range's distance type.]]
+]
+
+[heading See also]
+
+__implementation_of_metafunctions__
+
+__implementation_of_functions__
+
+[endsect]
+
+
+[section Bidirectional Range]
+
+[heading Notation]
+
+[table
+ []
+ [[`X`] [A type that is a model of __bidirectional_range__.]]
+ [[`a`] [Object of type X.]]
+]
+
+[heading Description]
+
+This concept provides access to iterators that traverse in both directions (forward and reverse). The `boost::range_iterator<X>::type` iterator must meet all of the requirements of __bidirectional_traversal_iterator__.
+
+[heading Refinement of]
+
+__forward_range__
+
+[heading Associated types]
+
+[table
+ []
+ [[Reverse Iterator type ] [`boost::range_reverse_iterator<X>::type` ] [The type of iterator used to iterate through a Range's elements in reverse order. The iterator's value type is expected to be the Range's value type. A conversion from the reverse iterator type to the const reverse iterator type must exist.]]
+
+ [[Const reverse iterator type] [`boost::range_reverse_iterator<const X>::type`] [A type of reverse iterator that may be used to examine, but not to modify, a Range's elements.]]
+]
+
+[heading Valid expressions]
+
+[table
+ [[Name ] [Expression ] [Return type] [Semantics]]
+ [[Beginning of range] [`boost::rbegin(a)`] [`boost::range_reverse_iterator<X>::type` if `a` is mutable `boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to `boost::range_reverse_iterator<X>::type(boost::end(a))`.]]
+
+ [[End of range ] [`boost::rend(a)` ] [`boost::range_reverse_iterator<X>::type` if `a` is mutable, `boost::range_reverse_iterator<const X>::type` otherwise.] [Equivalent to `boost::range_reverse_iterator<X>::type(boost::begin(a))`.]]
+]
+
+[heading Complexity guarantees]
+
+`boost::rbegin(a)` has the same complexity as `boost::end(a)` and `boost::rend(a)` has the same complexity as `boost::begin(a)` from __forward_range__.
+
+[heading Invariants]
+
+[table
+ []
+ [[Valid reverse range] [For any Bidirectional Range a, `[boost::rbegin(a),boost::rend(a))` is a valid range, that is, `boost::rend(a)` is reachable from `boost::rbegin(a)` in a finite number of increments.]]
+
+ [[Completeness ] [`An algorithm that iterates through the range `[boost::rbegin(a),boost::rend(a))` will pass through every element of `a`.]]
+]
+
+[heading See also]
+
+__implementation_of_metafunctions__
+
+__implementation_of_functions__
+
+[endsect]
+
+
+[section Random Access Range]
+
+[heading Description]
+
+A range `X` where `boost::range_iterator<X>::type` is a model of __random_access_traversal_iterator__.
+
+[heading Refinement of]
+
+__bidirectional_range__
+
+[heading Valid expressions]
+
+[table
+ [[Name ] [Expression ] [Return type ]]
+ [[Size of range] [`boost::size(a)`] [`boost::range_size<X>::type`]]
+]
+
+[heading Expression semantics]
+
+[table
+ [[Expression ] [Semantics] [Postcondition]]
+ [[`boost::size(a)`] [Returns the size of the Range, that is, its number of elements. Note `boost::size(a) == 0u` is equivalent to `boost::empty(a)`.] [`boost::size(a) >= 0`]]
+]
+
+[heading Complexity guarantees]
+
+`boost::size(a)` is completes in amortized constant time.
+
+[heading Invariants]
+
+[table
+ []
+ [[Range size] [`boost::size(a)` is equal to the `boost::end(a)` - `boost::begin(a)`.]]
+]
+
+[endsect]
+
+
+[section Concept Checking]
+
+Each of the range concepts has a corresponding concept checking class in the file [@../../boost/range/concepts.hpp `<boost/range/concepts.hpp>`]. These classes may be used in conjunction with the __concept_check__ to ensure that the type of a template parameter is compatible with a range concept. If not, a meaningful compile time error is generated. Checks are provided for the range concepts related to iterator traversal categories. For example, the following line checks that the type `T` models the __forward_range__ concept.
+
+``
+BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<T> ));
+``
+
+An additional concept check is required for the value access property of the range based on the range's iterator type. For example to check for a ForwardReadableRange, the following code is required.
+
+``
+BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<T> ));
+BOOST_CONCEPT_ASSERT(( ReadableIteratorConcept<typename range_iterator<T>::type> ));
+``
+
+The following range concept checking classes are provided.
+
+* Class SinglePassRangeConcept checks for __single_pass_range__
+* Class ForwardRangeConcept checks for __forward_range__
+* Class BidirectionalRangeConcept checks for __bidirectional_range__
+* Class RandomAccessRangeConcept checks for __random_access_range__
+
+[heading See also]
+
+[link range.style_guide Range Terminology and style guidelines]
+
+__iterator_concepts__
+
+__concept_check__
+
+[endsect]
+
+[endsect]
+

Added: trunk/libs/range/doc/counting_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/counting_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Boost.Range Utilities</title>
+ <link rel="stylesheet" href="style.css" type="text/css" />
+</head>
+
+ <body>
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range</h1></td>
+ </tr>
+ </table>
+ <a name="counting_range"></a> <h1>Function <code>counting_range</code></h1>
+ <p>
+ The intention of the <code>counting_range</code> function is to construct
+ a new range with iterators that are wrapped in a
+ <code>counting_iterator</code> (from Boost.Iterator)
+ </p>
+
+ <h3>Synopsis</h3>
+
+ <pre><span class="keyword">namespace </span><span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt; </span><span class="keyword">class </span><span class="identifier">Incrementable</span><span class="identifier"> </span><span class="special">&gt; <span style="color: #0000ff">inline</span>
+ </span><span class="keyword"></span><span class="identifier">range&lt; counting_iterator&lt;Incrementable&gt; &gt;
+ counting_range(Incrementable first, Incrementable last);
+
+ <span class="keyword">template</span><span class="special">&lt; </span><span class="keyword">class </span><span class="identifier">SinglePassRange</span><span class="identifier"> </span><span class="special">&gt; </span><span class="keyword">inline
+ </span><span class="identifier">range&lt; counting_iterator&lt;<span class="keyword">typename</span> range_iterator&lt;SinglePassRange&gt;::type &gt;
+ counting_range(<span class="keyword">const</span> Range&amp; rng);
+
+ </span><span class="keyword">template</span><span class="special">&lt; </span><span class="keyword">class </span><span class="identifier">SinglePassRange</span><span class="identifier"> </span><span class="special">&gt; <span style="color: #0000ff">inline</span></span>
+ <span class="identifier">range&lt; counting_iterator&lt;<span style="color: #0000ff">typename</span> range_iterator&lt;SinglePassRange&gt;::type &gt;
+ counting_range(Range&amp; rng);
+ </span></span><span class="special"></span><span class="special"></span><span class="special"> </span>
+<span class="special">} </span><span class="comment">// namespace 'boost'</span>
+ </pre>
+
+ <p>
+ &copy; <a name="Copyright" id="Copyright">Copyright</a> Neil Groves 2009.
+</p>
+
+ <p>
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy
+ at <a href=
+ "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+
+
+ </body>
+</html>
+

Added: trunk/libs/range/doc/examples.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/examples.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,23 @@
+[section Examples]
+
+Some examples are given in the accompanying test files:
+
+* [@http://www.boost.org/libs/range/test/string.cpp string.cpp] shows how to implement a container version of `std::find()` that works with `char[]`,`wchar_t[]`,`char*`,`wchar_t*`.
+
+* [@http://www.boost.org/libs/range/test/algorithm_example.cpp algorithm_example.cpp] shows the replace example from the introduction.
+
+* [@http://www.boost.org/libs/range/test/iterator_range.cpp iterator_range.cpp]
+
+* [@http://www.boost.org/libs/range/test/sub_range.cpp sub_range.cpp]
+
+* [@http://www.boost.org/libs/range/test/iterator_pair.cpp iterator_pair.cpp]
+
+* [@http://www.boost.org/libs/range/test/reversible_range.cpp reversible_range.cpp]
+
+* [@http://www.boost.org/libs/range/test/std_container.cpp std_container.cpp]
+
+* [@http://www.boost.org/libs/range/test/array.cpp array.cpp]
+
+[endsect]
+
+

Added: trunk/libs/range/doc/faq.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/faq.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,25 @@
+[section FAQ]
+
+1. ['[*Why is there no difference between `range_iterator<C>::type` and `range_const_iterator<C>::type` for `std::pair<iterator, iterator>`?]]
+
+[:In general it is not possible nor desirable to find a corresponding `const_iterator`. When it is possible to come up with one, the client might choose to construct a `std::pair<const_iterator,const_iterator>` object.]
+
+[:Note that an __iterator_range__ is somewhat more convenient than a `pair` and that a __sub_range__ does propagate const-ness.]
+
+2. ['[*Why is there not supplied more types or more functions?]]
+
+[:The library has been kept small because its current interface will serve most purposes. If and when a genuine need arises for more functionality, it can be implemented.]
+
+3. ['[*How should I implement generic algorithms for ranges?]]
+
+[:One should always start with a generic algorithm that takes two iterators (or more) as input. Then use Boost.Range to build handier versions on top of the iterator based algorithm. Please notice that once the range version of the algorithm is done, it makes sense not to expose the iterator version in the public interface.]
+
+4. ['[*Why is there no Incrementable Range concept?]]
+
+[:Even though we speak of incrementable iterators, it would not make much sense for ranges; for example, we cannot determine the size and emptiness of a range since we cannot even compare its iterators.]
+
+[:Note also that incrementable iterators are derived from output iterators and so there exist no output range.]
+
+[endsect]
+
+

Added: trunk/libs/range/doc/headers.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/headers.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,29 @@
+[section Library Headers]
+
+[table
+ [[Header ] [Includes ] [Related Concept ]]
+ [[`<boost/range.hpp>` ] [everything ] [- ]]
+ [[`<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__ ] [- ]]
+]
+
+[endsect]
+

Added: trunk/libs/range/doc/history_ack.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/history_ack.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+[section:history_ack History and Acknowledgement]
+
+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.
+
+Special thanks goes to
+
+* Pavol Droba for help with documentation and implementation
+* 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.
+
+The concept checks and their documentation was provided by Daniel Walker.
+
+[endsect]
+

Added: trunk/libs/range/doc/html/index.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/index.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,144 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;Range 2.0</title>
+<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="next" href="range/introduction.html" title="Introduction">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="range/introduction.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="chapter" title="Chapter&#160;1.&#160;Range 2.0">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="range"></a>Chapter&#160;1.&#160;Range 2.0</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Thorsten</span> <span class="surname">Ottosen</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Neil</span> <span class="surname">Groves</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves</p></div>
+<div><div class="legalnotice" title="Legal Notice">
+<a name="id3156350"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Introduction</span></dt>
+<dt><span class="section"> Range Concepts</span></dt>
+<dd><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Single Pass Range</span></dt>
+<dt><span class="section">Forward Range</span></dt>
+<dt><span class="section">Bidirectional Range</span></dt>
+<dt><span class="section">Random Access Range</span></dt>
+<dt><span class="section">Concept Checking</span></dt>
+</dl></dd>
+<dt><span class="section">Reference</span></dt>
+<dd><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Semantics</span></dt>
+<dd><dl>
+<dt><span class="section">Metafunctions</span></dt>
+<dt><span class="section">Functions</span></dt>
+</dl></dd>
+<dt><span class="section"> Range Adaptors</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="range/reference/adaptors/adaptors_introduction.html"> Introduction
+ and motivation</a></span></dt>
+<dt><span class="section"> Synopsis</span></dt>
+<dt><span class="section"><a href="range/reference/adaptors/adaptors_general_requirements.html">
+ General Requirements</a></span></dt>
+<dt><span class="section"> Reference</span></dt>
+</dl></dd>
+<dt><span class="section"> Range Algorithm</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="range/reference/algorithms/range_algorithm_introduction.html">
+ Introduction and motivation</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/range_algorithm_mutating_algorithms.html">
+ Mutating algorithms</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/range_algorithm_non_mutating_algorithms.html">
+ Non-mutating algorithms</a></span></dt>
+<dt><span class="section"> Set algorithms</span></dt>
+<dt><span class="section"> Heap algorithms</span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/permutation_algorithms.html">
+ Permutation algorithms</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/range_algorithm_new_algorithms.html">
+ New algorithms</a></span></dt>
+<dt><span class="section"><a href="range/reference/algorithms/range_numeric.html"> Numeric
+ algorithms</a></span></dt>
+</dl></dd>
+<dt><span class="section"> Provided Ranges</span></dt>
+<dd><dl>
+<dt><span class="section"> counting_range</span></dt>
+<dt><span class="section"> istream_range</span></dt>
+<dt><span class="section"> irange</span></dt>
+</dl></dd>
+<dt><span class="section"> Extending the library</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="range/reference/extending/method_1.html"> Method 1: provide
+ member functions and nested types</a></span></dt>
+<dt><span class="section"><a href="range/reference/extending/method_2.html"> Method 2: provide
+ free-standing functions and specialize metafunctions</a></span></dt>
+<dt><span class="section"><a href="range/reference/extending/method_3.html"> Method 3: provide
+ range adaptor implementations</a></span></dt>
+</dl></dd>
+</dl></dd>
+<dt><span class="section"> Utilities</span></dt>
+<dd><dl>
+<dt><span class="section"> Class iterator_range</span></dt>
+<dt><span class="section"> Class sub_range</span></dt>
+<dt><span class="section"> Function join</span></dt>
+</dl></dd>
+<dt><span class="section"> Terminology and style guidelines</span></dt>
+<dt><span class="section">Library Headers</span></dt>
+<dt><span class="section">Examples</span></dt>
+<dt><span class="section"> MFC/ATL (courtesy of Shunsuke Sogame)</span></dt>
+<dd><dl>
+<dt><span class="section"> Requirements</span></dt>
+<dt><span class="section"> MFC Ranges</span></dt>
+<dt><span class="section"> ATL Ranges</span></dt>
+<dt><span class="section"> const Ranges</span></dt>
+<dt><span class="section"> References</span></dt>
+</dl></dd>
+<dt><span class="section"> Upgrade version of Boost.Range</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="range/upgrade/upgrade_from_1_42.html"> Upgrade from version
+ 1.42</a></span></dt>
+<dt><span class="section"><a href="range/upgrade/upgrade_from_1_34.html"> Upgrade from version
+ 1.34</a></span></dt>
+</dl></dd>
+<dt><span class="section">Portability</span></dt>
+<dt><span class="section">FAQ</span></dt>
+<dt><span class="section"> History and Acknowledgement</span></dt>
+</dl>
+</div>
+<p>
+ Boost.Range is a collection of concepts and utilities that are particularly useful
+ for specifying and implementing generic algorithms.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: March 28, 2010 at 14:28:09 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="range/introduction.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/quickbook_HTML.manifest
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/quickbook_HTML.manifest 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,132 @@
+index.html
+range/introduction.html
+range/concepts.html
+range/concepts/overview.html
+range/concepts/single_pass_range.html
+range/concepts/forward_range.html
+range/concepts/bidirectional_range.html
+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/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/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/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/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/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/ranges.html
+range/reference/ranges/counting_range.html
+range/reference/ranges/istream_range.html
+range/reference/ranges/irange.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/examples.html
+range/mfc_atl.html
+range/mfc_atl/requirements.html
+range/mfc_atl/mfc_ranges.html
+range/mfc_atl/atl_ranges.html
+range/mfc_atl/const_ranges.html
+range/mfc_atl/references.html
+range/upgrade.html
+range/upgrade/upgrade_from_1_42.html
+range/upgrade/upgrade_from_1_34.html
+range/portability.html
+range/faq.html
+range/history_ack.html

Added: trunk/libs/range/doc/html/range/concepts.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Concepts</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="introduction.html" title="Introduction">
+<link rel="next" href="concepts/overview.html" title="Overview">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="introduction.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/overview.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Concepts">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.concepts"></a><a class="link" href="concepts.html" title="Range Concepts"> Range Concepts</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Single Pass Range</span></dt>
+<dt><span class="section">Forward Range</span></dt>
+<dt><span class="section">Bidirectional Range</span></dt>
+<dt><span class="section">Random Access Range</span></dt>
+<dt><span class="section">Concept Checking</span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="introduction.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/overview.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/bidirectional_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/bidirectional_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,305 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Bidirectional Range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="forward_range.html" title="Forward Range">
+<link rel="next" href="random_access_range.html" title="Random Access Range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="forward_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Bidirectional Range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.bidirectional_range"></a><a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
+</h3></div></div></div>
+<a name="range.concepts.bidirectional_range.notation"></a><h5>
+<a name="id3168757"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.notation">Notation</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type that is a model of <a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Object of type X.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.bidirectional_range.description"></a><h5>
+<a name="id3168855"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.description">Description</a>
+ </h5>
+<p>
+ This concept provides access to iterators that traverse in both directions
+ (forward and reverse). The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> iterator must meet all of the requirements
+ of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators" target="_top">Bidirectional
+ Traversal Iterator</a>.
+ </p>
+<a name="range.concepts.bidirectional_range.refinement_of"></a><h5>
+<a name="id3168920"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.refinement_of">Refinement
+ of</a>
+ </h5>
+<p>
+ <a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+<a name="range.concepts.bidirectional_range.associated_types"></a><h5>
+<a name="id3168949"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.associated_types">Associated
+ types</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Reverse Iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of iterator used to iterate through a Range's elements
+ in reverse order. The iterator's value type is expected to be the
+ Range's value type. A conversion from the reverse iterator type
+ to the const reverse iterator type must exist.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Const reverse iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type of reverse iterator that may be used to examine, but not
+ to modify, a Range's elements.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.bidirectional_range.valid_expressions"></a><h5>
+<a name="id3169115"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.valid_expressions">Valid
+ expressions</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Beginning of range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
+ is mutable <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise.
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ End of range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
+ is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise.
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.bidirectional_range.complexity_guarantees"></a><h5>
+<a name="id3169594"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.complexity_guarantees">Complexity
+ guarantees</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> has
+ the same complexity as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> and
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> has the same complexity as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> from
+ <a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>.
+ </p>
+<a name="range.concepts.bidirectional_range.invariants"></a><h5>
+<a name="id3169745"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.invariants">Invariants</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Valid reverse range
+ </p>
+ </td>
+<td>
+ <p>
+ For any Bidirectional Range a, <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>
+ is a valid range, that is, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is reachable from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ in a finite number of increments.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Completeness
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">An</span> <span class="identifier">algorithm</span>
+ <span class="identifier">that</span> <span class="identifier">iterates</span>
+ <span class="identifier">through</span> <span class="identifier">the</span>
+ <span class="identifier">range</span> </code>[boost::rbegin(a),boost::rend(a))<code class="computeroutput">
+ <span class="identifier">will</span> <span class="identifier">pass</span>
+ <span class="identifier">through</span> <span class="identifier">every</span>
+ <span class="identifier">element</span> <span class="identifier">of</span>
+ </code>a`.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.bidirectional_range.see_also"></a><h5>
+<a name="id3170015"></a>
+ <a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.see_also">See also</a>
+ </h5>
+<p>
+ <a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
+ metafunctions</a>
+ </p>
+<p>
+ <a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</a>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="forward_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/concept_checking.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/concept_checking.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,108 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Concept Checking</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="random_access_range.html" title="Random Access Range">
+<link rel="next" href="../reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="random_access_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Concept Checking">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.concept_checking"></a><a class="link" href="concept_checking.html" title="Concept Checking">Concept Checking</a>
+</h3></div></div></div>
+<p>
+ Each of the range concepts has a corresponding concept checking class in
+ the file <boost/range/concepts.hpp>.
+ These classes may be used in conjunction with the <a href="../../../../libs/concept_check/index.html" target="_top">Boost
+ Concept Check library</a> to ensure that the type of a template parameter
+ is compatible with a range concept. If not, a meaningful compile time error
+ is generated. Checks are provided for the range concepts related to iterator
+ traversal categories. For example, the following line checks that the type
+ <code class="computeroutput"><span class="identifier">T</span></code> models the <a class="link" href="forward_range.html" title="Forward Range">Forward
+ Range</a> concept.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ForwardRangeConcept</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ An additional concept check is required for the value access property of
+ the range based on the range's iterator type. For example to check for a
+ ForwardReadableRange, the following code is required.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ForwardRangeConcept</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">));</span>
+<span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ReadableIteratorConcept</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ The following range concept checking classes are provided.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Class SinglePassRangeConcept checks for <a class="link" href="single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a>
+</li>
+<li class="listitem">
+ Class ForwardRangeConcept checks for <a class="link" href="forward_range.html" title="Forward Range">Forward
+ Range</a>
+</li>
+<li class="listitem">
+ Class BidirectionalRangeConcept checks for <a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+</li>
+<li class="listitem">
+ Class RandomAccessRangeConcept checks for <a class="link" href="random_access_range.html" title="Random Access Range">Random
+ Access Range</a>
+</li>
+</ul></div>
+<a name="range.concepts.concept_checking.see_also"></a><h5>
+<a name="id3171025"></a>
+ <a class="link" href="concept_checking.html#range.concepts.concept_checking.see_also">See also</a>
+ </h5>
+<p>
+ <a class="link" href="../style_guide.html" title="Terminology and style guidelines">Range Terminology and style guidelines</a>
+ </p>
+<p>
+ Iterator concepts
+ </p>
+<p>
+ Boost Concept Check library
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="random_access_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/forward_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/forward_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,159 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Forward Range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="single_pass_range.html" title="Single Pass Range">
+<link rel="next" href="bidirectional_range.html" title="Bidirectional Range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="single_pass_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Forward Range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.forward_range"></a><a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>
+</h3></div></div></div>
+<a name="range.concepts.forward_range.notation"></a><h5>
+<a name="id3168350"></a>
+ <a class="link" href="forward_range.html#range.concepts.forward_range.notation">Notation</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type that is a model of <a class="link" href="forward_range.html" title="Forward Range">Forward
+ Range</a>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Object of type X.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.forward_range.description"></a><h5>
+<a name="id3168446"></a>
+ <a class="link" href="forward_range.html#range.concepts.forward_range.description">Description</a>
+ </h5>
+<p>
+ A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators" target="_top">Forward
+ Traversal Iterator</a>.
+ </p>
+<a name="range.concepts.forward_range.refinement_of"></a><h5>
+<a name="id3168518"></a>
+ <a class="link" href="forward_range.html#range.concepts.forward_range.refinement_of">Refinement of</a>
+ </h5>
+<p>
+ <a class="link" href="single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+<a name="range.concepts.forward_range.associated_types"></a><h5>
+<a name="id3168547"></a>
+ <a class="link" href="forward_range.html#range.concepts.forward_range.associated_types">Associated
+ types</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Distance type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A signed integral type used to represent the distance between two
+ of the Range's iterators. This type must be the same as the iterator's
+ distance type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Size type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ An unsigned integral type that can represent any nonnegative value
+ of the Range's distance type.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.forward_range.see_also"></a><h5>
+<a name="id3168704"></a>
+ <a class="link" href="forward_range.html#range.concepts.forward_range.see_also">See also</a>
+ </h5>
+<p>
+ <a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
+ metafunctions</a>
+ </p>
+<p>
+ <a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</a>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="single_pass_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/overview.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/overview.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,79 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="../concepts.html" title="Range Concepts">
+<link rel="next" href="single_pass_range.html" title="Single Pass Range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_pass_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
+</h3></div></div></div>
+<p>
+ A Range is a <span class="bold"><strong><span class="emphasis"><em>concept</em></span></strong></span>
+ similar to the STL Container
+ concept. A Range provides iterators for accessing a half-open range <code class="computeroutput"><span class="special">[</span><span class="identifier">first</span><span class="special">,</span><span class="identifier">one_past_last</span><span class="special">)</span></code> of elements and provides information about
+ the number of elements in the Range. However, a Range has fewer requirements
+ than a Container.
+ </p>
+<p>
+ The motivation for the Range concept is that there are many useful Container-like
+ types that do not meet the full requirements of Container, and many algorithms
+ that can be written with this reduced set of requirements. In particular,
+ a Range does not necessarily
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ own the elements that can be accessed through it,
+ </li>
+<li class="listitem">
+ have copy semantics,
+ </li>
+</ul></div>
+<p>
+ Because of the second requirement, a Range object must be passed by (const
+ or non-const) reference in generic code.
+ </p>
+<p>
+ The operations that can be performed on a Range is dependent on the <a href="../../../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal" target="_top">traversal
+ category</a> of the underlying iterator type. Therefore the range concepts
+ are named to reflect which traversal category its iterators support. See
+ also terminology and style guidelines. for more information about naming
+ of ranges.
+ </p>
+<p>
+ The concepts described below specifies associated types as metafunctions
+ and all functions as free-standing functions to allow for a layer of indirection.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_pass_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/random_access_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/random_access_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,187 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Random Access Range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="bidirectional_range.html" title="Bidirectional Range">
+<link rel="next" href="concept_checking.html" title="Concept Checking">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concept_checking.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Random Access Range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.random_access_range"></a><a class="link" href="random_access_range.html" title="Random Access Range">Random Access Range</a>
+</h3></div></div></div>
+<a name="range.concepts.random_access_range.description"></a><h5>
+<a name="id3170068"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.description">Description</a>
+ </h5>
+<p>
+ A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#random-access-traversal-iterators-lib-random-access-traversal-iterators" target="_top">Random
+ Access Traversal Iterator</a>.
+ </p>
+<a name="range.concepts.random_access_range.refinement_of"></a><h5>
+<a name="id3170140"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.refinement_of">Refinement
+ of</a>
+ </h5>
+<p>
+ <a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
+ </p>
+<a name="range.concepts.random_access_range.valid_expressions"></a><h5>
+<a name="id3170168"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.valid_expressions">Valid
+ expressions</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return type
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ Size of range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="range.concepts.random_access_range.expression_semantics"></a><h5>
+<a name="id3170315"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.expression_semantics">Expression
+ semantics</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Postcondition
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the size of the Range, that is, its number of elements.
+ Note <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
+ <span class="special">==</span> <span class="number">0u</span></code>
+ is equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
+ <span class="special">&gt;=</span> <span class="number">0</span></code>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="range.concepts.random_access_range.complexity_guarantees"></a><h5>
+<a name="id3170541"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.complexity_guarantees">Complexity
+ guarantees</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is completes in amortized constant time.
+ </p>
+<a name="range.concepts.random_access_range.invariants"></a><h5>
+<a name="id3170595"></a>
+ <a class="link" href="random_access_range.html#range.concepts.random_access_range.invariants">Invariants</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ Range size
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ is equal to the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> - <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concept_checking.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/concepts/single_pass_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/concepts/single_pass_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,349 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Single Pass Range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../concepts.html" title="Range Concepts">
+<link rel="prev" href="overview.html" title="Overview">
+<link rel="next" href="forward_range.html" title="Forward Range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="forward_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Single Pass Range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.concepts.single_pass_range"></a><a class="link" href="single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+</h3></div></div></div>
+<a name="range.concepts.single_pass_range.notation"></a><h5>
+<a name="id3166972"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.notation">Notation</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type that is a model of <a class="link" href="single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Object of type X.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.single_pass_range.description"></a><h5>
+<a name="id3167074"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.description">Description</a>
+ </h5>
+<p>
+ A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators" target="_top">Single
+ Pass Iterator</a>.
+ </p>
+<a name="range.concepts.single_pass_range.associated_types"></a><h5>
+<a name="id3167146"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.associated_types">Associated
+ types</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of iterator used to iterate through a Range's elements.
+ The iterator's value type is expected to be the Range's value type.
+ A conversion from the iterator type to the <code class="computeroutput"><span class="keyword">const</span></code>
+ iterator type must exist.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Const iterator type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A type of iterator that may be used to examine, but not to modify,
+ a Range's elements.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.single_pass_range.valid_expressions"></a><h5>
+<a name="id3167320"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.valid_expressions">Valid
+ expressions</a>
+ </h5>
+<p>
+ The following expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return type
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Beginning of range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
+ is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ End of range
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
+ is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.single_pass_range.expression_semantics"></a><h5>
+<a name="id3167654"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.expression_semantics">Expression
+ semantics</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Postcondition
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the first element in the Range.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ is either dereferenceable or past-the-end. It is past-the-end if
+ and only if <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing one past the last element in the Range.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ is past-the-end.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.single_pass_range.complexity_guarantees"></a><h5>
+<a name="id3167925"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.complexity_guarantees">Complexity
+ guarantees</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is at most amortized linear time, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is amortized
+ constant time. For most practical purposes, one can expect both to be amortized
+ constant time.
+ </p>
+<a name="range.concepts.single_pass_range.invariants"></a><h5>
+<a name="id3168008"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.invariants">Invariants</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Valid range
+ </p>
+ </td>
+<td>
+ <p>
+ For any Range <code class="computeroutput"><span class="identifier">a</span></code>,
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code> is a valid range, that is, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
+ is reachable from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> in a finite number of increments.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Completeness
+ </p>
+ </td>
+<td>
+ <p>
+ An algorithm that iterates through the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>
+ will pass through every element of <code class="computeroutput"><span class="identifier">a</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.concepts.single_pass_range.see_also"></a><h5>
+<a name="id3168279"></a>
+ <a class="link" href="single_pass_range.html#range.concepts.single_pass_range.see_also">See also</a>
+ </h5>
+<p>
+ <a class="link" href="../reference/extending.html" title="Extending the library">Extending the library for UDTs</a>
+ </p>
+<p>
+ <a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
+ metafunctions</a>
+ </p>
+<p>
+ <a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</a>
+ </p>
+<p>
+ Container
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="forward_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/examples.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/examples.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Examples</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="library_headers.html" title="Library Headers">
+<link rel="next" href="mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="library_headers.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_atl.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Examples">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.examples"></a><a class="link" href="examples.html" title="Examples">Examples</a>
+</h2></div></div></div>
+<p>
+ Some examples are given in the accompanying test files:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+string.cpp
+ shows how to implement a container version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find</span><span class="special">()</span></code> that works with <code class="computeroutput"><span class="keyword">char</span><span class="special">[]</span></code>,<code class="computeroutput"><span class="keyword">wchar_t</span><span class="special">[]</span></code>,<code class="computeroutput"><span class="keyword">char</span><span class="special">*</span></code>,<code class="computeroutput"><span class="keyword">wchar_t</span><span class="special">*</span></code>.
+ </li>
+<li class="listitem">
+algorithm_example.cpp
+ shows the replace example from the introduction.
+ </li>
+<li class="listitem">iterator_range.cpp</li>
+<li class="listitem">sub_range.cpp</li>
+<li class="listitem">iterator_pair.cpp</li>
+<li class="listitem">reversible_range.cpp</li>
+<li class="listitem">std_container.cpp</li>
+<li class="listitem">array.cpp</li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="library_headers.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_atl.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/faq.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/faq.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,127 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>FAQ</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="portability.html" title="Portability">
+<link rel="next" href="history_ack.html" title="History and Acknowledgement">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="portability.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history_ack.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="FAQ">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.faq"></a><a class="link" href="faq.html" title="FAQ">FAQ</a>
+</h2></div></div></div>
+<p>
+ 1. <span class="emphasis"><em><span class="bold"><strong>Why is there no difference between <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">C</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ and <code class="computeroutput"><span class="identifier">range_const_iterator</span><span class="special">&lt;</span><span class="identifier">C</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">iterator</span><span class="special">&gt;</span></code>?</strong></span></em></span>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ In general it is not possible nor desirable to find a corresponding <code class="computeroutput"><span class="identifier">const_iterator</span></code>. When it is possible to
+ come up with one, the client might choose to construct a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">const_iterator</span><span class="special">,</span><span class="identifier">const_iterator</span><span class="special">&gt;</span></code>
+ object.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Note that an <a class="link" href="utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> is somewhat more
+ convenient than a <code class="computeroutput"><span class="identifier">pair</span></code>
+ and that a <a class="link" href="utilities/sub_range.html" title="Class sub_range"><code class="computeroutput"><span class="identifier">sub_range</span></code></a>
+ does propagate const-ness.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ 2. <span class="emphasis"><em><span class="bold"><strong>Why is there not supplied more types or
+ more functions?</strong></span></em></span>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The library has been kept small because its current interface will serve
+ most purposes. If and when a genuine need arises for more functionality,
+ it can be implemented.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ 3. <span class="emphasis"><em><span class="bold"><strong>How should I implement generic algorithms
+ for ranges?</strong></span></em></span>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ One should always start with a generic algorithm that takes two iterators
+ (or more) as input. Then use Boost.Range to build handier versions on top
+ of the iterator based algorithm. Please notice that once the range version
+ of the algorithm is done, it makes sense not to expose the iterator version
+ in the public interface.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ 4. <span class="emphasis"><em><span class="bold"><strong>Why is there no Incrementable Range concept?</strong></span></em></span>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Even though we speak of incrementable iterators, it would not make much
+ sense for ranges; for example, we cannot determine the size and emptiness
+ of a range since we cannot even compare its iterators.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Note also that incrementable iterators are derived from output iterators
+ and so there exist no output range.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="portability.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="history_ack.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/history_ack.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/history_ack.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>History and Acknowledgement</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="faq.html" title="FAQ">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="faq.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+<div class="section" title="History and Acknowledgement">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.history_ack"></a><a class="link" href="history_ack.html" title="History and Acknowledgement"> History and Acknowledgement</a>
+</h2></div></div></div>
+<p>
+ The library have been under way for a long time. Dietmar K&#252;hl originally intended
+ to submit an <code class="computeroutput"><span class="identifier">array_traits</span></code> class
+ template which had most of the functionality present now, but only for arrays
+ and standard containers.
+ </p>
+<p>
+ 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.
+ </p>
+<p>
+ The term Range was adopted because of paragraph 24.1/7 from the C++ standard:
+ </p>
+<p>
+ 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.
+ </p>
+<p>
+ Special thanks goes to
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Pavol Droba for help with documentation and implementation
+ </li>
+<li class="listitem">
+ Pavel Vozenilek for help with porting the library
+ </li>
+<li class="listitem">
+ Jonathan Turkanis and John Torjo for help with documentation
+ </li>
+<li class="listitem">
+ Hartmut Kaiser for being review manager
+ </li>
+<li class="listitem">
+ Jonathan Turkanis for porting the lib (as far sa possible) to vc6 and vc7.
+ </li>
+</ul></div>
+<p>
+ The concept checks and their documentation was provided by Daniel Walker.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="faq.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/introduction.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/introduction.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,154 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="next" href="concepts.html" title="Range Concepts">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Introduction">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.introduction"></a><a class="link" href="introduction.html" title="Introduction">Introduction</a>
+</h2></div></div></div>
+<p>
+ Generic algorithms have so far been specified in terms of two or more iterators.
+ Two iterators would together form a range of values that the algorithm could
+ work on. This leads to a very general interface, but also to a somewhat clumsy
+ use of the algorithms with redundant specification of container names. Therefore
+ we would like to raise the abstraction level for algorithms so they specify
+ their interface in terms of <a class="link" href="concepts.html" title="Range Concepts">Ranges</a> as
+ much as possible.
+ </p>
+<p>
+ The most common form of ranges we are used to work with is standard library
+ containers. However, one often finds it desirable to extend that code to work
+ with other types that offer enough functionality to satisfy the needs of the
+ generic code <span class="bold"><strong><span class="emphasis"><em>if a suitable layer of indirection
+ is applied</em></span></strong></span> . For example, raw arrays are often suitable
+ for use with generic code that works with containers, provided a suitable adapter
+ is used. Likewise, null terminated strings can be treated as containers of
+ characters, if suitably adapted.
+ </p>
+<p>
+ This library therefore provides the means to adapt standard-like containers,
+ null terminated strings, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pairs</span></code> of
+ iterators, and raw arrays (and more), such that the same generic code can work
+ with them all. The basic idea is to add another layer of indirection using
+ metafunctions
+ and free-standing functions so syntactic and/or semantic differences can be
+ removed.
+ </p>
+<p>
+ The main advantages are
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ simpler implementation and specification of generic range algorithms
+ </li>
+<li class="listitem">
+ more flexible, compact and maintainable client code
+ </li>
+<li class="listitem">
+ safe use of built-in arrays (for legacy code; why else would you use built-in
+ arrays?)
+ </li>
+</ul></div>
+<p>
+ Below are given a small example (the complete example can be found here
+ ):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">//
+</span><span class="comment">// example: extracting bounds in a generic algorithm
+</span><span class="comment">//
+</span><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardReadableRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="identifier">ForwardReadableRange</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span> <span class="identifier">ForwardReadableRange</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">value</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">find</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">),</span> <span class="identifier">value</span> <span class="special">);</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardReadableRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">ForwardReadableRange</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardReadableRange</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">value</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">find</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">),</span> <span class="identifier">value</span> <span class="special">);</span>
+<span class="special">}</span>
+
+<span class="comment">//
+</span><span class="comment">// replace first value and return its index
+</span><span class="comment">//
+</span><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardReadableWriteableRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_size</span><span class="special">&lt;</span> <span class="identifier">ForwardReadableWriteableRange</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">my_generic_replace</span><span class="special">(</span> <span class="identifier">ForwardReadableWriteableRange</span><span class="special">&amp;</span> <span class="identifier">c</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">replacement</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span> <span class="identifier">ForwardReadableWriteableRange</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">found</span> <span class="special">=</span> <span class="identifier">find</span><span class="special">(</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">value</span> <span class="special">);</span>
+
+ <span class="keyword">if</span><span class="special">(</span> <span class="identifier">found</span> <span class="special">!=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">)</span> <span class="special">)</span>
+ <span class="special">*</span><span class="identifier">found</span> <span class="special">=</span> <span class="identifier">replacement</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">c</span> <span class="special">),</span> <span class="identifier">found</span> <span class="special">);</span>
+<span class="special">}</span>
+
+<span class="comment">//
+</span><span class="comment">// usage
+</span><span class="comment">//
+</span><span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">5</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">my_vector</span><span class="special">;</span>
+<span class="keyword">int</span> <span class="identifier">values</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span> <span class="special">};</span>
+
+<span class="identifier">my_vector</span><span class="special">.</span><span class="identifier">assign</span><span class="special">(</span> <span class="identifier">values</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">values</span> <span class="special">)</span> <span class="special">);</span>
+<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">iterator</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="identifier">my_view</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">my_vector</span> <span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">my_vector</span> <span class="special">)</span> <span class="special">+</span> <span class="identifier">N</span> <span class="special">);</span>
+<span class="keyword">char</span> <span class="identifier">str_val</span><span class="special">[]</span> <span class="special">=</span> <span class="string">"a string"</span><span class="special">;</span>
+<span class="keyword">char</span><span class="special">*</span> <span class="identifier">str</span> <span class="special">=</span> <span class="identifier">str_val</span><span class="special">;</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">my_generic_replace</span><span class="special">(</span> <span class="identifier">my_vector</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="number">2</span> <span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">my_generic_replace</span><span class="special">(</span> <span class="identifier">my_view</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="number">2</span> <span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">my_generic_replace</span><span class="special">(</span> <span class="identifier">str</span><span class="special">,</span> <span class="char">'a'</span><span class="special">,</span> <span class="char">'b'</span> <span class="special">);</span>
+
+<span class="comment">// prints '3', '5' and '0'
+</span></pre>
+<p>
+ </p>
+<p>
+ By using the free-standing functions and metafunctions,
+ the code automatically works for all the types supported by this library; now
+ and in the future. Notice that we have to provide two versions of <code class="computeroutput"><span class="identifier">find</span><span class="special">()</span></code> since
+ we cannot forward a non-const rvalue with reference arguments (see this article
+ about <a href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">The
+ Forwarding Problem</a> ).
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/library_headers.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/library_headers.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,430 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Library Headers</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="style_guide.html" title="Terminology and style guidelines">
+<link rel="next" href="examples.html" title="Examples">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="style_guide.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Library Headers">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.library_headers"></a><a class="link" href="library_headers.html" title="Library Headers">Library Headers</a>
+</h2></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Header
+ </p>
+ </th>
+<th>
+ <p>
+ Includes
+ </p>
+ </th>
+<th>
+ <p>
+ Related Concept
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ everything
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">metafunctions</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ every metafunction
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">functions</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ every function
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">value_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_value</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_iterator</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">difference_type</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_difference</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">pointer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_pointer</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">category</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_category</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">reverse_iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_reverse_iterator</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">begin</span></code></a> and <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_begin</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">end</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">end</span></code></a> and <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_end</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">empty</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">empty</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">distance</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">size</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">size</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">rbegin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">rbegin</span></code></a> and <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_rbegin</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">rend</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">rend</span></code></a> and <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_rend</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">as_array</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">as_array</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">as_literal</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">as_literal</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">iterator_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">sub_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="utilities/sub_range.html" title="Class sub_range"><code class="computeroutput"><span class="identifier">sub_range</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="concepts.html" title="Range Concepts">Range concepts</a>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="style_guide.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,141 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>MFC/ATL (courtesy of Shunsuke Sogame)</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="examples.html" title="Examples">
+<link rel="next" href="mfc_atl/requirements.html" title="Requirements">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_atl/requirements.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.mfc_atl"></a><a class="link" href="mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)"> MFC/ATL (courtesy of Shunsuke Sogame)</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Requirements</span></dt>
+<dt><span class="section"> MFC Ranges</span></dt>
+<dt><span class="section"> ATL Ranges</span></dt>
+<dt><span class="section"> const Ranges</span></dt>
+<dt><span class="section"> References</span></dt>
+</dl></div>
+<a name="range.mfc_atl.introduction"></a><h5>
+<a name="id3280319"></a>
+ <a class="link" href="mfc_atl.html#range.mfc_atl.introduction">Introduction</a>
+ </h5>
+<p>
+ This implementation was kindly donated by Shunsuke Sogame. This header adapts
+ MFC and ATL containers to the appropriate Range concepts.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr></tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <span class="bold"><strong>Author:</strong></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Shunsuke Sogame
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="bold"><strong>Contact:</strong></span>
+ </p>
+ </td>
+<td>
+ <p>
+ mb2act_at_[hidden]
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="bold"><strong>Date:</strong></span>
+ </p>
+ </td>
+<td>
+ <p>
+ 26th of May 2006
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <span class="bold"><strong>Copyright:</strong></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Shunsuke Sogame 2005-2006. Use, modification and distribution is
+ subject to the Boost Software License, Version 1.0
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="range.mfc_atl.overview"></a><h5>
+<a name="id3280457"></a>
+ <a class="link" href="mfc_atl.html#range.mfc_atl.overview">Overview</a>
+ </h5>
+<p>
+ Boost.Range MFC/ATL Extension provides Boost.Range support for MFC/ATL collection
+ and string types.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">CTypedPtrArray</span><span class="special">&lt;</span><span class="identifier">CPtrArray</span><span class="special">,</span> <span class="identifier">CList</span><span class="special">&lt;</span><span class="identifier">CString</span><span class="special">&gt;</span> <span class="special">*&gt;</span> <span class="identifier">myArray</span><span class="special">;</span>
+<span class="special">...</span>
+<span class="identifier">BOOST_FOREACH</span> <span class="special">(</span><span class="identifier">CList</span><span class="special">&lt;</span><span class="identifier">CString</span><span class="special">&gt;</span> <span class="special">*</span><span class="identifier">theList</span><span class="special">,</span> <span class="identifier">myArray</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">BOOST_FOREACH</span> <span class="special">(</span><span class="identifier">CString</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">,</span> <span class="special">*</span><span class="identifier">theList</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">to_upper</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">str</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">str</span><span class="special">));</span>
+ <span class="special">...</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_atl/requirements.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl/atl_ranges.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,374 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>ATL Ranges</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="prev" href="mfc_ranges.html" title="MFC Ranges">
+<link rel="next" href="const_ranges.html" title="const Ranges">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mfc_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="const_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="ATL Ranges">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.mfc_atl.atl_ranges"></a><a class="link" href="atl_ranges.html" title="ATL Ranges"> ATL Ranges</a>
+</h3></div></div></div>
+<p>
+ If the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">atl</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ is included before or after Boost.Range headers, the ATL collections and
+ strings become models of Range. The table below lists the Traversal Category
+ and <code class="computeroutput"><span class="identifier">range_reference</span></code> of ATL
+ ranges.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Range
+ </p>
+ </th>
+<th>
+ <p>
+ Traversal Category
+ </p>
+ </th>
+<th>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CAtlArray</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">ET</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">E</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CAutoPtrArray</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">E</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CInterfaceArray</span><span class="special">&lt;</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">pi</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CComQIPtr</span><span class="special">&lt;</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">pi</span><span class="special">&gt;&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CAtlList</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">ET</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">E</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CAutoPtrList</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">E</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CHeapPtrList</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">,</span><span class="identifier">A</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">E</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CInterfaceList</span><span class="special">&lt;</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">pi</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CComQIPtr</span><span class="special">&lt;</span><span class="identifier">I</span><span class="special">,</span><span class="identifier">pi</span><span class="special">&gt;&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CAtlMap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span><span class="identifier">V</span><span class="special">,</span><span class="identifier">KT</span><span class="special">,</span><span class="identifier">VT</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CRBTree</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span><span class="identifier">V</span><span class="special">,</span><span class="identifier">KT</span><span class="special">,</span><span class="identifier">VT</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CRBMap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span><span class="identifier">V</span><span class="special">,</span><span class="identifier">KT</span><span class="special">,</span><span class="identifier">VT</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CRBMultiMap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span><span class="identifier">V</span><span class="special">,</span><span class="identifier">KT</span><span class="special">,</span><span class="identifier">VT</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CSimpleStringT</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span><span class="identifier">b</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">B</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CStringT</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span><span class="identifier">ST</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">B</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CFixedStringT</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span><span class="identifier">n</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CComBSTR</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">OLECHAR</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CSimpleArray</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">TE</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Other <a class="link" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">Boost.Range</a> metafunctions are defined
+ by the following. Let <code class="computeroutput"><span class="identifier">Range</span></code>
+ be any type listed above and <code class="computeroutput"><span class="identifier">Ref</span></code>
+ be the same as <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">Ref</span><span class="special">&gt;::</span><span class="identifier">type</span></code>,
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span></code>,
+ and <code class="computeroutput"><span class="identifier">range_pointer</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">add_pointer</span><span class="special">&lt;</span><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">Ref</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ As for <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">Range</span></code>,
+ see below.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mfc_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="const_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl/const_ranges.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,125 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>const Ranges</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="prev" href="atl_ranges.html" title="ATL Ranges">
+<link rel="next" href="references.html" title="References">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="atl_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="const Ranges">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.mfc_atl.const_ranges"></a><a class="link" href="const_ranges.html" title="const Ranges"> const Ranges</a>
+</h3></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ is defined by the following algorithm. Let <code class="computeroutput"><span class="identifier">Range</span></code>
+ be any type listed above and <code class="computeroutput"><span class="identifier">Ref</span></code>
+ be the same as <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">if</span> <span class="special">(</span><span class="identifier">Range</span> <span class="identifier">is</span> <span class="identifier">CObArray</span> <span class="special">||</span> <span class="identifier">Range</span> <span class="identifier">is</span> <span class="identifier">CObList</span><span class="special">)</span>
+ <span class="keyword">return</span> <span class="identifier">CObject</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">&amp;</span>
+<span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">Range</span> <span class="identifier">is</span> <span class="identifier">CPtrArray</span> <span class="special">||</span> <span class="identifier">Range</span> <span class="identifier">is</span> <span class="identifier">CPtrList</span><span class="special">)</span>
+ <span class="keyword">return</span> <span class="keyword">void</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">&amp;</span>
+<span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">there</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">type</span> <span class="identifier">X</span> <span class="identifier">such</span> <span class="identifier">that</span> <span class="identifier">X</span><span class="special">&amp;</span> <span class="identifier">is</span> <span class="identifier">the</span> <span class="identifier">same</span> <span class="identifier">as</span> <span class="identifier">Ref</span><span class="special">)</span>
+ <span class="keyword">return</span> <span class="identifier">X</span> <span class="keyword">const</span> <span class="special">&amp;</span>
+<span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">there</span> <span class="identifier">is</span> <span class="identifier">a</span> <span class="identifier">type</span> <span class="identifier">X</span> <span class="identifier">such</span> <span class="identifier">that</span> <span class="identifier">X</span><span class="special">*</span> <span class="keyword">const</span> <span class="identifier">is</span> <span class="identifier">the</span> <span class="identifier">same</span> <span class="identifier">as</span> <span class="identifier">Ref</span><span class="special">)</span>
+ <span class="keyword">return</span> <span class="identifier">X</span> <span class="keyword">const</span> <span class="special">*</span> <span class="keyword">const</span>
+<span class="keyword">else</span>
+ <span class="keyword">return</span> <span class="identifier">Ref</span>
+</pre>
+<p>
+ </p>
+<p>
+ Other Boost.Range metafunctions are defined by the following.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Range metafunction
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_pointer</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">add_pointer</span><span class="special">&lt;</span><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="atl_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl/mfc_ranges.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,480 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>MFC Ranges</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="prev" href="requirements.html" title="Requirements">
+<link rel="next" href="atl_ranges.html" title="ATL Ranges">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="requirements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="atl_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="MFC Ranges">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.mfc_atl.mfc_ranges"></a><a class="link" href="mfc_ranges.html" title="MFC Ranges"> MFC Ranges</a>
+</h3></div></div></div>
+<p>
+ If the <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">mfc</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ is included before or after Boost.Range headers, the MFC collections and
+ strings become models of Range. The table below lists the Traversal Category
+ and <code class="computeroutput"><span class="identifier">range_reference</span></code> of MFC
+ ranges.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Range
+ </p>
+ </th>
+<th>
+ <p>
+ Traversal Category
+ </p>
+ </th>
+<th>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CArray</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">A</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CList</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">A</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMap</span><span class="special">&lt;</span><span class="identifier">K</span><span class="special">,</span><span class="identifier">AK</span><span class="special">,</span><span class="identifier">M</span><span class="special">,</span><span class="identifier">AM</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CTypedPtrArray</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span><span class="identifier">T</span><span class="special">*&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">*</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CTypedPtrList</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span><span class="identifier">T</span><span class="special">*&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">*</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CTypedPtrMap</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">,</span><span class="identifier">T</span><span class="special">*,</span><span class="identifier">V</span><span class="special">*&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">*,</span><span class="identifier">V</span><span class="special">*&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CByteArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">BYTE</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CDWordArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">DWORD</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CObArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CObject</span><span class="special">*&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CPtrArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span><span class="special">*&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CStringArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CString</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CUIntArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">UINT</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CWordArray</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random Access
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">WORD</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CObList</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CObject</span><span class="special">*&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CPtrList</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span><span class="special">*&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CStringList</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CString</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapPtrToWord</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">void</span><span class="special">*,</span><span class="identifier">WORD</span><span class="special">&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapPtrToPtr</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">void</span><span class="special">*,</span><span class="keyword">void</span><span class="special">*&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapStringToOb</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">String</span><span class="special">,</span><span class="identifier">CObject</span><span class="special">*&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapStringToString</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Range</span><span class="special">::</span><span class="identifier">CPair</span><span class="special">&amp;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapWordToOb</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">WORD</span><span class="special">,</span><span class="identifier">CObject</span><span class="special">*&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">CMapWordToPtr</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">WORD</span><span class="special">,</span><span class="keyword">void</span><span class="special">*&gt;</span>
+ <span class="keyword">const</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Other Boost.Range metafunctions are defined by the following. Let <code class="computeroutput"><span class="identifier">Range</span></code> be any type listed above and <code class="computeroutput"><span class="identifier">Ref</span></code> be the same as <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">remove_const</span><span class="special">&lt;</span><span class="identifier">Ref</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>,
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span></code>,
+ and <code class="computeroutput"><span class="identifier">range_pointer</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">add_pointer</span><span class="special">&lt;</span><span class="identifier">remove_reference</span><span class="special">&lt;</span><span class="identifier">Ref</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ As for <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">Range</span></code>,
+ see below.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="requirements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="atl_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl/references.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl/references.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>References</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="prev" href="const_ranges.html" title="const Ranges">
+<link rel="next" href="../upgrade.html" title="Upgrade version of Boost.Range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="const_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../upgrade.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="References">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.mfc_atl.references"></a><a class="link" href="references.html" title="References"> References</a>
+</h3></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem"><a class="link" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">Boost.Range</a></li>
+<li class="listitem"><a href="http://msdn.microsoft.com/en-us/library/942860sh.aspx" target="_top">MFC
+ Collection Classes</a></li>
+<li class="listitem"><a href="http://msdn.microsoft.com/en-us/library/15e672bd.aspx" target="_top">ATL
+ Collection Classes</a></li>
+</ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="const_ranges.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../upgrade.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/mfc_atl/requirements.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/mfc_atl/requirements.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Requirements</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="prev" href="../mfc_atl.html" title="MFC/ATL (courtesy of Shunsuke Sogame)">
+<link rel="next" href="mfc_ranges.html" title="MFC Ranges">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Requirements">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.mfc_atl.requirements"></a><a class="link" href="requirements.html" title="Requirements"> Requirements</a>
+</h3></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Boost C++ Libraries Version 1.34.0 or later (no compilation required)
+ </li>
+<li class="listitem">
+ Visual C++ 7.1 or later (for MFC and ATL)
+ </li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mfc_atl.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mfc_ranges.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/portability.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/portability.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,89 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Portability</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="upgrade/upgrade_from_1_34.html" title="Upgrade from version 1.34">
+<link rel="next" href="faq.html" title="FAQ">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upgrade/upgrade_from_1_34.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Portability">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.portability"></a><a class="link" href="portability.html" title="Portability">Portability</a>
+</h2></div></div></div>
+<p>
+ A huge effort has been made to port the library to as many compilers as possible.
+ </p>
+<p>
+ Full support for built-in arrays require that the compiler supports class template
+ partial specialization. For non-conforming compilers there might be a chance
+ that it works anyway thanks to workarounds in the type traits library. Visual
+ C++ 6/7.0 has a limited support for arrays: as long as the arrays are of built-in
+ type it should work.
+ </p>
+<p>
+ Notice also that some compilers cannot do function template ordering properly.
+ In that case one must rely of <a class="link" href="reference/semantics/metafunctions.html" title="Metafunctions"><code class="computeroutput"><span class="identifier">range_iterator</span></code></a> 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.
+ </p>
+<p>
+ For maximum portability you should follow these guidelines:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ do not use built-in arrays,
+ </li>
+<li class="listitem">
+ do not pass rvalues to <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">begin</span></code></a><code class="computeroutput"><span class="special">()</span></code>,
+ <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">end</span></code></a><code class="computeroutput"><span class="special">()</span></code> and <a class="link" href="utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> Range constructors
+ and assignment operators,
+ </li>
+<li class="listitem">
+ use <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_begin</span></code></a><code class="computeroutput"><span class="special">()</span></code> and <a class="link" href="reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">const_end</span></code></a><code class="computeroutput"><span class="special">()</span></code>
+ whenever your code by intention is read-only; this will also solve most rvalue
+ problems,
+ </li>
+<li class="listitem">
+ do not rely on ADL:
+ <div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ if you overload functions, include that header before the headers in
+ this library,
+ </li>
+<li class="listitem">
+ put all overloads in namespace boost.
+ </li>
+</ul></div>
+</li>
+</ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upgrade/upgrade_from_1_34.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,93 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="concepts/concept_checking.html" title="Concept Checking">
+<link rel="next" href="reference/overview.html" title="Overview">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="concepts/concept_checking.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/overview.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Reference">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Semantics</span></dt>
+<dd><dl>
+<dt><span class="section">Metafunctions</span></dt>
+<dt><span class="section">Functions</span></dt>
+</dl></dd>
+<dt><span class="section"> Range Adaptors</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/adaptors/adaptors_introduction.html"> Introduction
+ and motivation</a></span></dt>
+<dt><span class="section"> Synopsis</span></dt>
+<dt><span class="section"><a href="reference/adaptors/adaptors_general_requirements.html">
+ General Requirements</a></span></dt>
+<dt><span class="section"> Reference</span></dt>
+</dl></dd>
+<dt><span class="section"> Range Algorithm</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/algorithms/range_algorithm_introduction.html">
+ Introduction and motivation</a></span></dt>
+<dt><span class="section"><a href="reference/algorithms/range_algorithm_mutating_algorithms.html">
+ Mutating algorithms</a></span></dt>
+<dt><span class="section"><a href="reference/algorithms/range_algorithm_non_mutating_algorithms.html">
+ Non-mutating algorithms</a></span></dt>
+<dt><span class="section"> Set algorithms</span></dt>
+<dt><span class="section"> Heap algorithms</span></dt>
+<dt><span class="section"><a href="reference/algorithms/permutation_algorithms.html">
+ Permutation algorithms</a></span></dt>
+<dt><span class="section"><a href="reference/algorithms/range_algorithm_new_algorithms.html">
+ New algorithms</a></span></dt>
+<dt><span class="section"><a href="reference/algorithms/range_numeric.html"> Numeric
+ algorithms</a></span></dt>
+</dl></dd>
+<dt><span class="section"> Provided Ranges</span></dt>
+<dd><dl>
+<dt><span class="section"> counting_range</span></dt>
+<dt><span class="section"> istream_range</span></dt>
+<dt><span class="section"> irange</span></dt>
+</dl></dd>
+<dt><span class="section"> Extending the library</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/extending/method_1.html"> Method 1: provide
+ member functions and nested types</a></span></dt>
+<dt><span class="section"><a href="reference/extending/method_2.html"> Method 2: provide
+ free-standing functions and specialize metafunctions</a></span></dt>
+<dt><span class="section"><a href="reference/extending/method_3.html"> Method 3: provide
+ range adaptor implementations</a></span></dt>
+</dl></dd>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="concepts/concept_checking.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/overview.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Adaptors</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="semantics/functions.html" title="Functions">
+<link rel="next" href="adaptors/adaptors_introduction.html" title="Introduction and motivation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="semantics/functions.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors/adaptors_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Adaptors">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.adaptors"></a><a class="link" href="adaptors.html" title="Range Adaptors"> Range Adaptors</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="adaptors/adaptors_introduction.html"> Introduction
+ and motivation</a></span></dt>
+<dt><span class="section"> Synopsis</span></dt>
+<dt><span class="section"><a href="adaptors/adaptors_general_requirements.html">
+ General Requirements</a></span></dt>
+<dt><span class="section"> Reference</span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="semantics/functions.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors/adaptors_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_general_requirements.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_general_requirements.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,141 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>General Requirements</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors">
+<link rel="prev" href="adaptors_synopsis.html" title="Synopsis">
+<link rel="next" href="adaptors_reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_synopsis.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_reference.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="General Requirements">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.adaptors.adaptors_general_requirements"></a><a class="link" href="adaptors_general_requirements.html" title="General Requirements">
+ General Requirements</a>
+</h4></div></div></div>
+<p>
+ In the description of generator expressions, the following notation is
+ used:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">fwdRng</span></code> is an expression
+ of a type <code class="computeroutput"><span class="identifier">R</span></code> that models
+ <code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">biRng</span></code> is an expression
+ of a type <code class="computeroutput"><span class="identifier">R</span></code> that models
+ <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">rndRng</span></code> is an expression
+ of a type <code class="computeroutput"><span class="identifier">R</span></code> that models
+ <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">pred</span></code> is an expression
+ of a type that models <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">bi_pred</span></code> is an expression
+ of a type that models <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">fun</span></code> is an expression
+ of a type that models <code class="computeroutput"><span class="identifier">UnaryFunction</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">value</span></code>, <code class="computeroutput"><span class="identifier">new_value</span></code> and <code class="computeroutput"><span class="identifier">old_value</span></code>
+ are objects convertible to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span></code> are integer expressions convertible
+ to <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+</li>
+</ul></div>
+<p>
+ Also note that <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span></code> must be implicitly convertible to
+ the type arguments to <code class="computeroutput"><span class="identifier">pred</span></code>,
+ <code class="computeroutput"><span class="identifier">bi_pred</span></code> and <code class="computeroutput"><span class="identifier">fun</span></code>.
+ </p>
+<p>
+ 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.
+ </p>
+<p>
+ 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 <code class="computeroutput"><span class="identifier">filtered</span></code>
+ adaptor returns only a <code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+ regardless of the input.
+ </p>
+<p>
+ Furthermore, the following rules apply to any expression of the form
+</p>
+<pre class="programlisting"><span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">adaptor_generator</span>
+</pre>
+<p>
+ </p>
+<p>
+ 1. Applying <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>
+ to a range <code class="computeroutput"><span class="identifier">R</span></code> (always left
+ argument) and a range adapter <code class="computeroutput"><span class="identifier">RA</span></code>
+ (always right argument) yields a new range type which may not conform to
+ the same range concept as <code class="computeroutput"><span class="identifier">R</span></code>.
+ </p>
+<p>
+ 2. The return-type of <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code> is otherwise unspecified.
+ </p>
+<p>
+ 3. <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>
+ is found by Argument Dependent Lookup (ADL) because a range adaptor is
+ implemented in namespace <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span></code>.
+ </p>
+<p>
+ 4. <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>
+ is used to add new behaviour <span class="emphasis"><em><span class="bold"><strong>lazily</strong></span></em></span>
+ and never modifies its left argument.
+ </p>
+<p>
+ 5. All iterators extracted from the left argument are extracted using qualified
+ calls to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">()</span></code>.
+ </p>
+<p>
+ 6. In addition to the <code class="computeroutput"><span class="keyword">throw</span></code>-clauses
+ below, <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>
+ may throw exceptions as a result of copying iterators. If such copying
+ cannot throw an exception, then neither can the whole expression.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_synopsis.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_reference.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_introduction.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_introduction.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,274 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction and motivation</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors">
+<link rel="prev" href="../adaptors.html" title="Range Adaptors">
+<link rel="next" href="adaptors_synopsis.html" title="Synopsis">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../adaptors.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_synopsis.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Introduction and motivation">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.adaptors.adaptors_introduction"></a><a class="link" href="adaptors_introduction.html" title="Introduction and motivation"> Introduction
+ and motivation</a>
+</h4></div></div></div>
+<p>
+ A <span class="bold"><strong>Range Adaptor</strong></span> 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
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptors</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">vec</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">)</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ the iterators from <code class="computeroutput"><span class="identifier">vec</span></code>
+ are wrapped <code class="computeroutput"><span class="identifier">reverse_iterator</span></code>s.
+ 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
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">vec</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span>
+</pre>
+<p>
+ </p>
+<p>
+ returns a Range Adaptor where the iterator type is now the iterator type
+ of the range <code class="computeroutput"><span class="identifier">vec</span></code> wrapped
+ in <code class="computeroutput"><span class="identifier">reverse_iterator</span></code>. The
+ expression <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span></code> is called an <span class="bold"><strong>Adaptor
+ Generator</strong></span>.
+ </p>
+<p>
+ There are two ways of constructing a range adaptor. The first is by using
+ <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>.
+ 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
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">reversed</span></code> is <code class="computeroutput"><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> for example.
+ </p>
+<p>
+ Why do I prefer the <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code> syntax? The answer is readability:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">vec</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">)</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ This might not look so bad, but when we apply several adaptors, it becomes
+ much worse. Just compare
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reverse</span><span class="special">(</span> <span class="identifier">vec</span> <span class="special">)</span> <span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">)</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ to
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">vec</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span>
+ <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">uniqued</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">)</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ 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 <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>.
+ </p>
+<a name="range.reference.adaptors.adaptors_introduction.composition_of_adaptors"></a><h6>
+<a name="id3177994"></a>
+ <a class="link" href="adaptors_introduction.html#range.reference.adaptors.adaptors_introduction.composition_of_adaptors">Composition
+ of Adaptors</a>
+ </h6>
+<p>
+ Range Adaptors are a powerful complement to Range algorithms. The reason
+ is that adaptors are <span class="emphasis"><em><span class="bold"><strong>orthogonal</strong></span></em></span>
+ to algorithms. For example, consider these Range algorithms:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">)</span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">count</span><span class="special">(</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">pred</span> <span class="special">)</span></code></li>
+</ul></div>
+<p>
+ What should we do if we only want to copy an element <code class="computeroutput"><span class="identifier">a</span></code>
+ if it satisfies some predicate, say <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>?
+ And what if we only want to count the elements that satisfy the same predicate?
+ The naive answer would be to use these algorithms:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy_if</span><span class="special">(</span>
+ <span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">out</span> <span class="special">)</span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">count_if</span><span class="special">(</span>
+ <span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">pred</span> <span class="special">)</span></code></li>
+</ul></div>
+<p>
+ 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
+ <code class="computeroutput"><span class="identifier">_if</span></code> variants and there
+ is redundant development overhead for each new algorithm. The Adaptor Generator
+ is the design solution to this problem.
+ </p>
+<a name="range.reference.adaptors.adaptors_introduction.range_adaptor_alternative_to_copy_if_algorithm"></a><h6>
+<a name="id3178304"></a>
+ <a class="link" href="adaptors_introduction.html#range.reference.adaptors.adaptors_introduction.range_adaptor_alternative_to_copy_if_algorithm">Range
+ Adaptor alternative to copy_if algorithm</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy_if</span><span class="special">(</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">pred</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">);</span>
+</pre>
+<p>
+ can be expressed as
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span> <span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">filtered</span><span class="special">(</span><span class="identifier">pred</span><span class="special">),</span> <span class="identifier">out</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.adaptors.adaptors_introduction.range_adaptor_alternative_to_count_if_algorithm"></a><h6>
+<a name="id3178473"></a>
+ <a class="link" href="adaptors_introduction.html#range.reference.adaptors.adaptors_introduction.range_adaptor_alternative_to_count_if_algorithm">Range
+ Adaptor alternative to count_if algorithm</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">count_if</span><span class="special">(</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">pred</span> <span class="special">);</span>
+</pre>
+<p>
+ can be expressed as
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">count</span><span class="special">(</span> <span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">filtered</span><span class="special">(</span><span class="identifier">pred</span><span class="special">),</span> <span class="identifier">out</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ What this means is that <span class="emphasis"><em><span class="bold"><strong>no</strong></span></em></span>
+ algorithm with the <code class="computeroutput"><span class="identifier">_if</span></code>
+ suffix is needed. Furthermore, it turns out that algorithms with the <code class="computeroutput"><span class="identifier">_copy</span></code> suffix are not needed either. Consider
+ the somewhat misdesigned <code class="computeroutput"><span class="identifier">replace_copy_if</span><span class="special">()</span></code> which may be used as
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">replace_copy_if</span><span class="special">(</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">vec</span><span class="special">),</span> <span class="identifier">pred</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ With adaptors and algorithms we can express this as
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced_if</span><span class="special">(</span><span class="identifier">pred</span><span class="special">,</span> <span class="identifier">new_value</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ The latter code has several benefits:
+ </p>
+<p>
+ 1. it is more <span class="emphasis"><em><span class="bold"><strong>efficient</strong></span></em></span>
+ because we avoid extra allocations as might happen with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span></code>
+ </p>
+<p>
+ 2. it is <span class="emphasis"><em><span class="bold"><strong>flexible</strong></span></em></span>
+ as we can subsequently apply even more adaptors, for example:
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced_if</span><span class="special">(</span><span class="identifier">pred</span><span class="special">,</span> <span class="identifier">new_value</span><span class="special">)</span>
+ <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ 3. it is <span class="emphasis"><em><span class="bold"><strong>safer</strong></span></em></span> because
+ there is no use of an unbounded output iterator.
+ </p>
+<p>
+ In this manner, the <span class="emphasis"><em><span class="bold"><strong>composition</strong></span></em></span>
+ of Range Adaptors has the following consequences:
+ </p>
+<p>
+ 1. we no longer need <code class="computeroutput"><span class="identifier">_if</span></code>,
+ <code class="computeroutput"><span class="identifier">_copy</span></code>, <code class="computeroutput"><span class="identifier">_copy_if</span></code>
+ and <code class="computeroutput"><span class="identifier">_n</span></code> variants of algorithms.
+ </p>
+<p>
+ 2. we can generate a multitude of new algorithms on the fly, for example,
+ above we generated <code class="computeroutput"><span class="identifier">reverse_replace_copy_if</span><span class="special">()</span></code>
+ </p>
+<p>
+ In other words:
+ </p>
+<p>
+ <span class="bold"><strong>Range Adaptors are to algorithms what algorithms
+ are to containers</strong></span>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../adaptors.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_synopsis.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,75 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors">
+<link rel="prev" href="adaptors_general_requirements.html" title="General Requirements">
+<link rel="next" href="adaptors_reference/adjacent_filtered.html" title="adjacent_filtered">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_general_requirements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_reference/adjacent_filtered.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Reference">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.adaptors.adaptors_reference"></a><a class="link" href="adaptors_reference.html" title="Reference"> Reference</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="adaptors_reference/adjacent_filtered.html">
+ adjacent_filtered</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/copied.html">
+ copied</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/filtered.html">
+ filtered</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/indexed.html">
+ indexed</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/indirected.html">
+ indirected</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/map_keys.html">
+ map_keys</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/map_values.html">
+ map_values</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/replaced.html">
+ replaced</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/replaced_if.html">
+ replaced_if</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/reversed.html">
+ reversed</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/sliced.html">
+ sliced</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/strided.html">
+ strided</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/tokenized.html">
+ tokenized</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/transformed.html">
+ transformed</a></span></dt>
+<dt><span class="section"><a href="adaptors_reference/uniqued.html">
+ uniqued</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_general_requirements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_reference/adjacent_filtered.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/adjacent_filtered.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,151 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>adjacent_filtered</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="../adaptors_reference.html" title="Reference">
+<link rel="next" href="copied.html" title="copied">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copied.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="adjacent_filtered">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.adjacent_filtered"></a><a class="link" href="adjacent_filtered.html" title="adjacent_filtered">
+ adjacent_filtered</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="adjacent_filtered.html#range.reference.adaptors.adaptors_reference.adjacent_filtered.adjacent_filtered_example">
+ adjacent_filtered example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">adjacent_filtered</span><span class="special">(</span><span class="identifier">bi_pred</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">adjacent_filter</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">bi_pred</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is convertible to both argument types of <code class="computeroutput"><span class="identifier">bi_pred</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all adjacent elements
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code> in the returned range, <code class="computeroutput"><span class="identifier">bi_pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Throws:</strong></span> Whatever the copy constructor
+ of <code class="computeroutput"><span class="identifier">bi_pred</span></code> might throw.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="adjacent_filtered example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.adjacent_filtered.adjacent_filtered_example"></a><a class="link" href="adjacent_filtered.html#range.reference.adaptors.adaptors_reference.adjacent_filtered.adjacent_filtered_example" title="adjacent_filtered example">
+ adjacent_filtered example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">adjacent_filtered</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">functional</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">adjacent_filtered</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">not_equal_to</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;()),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copied.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/copied.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/copied.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,152 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>copied</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="adjacent_filtered.html" title="adjacent_filtered">
+<link rel="next" href="filtered.html" title="filtered">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_filtered.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="filtered.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="copied">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.copied"></a><a class="link" href="copied.html" title="copied">
+ copied</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="copied.html#range.reference.adaptors.adaptors_reference.copied.copied_example">
+ copied example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">copied</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><code class="computeroutput"><span class="number">0</span>
+ <span class="special">&lt;=</span> <span class="identifier">n</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">n</span>
+ <span class="special">&lt;=</span> <span class="identifier">m</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">m</span>
+ <span class="special">&lt;</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span> A new <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ that holds the sliced range <code class="computeroutput"><span class="special">[</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">)</span></code>
+ of the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="copied example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.copied.copied_example"></a><a class="link" href="copied.html#range.reference.adaptors.adaptors_reference.copied.copied_example" title="copied example">
+ copied example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">copied</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">,</span><span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">copied</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_filtered.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="filtered.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/filtered.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/filtered.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,156 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>filtered</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="copied.html" title="copied">
+<link rel="next" href="indexed.html" title="indexed">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copied.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="indexed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="filtered">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.filtered"></a><a class="link" href="filtered.html" title="filtered">
+ filtered</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="filtered.html#range.reference.adaptors.adaptors_reference.filtered.filtered_example">
+ filtered example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">filtered</span><span class="special">(</span><span class="identifier">pred</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">filter</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">pred</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is convertible to the argument type of <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all adjacent elements
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">]</span></code> in the returned range, <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Throws:</strong></span> Whatever the copy constructor
+ of <code class="computeroutput"><span class="identifier">pred</span></code> might throw.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Returned Range Category:</strong></span><code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="filtered example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.filtered.filtered_example"></a><a class="link" href="filtered.html#range.reference.adaptors.adaptors_reference.filtered.filtered_example" title="filtered example">
+ filtered example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">filtered</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">struct</span> <span class="identifier">is_even</span>
+<span class="special">{</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="keyword">int</span> <span class="identifier">x</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">0</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">filtered</span><span class="special">(</span><span class="identifier">is_even</span><span class="special">()),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">2</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">8</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copied.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="indexed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indexed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indexed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,186 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>indexed</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="filtered.html" title="filtered">
+<link rel="next" href="indirected.html" title="indirected">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="filtered.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="indirected.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="indexed">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.indexed"></a><a class="link" href="indexed.html" title="indexed">
+ indexed</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="indexed.html#range.reference.adaptors.adaptors_reference.indexed.indexed_example">
+ indexed example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">indexed</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">index</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span> 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 <code class="computeroutput"><span class="identifier">index</span><span class="special">()</span></code>
+ member function that returns the appropriate index for the element
+ in the sequence corresponding with the iterator.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="indexed example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.indexed.indexed_example"></a><a class="link" href="indexed.html#range.reference.adaptors.adaptors_reference.indexed.indexed_example" title="indexed example">
+ indexed example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">indexed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Iterator</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">display_element_and_index</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">last</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">first</span><span class="special">;</span> <span class="identifier">it</span> <span class="special">!=</span> <span class="identifier">last</span><span class="special">;</span> <span class="special">++</span><span class="identifier">it</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Element = "</span> <span class="special">&lt;&lt;</span> <span class="special">*</span><span class="identifier">it</span> <span class="special">&lt;&lt;</span> <span class="string">" Index = "</span> <span class="special">&lt;&lt;</span> <span class="identifier">it</span><span class="special">.</span><span class="identifier">index</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">display_element_and_index</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">display_element_and_index</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">));</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Iterator1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Iterator2</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">check_element_and_index</span><span class="special">(</span>
+ <span class="identifier">Iterator1</span> <span class="identifier">test_first</span><span class="special">,</span>
+ <span class="identifier">Iterator1</span> <span class="identifier">test_last</span><span class="special">,</span>
+ <span class="identifier">Iterator2</span> <span class="identifier">reference_first</span><span class="special">,</span>
+ <span class="identifier">Iterator2</span> <span class="identifier">reference_last</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">BOOST_CHECK_EQUAL</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">test_first</span><span class="special">,</span> <span class="identifier">test_last</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">reference_first</span><span class="special">,</span> <span class="identifier">reference_last</span><span class="special">)</span> <span class="special">);</span>
+
+ <span class="keyword">int</span> <span class="identifier">reference_index</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+ <span class="identifier">Iterator1</span> <span class="identifier">test_it</span> <span class="special">=</span> <span class="identifier">test_first</span><span class="special">;</span>
+ <span class="identifier">Iterator2</span> <span class="identifier">reference_it</span> <span class="special">=</span> <span class="identifier">reference_first</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(;</span> <span class="identifier">test_it</span> <span class="special">!=</span> <span class="identifier">test_last</span><span class="special">;</span> <span class="special">++</span><span class="identifier">test_it</span><span class="special">,</span> <span class="special">++</span><span class="identifier">reference_it</span><span class="special">,</span> <span class="special">++</span><span class="identifier">reference_index</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">BOOST_CHECK_EQUAL</span><span class="special">(</span> <span class="special">*</span><span class="identifier">test_it</span><span class="special">,</span> <span class="special">*</span><span class="identifier">reference_it</span> <span class="special">);</span>
+ <span class="identifier">BOOST_CHECK_EQUAL</span><span class="special">(</span> <span class="identifier">test_it</span><span class="special">.</span><span class="identifier">index</span><span class="special">(),</span> <span class="identifier">reference_index</span> <span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">10</span><span class="special">,</span><span class="number">20</span><span class="special">,</span><span class="number">30</span><span class="special">,</span><span class="number">40</span><span class="special">,</span><span class="number">50</span><span class="special">,</span><span class="number">60</span><span class="special">,</span><span class="number">70</span><span class="special">,</span><span class="number">80</span><span class="special">,</span><span class="number">90</span><span class="special">;</span>
+
+ <span class="identifier">display_element_and_index</span><span class="special">(</span> <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">indexed</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">);</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="identifier">Element</span> <span class="special">=</span> <span class="number">10</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">0</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">20</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">1</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">30</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">2</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">40</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">3</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">50</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">4</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">60</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">5</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">70</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">6</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">80</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">7</span>
+<span class="identifier">Element</span> <span class="special">=</span> <span class="number">90</span> <span class="identifier">Index</span> <span class="special">=</span> <span class="number">8</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="filtered.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="indirected.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indirected.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/indirected.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,146 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>indirected</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="indexed.html" title="indexed">
+<link rel="next" href="map_keys.html" title="map_keys">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="indexed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="map_keys.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="indirected">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.indirected"></a><a class="link" href="indirected.html" title="indirected">
+ indirected</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="indirected.html#range.reference.adaptors.adaptors_reference.indirected.indirected_example">
+ indirected example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">indirected</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">indirect</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range defines unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all elements <code class="computeroutput"><span class="identifier">x</span></code> in the returned range, <code class="computeroutput"><span class="identifier">x</span></code> is the result of <code class="computeroutput"><span class="special">*</span><span class="identifier">y</span></code>
+ where <code class="computeroutput"><span class="identifier">y</span></code> is the corresponding
+ element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="indirected example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.indirected.indirected_example"></a><a class="link" href="indirected.html#range.reference.adaptors.adaptors_reference.indirected.indirected_example" title="indirected example">
+ indirected example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">indirected</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">shared_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">input</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">i</span><span class="special">)));</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">indirected</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="indexed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="map_keys.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_keys.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_keys.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,146 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>map_keys</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="indirected.html" title="indirected">
+<link rel="next" href="map_values.html" title="map_values">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="indirected.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="map_values.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="map_keys">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.map_keys"></a><a class="link" href="map_keys.html" title="map_keys">
+ map_keys</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="map_keys.html#range.reference.adaptors.adaptors_reference.map_keys.map_keys_example">
+ map_keys example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">map_keys</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">keys</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is an instantiation of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all elements <code class="computeroutput"><span class="identifier">x</span></code> in the returned range, <code class="computeroutput"><span class="identifier">x</span></code> is the result of <code class="computeroutput"><span class="identifier">y</span><span class="special">.</span><span class="identifier">first</span></code> where <code class="computeroutput"><span class="identifier">y</span></code>
+ is the corresponding element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="map_keys example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.map_keys.map_keys_example"></a><a class="link" href="map_keys.html#range.reference.adaptors.adaptors_reference.map_keys.map_keys_example" title="map_keys example">
+ map_keys example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">input</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">i</span> <span class="special">*</span> <span class="number">10</span><span class="special">));</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">map_keys</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">0</span><span class="special">,</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="indirected.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="map_values.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_values.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/map_values.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,146 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>map_values</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="map_keys.html" title="map_keys">
+<link rel="next" href="replaced.html" title="replaced">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="map_keys.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replaced.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="map_values">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.map_values"></a><a class="link" href="map_values.html" title="map_values">
+ map_values</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="map_values.html#range.reference.adaptors.adaptors_reference.map_values.map_values_example">
+ map_values example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">map_values</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">values</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is an instantiation of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all elements <code class="computeroutput"><span class="identifier">x</span></code> in the returned range, <code class="computeroutput"><span class="identifier">x</span></code> is the result of <code class="computeroutput"><span class="identifier">y</span><span class="special">.</span><span class="identifier">second</span></code> where <code class="computeroutput"><span class="identifier">y</span></code>
+ is the corresponding element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="map_values example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.map_values.map_values_example"></a><a class="link" href="map_values.html#range.reference.adaptors.adaptors_reference.map_values.map_values_example" title="map_values example">
+ map_values example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">map</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">input</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">i</span> <span class="special">*</span> <span class="number">10</span><span class="special">));</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">map_values</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">0</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">20</span><span class="special">,</span><span class="number">30</span><span class="special">,</span><span class="number">40</span><span class="special">,</span><span class="number">50</span><span class="special">,</span><span class="number">60</span><span class="special">,</span><span class="number">70</span><span class="special">,</span><span class="number">80</span><span class="special">,</span><span class="number">90</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="map_keys.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replaced.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,161 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>replaced</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="map_values.html" title="map_values">
+<link rel="next" href="replaced_if.html" title="replaced_if">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="map_values.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replaced_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="replaced">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.replaced"></a><a class="link" href="replaced.html" title="replaced">
+ replaced</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="replaced.html#range.reference.adaptors.adaptors_reference.replaced.replaced_example">
+ replaced example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced</span><span class="special">(</span><span class="identifier">new_value</span><span class="special">,</span>
+ <span class="identifier">old_value</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replace</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">new_value</span><span class="special">,</span>
+ <span class="identifier">old_value</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">new_value</span></code> is convertible
+ to the <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">old_value</span></code> is convertible
+ to the <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range.
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all elements <code class="computeroutput"><span class="identifier">x</span></code> in the returned range, the value
+ <code class="computeroutput"><span class="identifier">x</span></code> is equal to the value
+ of <code class="computeroutput"><span class="special">(</span><span class="identifier">y</span>
+ <span class="special">==</span> <span class="identifier">old_value</span><span class="special">)</span> <span class="special">?</span> <span class="identifier">new_value</span> <span class="special">:</span>
+ <span class="identifier">y</span></code> where <code class="computeroutput"><span class="identifier">y</span></code>
+ is the corresponding element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="replaced example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.replaced.replaced_example"></a><a class="link" href="replaced.html#range.reference.adaptors.adaptors_reference.replaced.replaced_example" title="replaced example">
+ replaced example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">replaced</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">9</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">replaced</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">1</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">9</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="map_values.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replaced_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/replaced_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,165 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>replaced_if</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="replaced.html" title="replaced">
+<link rel="next" href="reversed.html" title="reversed">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replaced.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reversed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="replaced_if">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.replaced_if"></a><a class="link" href="replaced_if.html" title="replaced_if">
+ replaced_if</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="replaced_if.html#range.reference.adaptors.adaptors_reference.replaced_if.replaced_if_example">
+ replaced_if example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced_if</span><span class="special">(</span><span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">new_value</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replace_if</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">new_value</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ The range <code class="computeroutput"><span class="identifier">value_type</span></code>
+ is convertible to the argument type of <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">new_value</span></code> is convertible
+ to the <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range.
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Postconditions:</strong></span> For all elements
+ <code class="computeroutput"><span class="identifier">x</span></code> in the returned range,
+ the value <code class="computeroutput"><span class="identifier">x</span></code> is equal
+ to the value of <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">)</span> <span class="special">?</span> <span class="identifier">new_value</span> <span class="special">:</span>
+ <span class="identifier">y</span></code> where <code class="computeroutput"><span class="identifier">y</span></code>
+ is the corresponding element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="replaced_if example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.replaced_if.replaced_if_example"></a><a class="link" href="replaced_if.html#range.reference.adaptors.adaptors_reference.replaced_if.replaced_if_example" title="replaced_if example">
+ replaced_if example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">replaced_if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">struct</span> <span class="identifier">is_even</span>
+<span class="special">{</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">0</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">replaced_if</span><span class="special">(</span><span class="identifier">is_even</span><span class="special">(),</span> <span class="number">10</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">1</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">9</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replaced.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reversed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/reversed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/reversed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,140 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>reversed</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="replaced_if.html" title="replaced_if">
+<link rel="next" href="sliced.html" title="sliced">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replaced_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sliced.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="reversed">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.reversed"></a><a class="link" href="reversed.html" title="reversed">
+ reversed</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reversed.html#range.reference.adaptors.adaptors_reference.reversed.reversed_example">
+ reversed example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span> A range whose iterators behave
+ as if they were the original iterators wrapped in <code class="computeroutput"><span class="identifier">reverse_iterator</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="reversed example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.reversed.reversed_example"></a><a class="link" href="reversed.html#range.reference.adaptors.adaptors_reference.reversed.reversed_example" title="reversed example">
+ reversed example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">reversed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">void</span> <span class="identifier">reversed_example_test</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">reversed</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">9</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">1</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replaced_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sliced.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/sliced.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/sliced.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,150 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>sliced</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="reversed.html" title="reversed">
+<link rel="next" href="strided.html" title="strided">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reversed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="strided.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="sliced">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.sliced"></a><a class="link" href="sliced.html" title="sliced">
+ sliced</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="sliced.html#range.reference.adaptors.adaptors_reference.sliced.sliced_example">
+ sliced example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">sliced</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">slice</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><code class="computeroutput"><span class="number">0</span>
+ <span class="special">&lt;=</span> <span class="identifier">n</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">n</span>
+ <span class="special">&lt;=</span> <span class="identifier">m</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">m</span>
+ <span class="special">&lt;</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span><code class="computeroutput"><span class="identifier">make_range</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="sliced example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.sliced.sliced_example"></a><a class="link" href="sliced.html#range.reference.adaptors.adaptors_reference.sliced.sliced_example" title="sliced example">
+ sliced example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">sliced</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">sliced</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reversed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="strided.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/strided.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/strided.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,147 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>strided</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="sliced.html" title="sliced">
+<link rel="next" href="tokenized.html" title="tokenized">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sliced.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tokenized.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="strided">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.strided"></a><a class="link" href="strided.html" title="strided">
+ strided</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="strided.html#range.reference.adaptors.adaptors_reference.strided.strided_example">
+ strided example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">strided</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">stride</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">n</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><code class="computeroutput"><span class="number">0</span>
+ <span class="special">&lt;=</span> <span class="identifier">n</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">n</span>
+ <span class="special">&lt;</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span> A new range based on <code class="computeroutput"><span class="identifier">rng</span></code> where traversal is performed
+ in steps of <code class="computeroutput"><span class="identifier">n</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="strided example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.strided.strided_example"></a><a class="link" href="strided.html#range.reference.adaptors.adaptors_reference.strided.strided_example" title="strided example">
+ strided example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">strided</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">,</span><span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">strided</span><span class="special">(</span><span class="number">2</span><span class="special">),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">1</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">9</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sliced.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tokenized.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/tokenized.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/tokenized.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,143 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>tokenized</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="strided.html" title="strided">
+<link rel="next" href="transformed.html" title="transformed">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="strided.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transformed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="tokenized">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.tokenized"></a><a class="link" href="tokenized.html" title="tokenized">
+ tokenized</a>
+</h5></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span><span class="identifier">regex</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span><span class="identifier">regex</span><span class="special">,</span> <span class="identifier">i</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span><span class="identifier">regex</span><span class="special">,</span> <span class="identifier">rndRng</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span><span class="identifier">regex</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span><span class="identifier">regex</span><span class="special">,</span> <span class="identifier">rndRng</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenize</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">regex</span><span class="special">)</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenize</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">regex</span><span class="special">,</span> <span class="identifier">i</span><span class="special">)</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenize</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">regex</span><span class="special">,</span> <span class="identifier">rndRng</span><span class="special">)</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenize</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">regex</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenize</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">regex</span><span class="special">,</span> <span class="identifier">rndRng</span><span class="special">,</span> <span class="identifier">flags</span><span class="special">)</span>
+</pre>
+<p>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span><div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Let <code class="computeroutput"><span class="identifier">T</span></code> denote <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">decltype</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)&gt;::</span><span class="identifier">type</span></code>,
+ then <code class="computeroutput"><span class="identifier">regex</span></code> has
+ the type <code class="computeroutput"><span class="identifier">basic_regex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> or is implicitly convertible
+ to one of these types.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">i</span></code> has the type
+ <code class="computeroutput"><span class="keyword">int</span></code>.
+ </li>
+<li class="listitem">
+ the <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of <code class="computeroutput"><span class="identifier">rndRng</span></code> is <code class="computeroutput"><span class="keyword">int</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">flags</span></code> has the type
+ <code class="computeroutput"><span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">syntax_option_type</span></code>.
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+<span class="bold"><strong>Returns:</strong></span> A range whose iterators behave
+ as if they were the original iterators wrapped in <code class="computeroutput"><span class="identifier">regex_token_iterator</span></code>.
+ The first iterator in the range would be constructed by forwarding
+ all the arguments of <code class="computeroutput"><span class="identifier">tokenized</span><span class="special">()</span></code> to the <code class="computeroutput"><span class="identifier">regex_token_iterator</span></code>
+ constructor.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Throws:</strong></span> Whatever constructing and
+ copying equivalent <code class="computeroutput"><span class="identifier">regex_token_iterator</span></code>s
+ might throw.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>
+</li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="strided.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transformed.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/transformed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/transformed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,156 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>transformed</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="tokenized.html" title="tokenized">
+<link rel="next" href="uniqued.html" title="uniqued">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tokenized.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniqued.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="transformed">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.transformed"></a><a class="link" href="transformed.html" title="transformed">
+ transformed</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="transformed.html#range.reference.adaptors.adaptors_reference.transformed.transformed_example">
+ transformed example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">transformed</span><span class="special">(</span><span class="identifier">fun</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">transform</span><span class="special">(</span><span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">fun</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is convertible to the argument type of <code class="computeroutput"><span class="identifier">fun</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all elements <code class="computeroutput"><span class="identifier">x</span></code> in the returned range, <code class="computeroutput"><span class="identifier">x</span></code> is the result of <code class="computeroutput"><span class="identifier">fun</span><span class="special">(</span><span class="identifier">y</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">y</span></code> is the corresponding
+ element in the original range.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Throws:</strong></span> Whatever the copy-constructor
+ of <code class="computeroutput"><span class="identifier">fun</span></code> might throw.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="transformed example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.transformed.transformed_example"></a><a class="link" href="transformed.html#range.reference.adaptors.adaptors_reference.transformed.transformed_example" title="transformed example">
+ transformed example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">transformed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">struct</span> <span class="identifier">double_int</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">int</span> <span class="identifier">result_type</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">x</span> <span class="special">*</span> <span class="number">2</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">argc</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">argv</span><span class="special">[])</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">7</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">9</span><span class="special">,</span><span class="number">10</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">transformed</span><span class="special">(</span><span class="identifier">double_int</span><span class="special">()),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">2</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">6</span><span class="special">,</span><span class="number">8</span><span class="special">,</span><span class="number">10</span><span class="special">,</span><span class="number">12</span><span class="special">,</span><span class="number">14</span><span class="special">,</span><span class="number">16</span><span class="special">,</span><span class="number">18</span><span class="special">,</span><span class="number">20</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tokenized.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="uniqued.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/uniqued.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_reference/uniqued.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,142 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>uniqued</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors_reference.html" title="Reference">
+<link rel="prev" href="transformed.html" title="transformed">
+<link rel="next" href="../../algorithms.html" title="Range Algorithm">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transformed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="uniqued">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.adaptors.adaptors_reference.uniqued"></a><a class="link" href="uniqued.html" title="uniqued">
+ uniqued</a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="uniqued.html#range.reference.adaptors.adaptors_reference.uniqued.uniqued_example">
+ uniqued example</a></span></dt></dl></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Syntax
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Pipe
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rng</span> <span class="special">|</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">uniqued</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Function
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong>Precondition:</strong></span> The <code class="computeroutput"><span class="identifier">value_type</span></code>
+ of the range is comparable with <code class="computeroutput"><span class="keyword">operator</span><span class="special">==()</span></code>.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Postcondition:</strong></span> For all adjacent elements
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code> in the returned range, <code class="computeroutput"><span class="identifier">x</span><span class="special">==</span><span class="identifier">y</span></code> is false.
+ </li>
+<li class="listitem">
+<span class="bold"><strong>Range Category:</strong></span><code class="computeroutput"><span class="identifier">ForwardRange</span></code>
+</li>
+</ul></div>
+<div class="section" title="uniqued example">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="range.reference.adaptors.adaptors_reference.uniqued.uniqued_example"></a><a class="link" href="uniqued.html#range.reference.adaptors.adaptors_reference.uniqued.uniqued_example" title="uniqued example">
+ uniqued example</a>
+</h6></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">uniqued</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assign</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">algorithm</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">void</span> <span class="identifier">uniqued_example_test</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">assign</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">;</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">input</span><span class="special">;</span>
+ <span class="identifier">input</span> <span class="special">+=</span> <span class="number">1</span><span class="special">,</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span><span class="special">;</span>
+
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span>
+ <span class="identifier">input</span> <span class="special">|</span> <span class="identifier">uniqued</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">,</span> <span class="string">","</span><span class="special">));</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<p>
+ This would produce the output:
+</p>
+<pre class="programlisting"><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">,</span><span class="number">4</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="number">6</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transformed.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors_reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/adaptors/adaptors_synopsis.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/adaptors/adaptors_synopsis.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Synopsis</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../adaptors.html" title="Range Adaptors">
+<link rel="prev" href="adaptors_introduction.html" title="Introduction and motivation">
+<link rel="next" href="adaptors_general_requirements.html" title="General Requirements">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_general_requirements.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.adaptors.adaptors_synopsis"></a><a class="link" href="adaptors_synopsis.html" title="Synopsis"> Synopsis</a>
+</h4></div></div></div>
+<p>
+ The library provides the following Adapter Generator expressions:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">adjacent_filtered</span><span class="special">(</span><span class="identifier">bi_pred</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">copied</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">filtered</span><span class="special">(</span><span class="identifier">pred</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">indexed</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">indirected</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">map_keys</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">map_values</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced</span><span class="special">(</span><span class="identifier">new_value</span><span class="special">,</span> <span class="identifier">old_value</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">replaced_if</span><span class="special">(</span><span class="identifier">pred</span><span class="special">,</span> <span class="identifier">new_value</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">reversed</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">sliced</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">strided</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">tokenized</span><span class="special">(</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">arguments</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">transformed</span><span class="special">(</span><span class="identifier">fun</span><span class="special">)</span>
+<span class="identifier">rng</span> <span class="special">|</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">uniqued</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adaptors.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adaptors_general_requirements.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,59 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="adaptors/adaptors_reference/uniqued.html" title="uniqued">
+<link rel="next" href="algorithms/range_algorithm_introduction.html" title="Introduction and motivation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors/adaptors_reference/uniqued.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="algorithms/range_algorithm_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.algorithms"></a><a class="link" href="algorithms.html" title="Range Algorithm"> Range Algorithm</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="algorithms/range_algorithm_introduction.html">
+ Introduction and motivation</a></span></dt>
+<dt><span class="section"><a href="algorithms/range_algorithm_mutating_algorithms.html">
+ Mutating algorithms</a></span></dt>
+<dt><span class="section"><a href="algorithms/range_algorithm_non_mutating_algorithms.html">
+ Non-mutating algorithms</a></span></dt>
+<dt><span class="section"> Set algorithms</span></dt>
+<dt><span class="section"> Heap algorithms</span></dt>
+<dt><span class="section"><a href="algorithms/permutation_algorithms.html">
+ Permutation algorithms</a></span></dt>
+<dt><span class="section"><a href="algorithms/range_algorithm_new_algorithms.html">
+ New algorithms</a></span></dt>
+<dt><span class="section"><a href="algorithms/range_numeric.html"> Numeric
+ algorithms</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors/adaptors_reference/uniqued.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="algorithms/range_algorithm_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Heap algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="set_algorithms/set_symmetric_difference.html" title="set_symmetric_difference">
+<link rel="next" href="heap_algorithms/push_heap.html" title="push_heap">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_algorithms/set_symmetric_difference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="heap_algorithms/push_heap.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Heap algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.heap_algorithms"></a><a class="link" href="heap_algorithms.html" title="Heap algorithms"> Heap algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="heap_algorithms/push_heap.html">
+ push_heap</a></span></dt>
+<dt><span class="section"><a href="heap_algorithms/pop_heap.html">
+ pop_heap</a></span></dt>
+<dt><span class="section"><a href="heap_algorithms/make_heap.html">
+ make_heap</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_algorithms/set_symmetric_difference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="heap_algorithms/push_heap.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/make_heap.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/make_heap.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,144 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>make_heap</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../heap_algorithms.html" title="Heap algorithms">
+<link rel="prev" href="pop_heap.html" title="pop_heap">
+<link rel="next" href="../permutation_algorithms.html" title="Permutation algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="pop_heap.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="make_heap">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.heap_algorithms.make_heap"></a><a class="link" href="make_heap.html" title="make_heap">
+ make_heap</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.heap_algorithms.make_heap.prototype"></a><h6>
+<a name="id3252496"></a>
+ <a class="link" href="make_heap.html#range.reference.algorithms.heap_algorithms.make_heap.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">make_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">make_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.make_heap.description"></a><h6>
+<a name="id3252846"></a>
+ <a class="link" href="make_heap.html#range.reference.algorithms.heap_algorithms.make_heap.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">make_heap</span></code> turns <code class="computeroutput"><span class="identifier">rng</span></code> into a heap.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.make_heap.definition"></a><h6>
+<a name="id3252927"></a>
+ <a class="link" href="make_heap.html#range.reference.algorithms.heap_algorithms.make_heap.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">heap_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.make_heap.requirements"></a><h6>
+<a name="id3253000"></a>
+ <a class="link" href="make_heap.html#range.reference.algorithms.heap_algorithms.make_heap.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Compare</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">Compare</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.heap_algorithms.make_heap.complexity"></a><h6>
+<a name="id3253236"></a>
+ <a class="link" href="make_heap.html#range.reference.algorithms.heap_algorithms.make_heap.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="number">3</span> <span class="special">*</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="pop_heap.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/pop_heap.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,156 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>pop_heap</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../heap_algorithms.html" title="Heap algorithms">
+<link rel="prev" href="push_heap.html" title="push_heap">
+<link rel="next" href="make_heap.html" title="make_heap">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_heap.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="make_heap.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="pop_heap">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.heap_algorithms.pop_heap"></a><a class="link" href="pop_heap.html" title="pop_heap">
+ pop_heap</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.prototype"></a><h6>
+<a name="id3251517"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">pop_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">pop_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.description"></a><h6>
+<a name="id3251867"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">pop_heap</span></code> removes the
+ largest element from the heap. It is assumed that <code class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">prior</span><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is already a heap and that the element
+ to be added is <code class="computeroutput"><span class="special">*</span><span class="identifier">prior</span><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.definition"></a><h6>
+<a name="id3252027"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">heap_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.requirements"></a><h6>
+<a name="id3252099"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Compare</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">Compare</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.precondition_"></a><h6>
+<a name="id3252335"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="computeroutput"><span class="special">!</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code></li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">rng</span></code> is a heap.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.heap_algorithms.pop_heap.complexity"></a><h6>
+<a name="id3252407"></a>
+ <a class="link" href="pop_heap.html#range.reference.algorithms.heap_algorithms.pop_heap.complexity">Complexity</a>
+ </h6>
+<p>
+ Logarithmic. At most <code class="computeroutput"><span class="number">2</span> <span class="special">*</span>
+ <span class="identifier">log</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_heap.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="make_heap.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/push_heap.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/heap_algorithms/push_heap.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,154 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>push_heap</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../heap_algorithms.html" title="Heap algorithms">
+<link rel="prev" href="../heap_algorithms.html" title="Heap algorithms">
+<link rel="next" href="pop_heap.html" title="pop_heap">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="pop_heap.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="push_heap">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.heap_algorithms.push_heap"></a><a class="link" href="push_heap.html" title="push_heap">
+ push_heap</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.prototype"></a><h6>
+<a name="id3250497"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_heap</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.description"></a><h6>
+<a name="id3250848"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">push_heap</span></code> adds an element
+ to a heap. It is assumed that <code class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>, <code class="computeroutput"><span class="identifier">prior</span><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is already a heap and that the element
+ to be added is <code class="computeroutput"><span class="special">*</span><span class="identifier">prior</span><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.definition"></a><h6>
+<a name="id3251013"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">heap_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.requirements"></a><h6>
+<a name="id3251086"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Compare</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">Compare</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.precondition_"></a><h6>
+<a name="id3251322"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><code class="computeroutput"><span class="special">!</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code></li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">prior</span><span class="special">(</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)))</span></code> is a heap.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.heap_algorithms.push_heap.complexity"></a><h6>
+<a name="id3251439"></a>
+ <a class="link" href="push_heap.html#range.reference.algorithms.heap_algorithms.push_heap.complexity">Complexity</a>
+ </h6>
+<p>
+ Logarithmic. At most <code class="computeroutput"><span class="identifier">log</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="pop_heap.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Permutation algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="heap_algorithms/make_heap.html" title="make_heap">
+<link rel="next" href="permutation_algorithms/next_permutation.html" title="next_permutation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="heap_algorithms/make_heap.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="permutation_algorithms/next_permutation.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Permutation algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.permutation_algorithms"></a><a class="link" href="permutation_algorithms.html" title="Permutation algorithms">
+ Permutation algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="permutation_algorithms/next_permutation.html">
+ next_permutation</a></span></dt>
+<dt><span class="section"><a href="permutation_algorithms/prev_permutation.html">
+ prev_permutation</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="heap_algorithms/make_heap.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="permutation_algorithms/next_permutation.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/next_permutation.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>next_permutation</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../permutation_algorithms.html" title="Permutation algorithms">
+<link rel="prev" href="../permutation_algorithms.html" title="Permutation algorithms">
+<link rel="next" href="prev_permutation.html" title="prev_permutation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="prev_permutation.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="next_permutation">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation"></a><a class="link" href="next_permutation.html" title="next_permutation">
+ next_permutation</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation.prototype"></a><h6>
+<a name="id3253337"></a>
+ <a class="link" href="next_permutation.html#range.reference.algorithms.permutation_algorithms.next_permutation.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">next_permutation</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">next_permutation</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation.description"></a><h6>
+<a name="id3253689"></a>
+ <a class="link" href="next_permutation.html#range.reference.algorithms.permutation_algorithms.next_permutation.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">next_permutation</span></code> transforms
+ the range of elements <code class="computeroutput"><span class="identifier">rng</span></code>
+ into the lexicographically next greater permutation of the elements if
+ such a permutation exists. If one does not exist then the range is transformed
+ into the lexicographically smallest permutation and <code class="computeroutput"><span class="keyword">false</span></code>
+ is returned. <code class="computeroutput"><span class="keyword">true</span></code> is returned
+ when the next greater permutation is successfully generated.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation.definition"></a><h6>
+<a name="id3253796"></a>
+ <a class="link" href="next_permutation.html#range.reference.algorithms.permutation_algorithms.next_permutation.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">permutation</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation.requirements"></a><h6>
+<a name="id3253871"></a>
+ <a class="link" href="next_permutation.html#range.reference.algorithms.permutation_algorithms.next_permutation.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Compare</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">Compare</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.permutation_algorithms.next_permutation.complexity"></a><h6>
+<a name="id3254107"></a>
+ <a class="link" href="next_permutation.html#range.reference.algorithms.permutation_algorithms.next_permutation.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">/</span> <span class="number">2</span></code>
+ swaps.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="prev_permutation.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/permutation_algorithms/prev_permutation.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>prev_permutation</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../permutation_algorithms.html" title="Permutation algorithms">
+<link rel="prev" href="next_permutation.html" title="next_permutation">
+<link rel="next" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="next_permutation.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="prev_permutation">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation"></a><a class="link" href="prev_permutation.html" title="prev_permutation">
+ prev_permutation</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation.prototype"></a><h6>
+<a name="id3254191"></a>
+ <a class="link" href="prev_permutation.html#range.reference.algorithms.permutation_algorithms.prev_permutation.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">prev_permutation</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Compare</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">prev_permutation</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation.description"></a><h6>
+<a name="id3254541"></a>
+ <a class="link" href="prev_permutation.html#range.reference.algorithms.permutation_algorithms.prev_permutation.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">prev_permutation</span></code> transforms
+ the range of elements <code class="computeroutput"><span class="identifier">rng</span></code>
+ into the lexicographically next smaller permutation of the elements if
+ such a permutation exists. If one does not exist then the range is transformed
+ into the lexicographically largest permutation and <code class="computeroutput"><span class="keyword">false</span></code>
+ is returned. <code class="computeroutput"><span class="keyword">true</span></code> is returned
+ when the next smaller permutation is successfully generated.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation.definition"></a><h6>
+<a name="id3254651"></a>
+ <a class="link" href="prev_permutation.html#range.reference.algorithms.permutation_algorithms.prev_permutation.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">permutation</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation.requirements"></a><h6>
+<a name="id3254725"></a>
+ <a class="link" href="prev_permutation.html#range.reference.algorithms.permutation_algorithms.prev_permutation.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Compare</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">Compare</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.permutation_algorithms.prev_permutation.complexity"></a><h6>
+<a name="id3254962"></a>
+ <a class="link" href="prev_permutation.html#range.reference.algorithms.permutation_algorithms.prev_permutation.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">/</span> <span class="number">2</span></code>
+ swaps.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="next_permutation.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../permutation_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_introduction.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_introduction.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,257 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction and motivation</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="../algorithms.html" title="Range Algorithm">
+<link rel="next" href="range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../algorithms.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Introduction and motivation">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_algorithm_introduction"></a><a class="link" href="range_algorithm_introduction.html" title="Introduction and motivation">
+ Introduction and motivation</a>
+</h4></div></div></div>
+<p>
+ In its most simple form a <span class="bold"><strong>Range Algorithm</strong></span>
+ (or range-based algorithm) is simply an iterator-based algorithm where
+ the <span class="emphasis"><em>two</em></span> iterator arguments have been replaced by
+ <span class="emphasis"><em>one</em></span> range argument. For example, we may write
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span> <span class="special">=</span> <span class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ instead of
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ However, the return type of range algorithms is almost always different
+ from that of existing iterator-based algorithms.
+ </p>
+<p>
+ One group of algorithms, like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">()</span></code>, 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
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">:</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">));</span>
+</pre>
+<p>
+ to first sort the range and then run <code class="computeroutput"><span class="identifier">unique</span><span class="special">()</span></code> on the sorted range.
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">()</span></code>
+ fall into another group of algorithms that return (potentially) narrowed
+ views of the original range. By default <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">found</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">found</span></code> denotes the
+ iterator returned by <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+<p>
+ Therefore exactly the unique values can be copied by writing
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">)),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span></code> usually return the same range:
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">found</span><span class="special">)</span></code>. However, this behaviour may be changed
+ by supplying the algorithms with a template argument:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns a single iterator like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_found</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span>
+ <span class="identifier">found</span><span class="special">)</span></code>
+ (this is the default)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_next</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">found</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">found</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_next_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">found</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the entire original range.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ This functionality has the following advantages:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ it allows for <span class="emphasis"><em><span class="bold"><strong>seamless functional-style
+ programming</strong></span></em></span> where you do not need to use named
+ local variables to store intermediate results
+ </li>
+<li class="listitem">
+ it is very <span class="emphasis"><em><span class="bold"><strong>safe</strong></span></em></span>
+ because the algorithm can verify out-of-bounds conditions and handle
+ tricky conditions that lead to empty ranges
+ </li>
+</ol></div>
+<p>
+ For example, consider how easy we may erase the duplicates in a sorted
+ container:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span> <span class="special">=</span> <span class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span><span class="special">&gt;(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">)));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Notice the use of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span></code>.
+ What if we wanted to erase all the duplicates except one of them? In old-fashined
+ STL-programming we might write
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// assume 'vec' is already sorted
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+
+<span class="comment">// remember this check or you get into problems
+</span><span class="keyword">if</span> <span class="special">(</span><span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span>
+ <span class="special">++</span><span class="identifier">i</span><span class="special">;</span>
+
+<span class="identifier">vec</span><span class="special">.</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ The same task may be accomplished simply with
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_next_end</span><span class="special">&gt;(</span><span class="identifier">vec</span><span class="special">));</span>
+</pre>
+<p>
+ and there is no need to worry about generating an invalid range. Furthermore,
+ if the container is complex, calling <code class="computeroutput"><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></code> several times will be more expensive
+ than using a range algorithm.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../algorithms.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,86 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Mutating algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_introduction.html" title="Introduction and motivation">
+<link rel="next" href="range_algorithm_mutating_algorithms/copy.html" title="Range Algorithm - copy">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms/copy.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Mutating algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms"></a><a class="link" href="range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+ Mutating algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/copy.html">
+ Range Algorithm - copy</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/copy_backward.html">
+ Range Algorithm - copy_backward</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/fill.html">
+ Range Algorithm - fill</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/generate.html">
+ Range Algorithm - generate</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/inplace_merge.html">
+ Range Algorithm - inplace_merge</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/merge.html">
+ Range Algorithm - merge</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/nth_element.html">
+ Range Algorithm - nth_element</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/partial_sort.html">
+ Range Algorithm - partial_sort</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/partition.html">
+ Range Algorithm - partition</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/random_shuffle.html">
+ Range Algorithm - random_shuffle</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/remove.html">
+ Range Algorithm - remove</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/remove_if.html">
+ Range Algorithm - remove_if</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/replace.html">
+ Range Algorithm - replace</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/replace_if.html">
+ Range Algorithm - replace_if</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/rotate.html">
+ Range Algorithm - rotate</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/sort.html">
+ Range Algorithm - sort</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/stable_partition.html">
+ Range Algorithm - stable_partition</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/stable_sort.html">
+ Range Algorithm - stable_sort</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/transform.html">
+ Range Algorithm - transform</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/unique.html">
+ Range Algorithm - unique</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms/copy.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,116 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - copy</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="next" href="copy_backward.html" title="Range Algorithm - copy_backward">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - copy">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy"></a><a class="link" href="copy.html" title="Range Algorithm - copy">
+ Range Algorithm - copy</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.prototype"></a><h6>
+<a name="id3199494"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.description"></a><h6>
+<a name="id3199626"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">copy</span></code> copies all elements
+ from <code class="computeroutput"><span class="identifier">source_rng</span></code> to the
+ range <code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code>. The return value is <code class="computeroutput"><span class="identifier">out_it</span> <span class="special">+</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.definition"></a><h6>
+<a name="id3199761"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.requirements"></a><h6>
+<a name="id3199835"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="identifier">value_type</span></code> of
+ <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
+ Concept is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.precondition_"></a><h6>
+<a name="id3199946"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out_it</span></code> is not an iterator
+ within the <code class="computeroutput"><span class="identifier">source_rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy.complexity"></a><h6>
+<a name="id3200052"></a>
+ <a class="link" href="copy.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/copy_backward.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,125 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - copy_backward</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="copy.html" title="Range Algorithm - copy">
+<link rel="next" href="fill.html" title="Range Algorithm - fill">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="fill.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - copy_backward">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward"></a><a class="link" href="copy_backward.html" title="Range Algorithm - copy_backward">
+ Range Algorithm - copy_backward</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.prototype"></a><h6>
+<a name="id3200124"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalOutputIterator</span><span class="special">&gt;</span>
+ <span class="identifier">BidirectionalOutputIterator</span>
+ <span class="identifier">copy_backward</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">BidirectionalOutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.description"></a><h6>
+<a name="id3200258"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">copy_backward</span></code> copies
+ all elements from <code class="computeroutput"><span class="identifier">source_rng</span></code>
+ to the range <code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span>
+ <span class="special">-</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">),</span> <span class="identifier">out_it</span><span class="special">)</span></code>.
+ </p>
+<p>
+ The values are copied in reverse order. The return value is <code class="computeroutput"><span class="identifier">out_it</span> <span class="special">-</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code>.
+ </p>
+<p>
+ Note well that unlike all other standard algorithms <code class="computeroutput"><span class="identifier">out_it</span></code>
+ denotes the <span class="bold"><strong>end</strong></span> of the output sequence.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.definition"></a><h6>
+<a name="id3200418"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy_backward</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.requirements"></a><h6>
+<a name="id3200492"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="identifier">value_type</span></code> of
+ <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
+ Concept is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.precondition_"></a><h6>
+<a name="id3200603"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out_it</span></code> is not an iterator
+ within the <code class="computeroutput"><span class="identifier">source_rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.complexity"></a><h6>
+<a name="id3200710"></a>
+ <a class="link" href="copy_backward.html#range.reference.algorithms.range_algorithm_mutating_algorithms.copy_backward.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="fill.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/fill.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,105 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - fill</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="copy_backward.html" title="Range Algorithm - copy_backward">
+<link rel="next" href="generate.html" title="Range Algorithm - generate">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - fill">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill"></a><a class="link" href="fill.html" title="Range Algorithm - fill">
+ Range Algorithm - fill</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill.prototype"></a><h6>
+<a name="id3200782"></a>
+ <a class="link" href="fill.html#range.reference.algorithms.range_algorithm_mutating_algorithms.fill.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">fill</span><span class="special">(</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">fill</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill.description"></a><h6>
+<a name="id3201031"></a>
+ <a class="link" href="fill.html#range.reference.algorithms.range_algorithm_mutating_algorithms.fill.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">fill</span></code> assigns the value
+ <code class="computeroutput"><span class="identifier">val</span></code> to every element
+ in the range <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill.definition"></a><h6>
+<a name="id3201091"></a>
+ <a class="link" href="fill.html#range.reference.algorithms.range_algorithm_mutating_algorithms.fill.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">fill</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill.requirements"></a><h6>
+<a name="id3201165"></a>
+ <a class="link" href="fill.html#range.reference.algorithms.range_algorithm_mutating_algorithms.fill.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is convertible
+ to <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.fill.complexity"></a><h6>
+<a name="id3201279"></a>
+ <a class="link" href="fill.html#range.reference.algorithms.range_algorithm_mutating_algorithms.fill.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/generate.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,121 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - generate</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="fill.html" title="Range Algorithm - fill">
+<link rel="next" href="inplace_merge.html" title="Range Algorithm - inplace_merge">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="fill.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inplace_merge.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - generate">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate"></a><a class="link" href="generate.html" title="Range Algorithm - generate">
+ Range Algorithm - generate</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.prototype"></a><h6>
+<a name="id3201351"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Generator</span><span class="special">&gt;</span>
+<span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">generate</span><span class="special">(</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Generator</span> <span class="identifier">gen</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Generator</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">generate</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Generator</span> <span class="identifier">gen</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.description"></a><h6>
+<a name="id3201594"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">generate</span></code> assigns the
+ result of <code class="computeroutput"><span class="identifier">gen</span><span class="special">()</span></code>
+ to each element in range <code class="computeroutput"><span class="identifier">rng</span></code>.
+ Returns the resultant range.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.definition"></a><h6>
+<a name="id3201658"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">generate</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.requirements"></a><h6>
+<a name="id3201733"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Generator</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">GeneratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="identifier">value_type</span></code> of
+ <code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.precondition_"></a><h6>
+<a name="id3201860"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out_it</span></code> is not an iterator
+ within <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.generate.complexity"></a><h6>
+<a name="id3201966"></a>
+ <a class="link" href="generate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.generate.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="fill.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inplace_merge.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/inplace_merge.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,187 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - inplace_merge</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="generate.html" title="Range Algorithm - generate">
+<link rel="next" href="merge.html" title="Range Algorithm - merge">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="merge.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - inplace_merge">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge"></a><a class="link" href="inplace_merge.html" title="Range Algorithm - inplace_merge">
+ Range Algorithm - inplace_merge</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.prototype"></a><h6>
+<a name="id3202038"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="identifier">BidirectionalRange</span><span class="special">&amp;</span>
+<span class="identifier">inplace_merge</span><span class="special">(</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span>
+<span class="identifier">inplace_merge</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="identifier">BidirectionalRange</span><span class="special">&amp;</span>
+<span class="identifier">inplace_merge</span><span class="special">(</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span> <span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span>
+<span class="identifier">inplace_merge</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.description"></a><h6>
+<a name="id3202602"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">inplace_merge</span></code> combines
+ two consecutive sorted ranges <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code>
+ and <code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> into a single sorted range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>. That is, it starts with a range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> that consists o
f two pieces each of
+ which is in ascending order, and rearranges it so that the entire range
+ is in ascending order. <code class="computeroutput"><span class="identifier">inplace_merge</span></code>
+ is stable, meaning both that the relative order of elements within each
+ input range is preserved.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.definition"></a><h6>
+<a name="id3202830"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">inplace_merge</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.requirements"></a><h6>
+<a name="id3202904"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional
+ Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+</li>
+<li class="listitem">
+ The ordering on objects of <code class="computeroutput"><span class="identifier">range_type</span><span class="special">&lt;</span><span class="identifier">BidirectionalRange</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate version:</strong></span> * <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code> is a model of the
+ <a class="link" href="../../../concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
+ Concept. * <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is mutable. * <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>
+ is a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ * <code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>'s
+ value type is convertible to both <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.precondition_"></a><h6>
+<a name="id3203160"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.precondition_">Precondition:</a>
+ </h6>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.for_the_non_predicate_version_"></a><h6>
+<a name="id3203184"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.for_the_non_predicate_version_">For
+ the non-predicate version:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">middle</span></code> is in the range
+ <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code> is in ascending order. That is for
+ each pair of adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span></code> is <code class="computeroutput"><span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is in ascending order. That is for
+ each pair of adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span></code> is <code class="computeroutput"><span class="keyword">false</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.for_the_predicate_version_"></a><h6>
+<a name="id3203446"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.for_the_predicate_version_">For
+ the predicate version:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">middle</span></code> is in the range
+ <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code> is in ascending order. That is for
+ each pair of adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span><span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is in ascending order. That is for
+ each pair of adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span><span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.complexity"></a><h6>
+<a name="id3203729"></a>
+ <a class="link" href="inplace_merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.inplace_merge.complexity">Complexity</a>
+ </h6>
+<p>
+ Worst case: <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span> <span class="identifier">log</span><span class="special">(</span><span class="identifier">N</span><span class="special">))</span></code>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="merge.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/merge.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,247 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - merge</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="inplace_merge.html" title="Range Algorithm - inplace_merge">
+<link rel="next" href="nth_element.html" title="Range Algorithm - nth_element">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inplace_merge.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nth_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - merge">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge"></a><a class="link" href="merge.html" title="Range Algorithm - merge">
+ Range Algorithm - merge</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.prototype"></a><h6>
+<a name="id3203814"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">merge</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">merge</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.description"></a><h6>
+<a name="id3204165"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">merge</span></code> combines two sorted
+ ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> into a single sorted range by
+ copying elements. <code class="computeroutput"><span class="identifier">merge</span></code>
+ is stable. The return value is <code class="computeroutput"><span class="identifier">out</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+<p>
+ The two versions of <code class="computeroutput"><span class="identifier">merge</span></code>
+ differ by how they compare the elements.
+ </p>
+<p>
+ The non-predicate version uses the <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;()</span></code> for the range value type. The predicate
+ version uses the predicate instead of <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;()</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.definition"></a><h6>
+<a name="id3204349"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">merge</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.requirements"></a><h6>
+<a name="id3204423"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering on objects of <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is convertible to a type in
+ <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s set
+ of value types.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is the same as <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to both <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is convertible to a type in
+ <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s set
+ of value types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.precondition_"></a><h6>
+<a name="id3204928"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.precondition_">Precondition:</a>
+ </h6>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.for_the_non_predicate_version_"></a><h6>
+<a name="id3204952"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.for_the_non_predicate_version_">For
+ the non-predicate version:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The elements of <code class="computeroutput"><span class="identifier">rng1</span></code>
+ are in ascending order. That is, for each adjacent element pair <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code> of <code class="computeroutput"><span class="identifier">rng1</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span> <span class="special">==</span>
+ <span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+ The elements of <code class="computeroutput"><span class="identifier">rng2</span></code>
+ are in ascending order. That is, for each adjacent element pair <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code> of <code class="computeroutput"><span class="identifier">rng2</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span> <span class="special">==</span>
+ <span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+ The ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ do not overlap.
+ </li>
+<li class="listitem">
+ The ranges <code class="computeroutput"><span class="identifier">rng2</span></code> and
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ do not overlap.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.for_the_predicate_version_"></a><h6>
+<a name="id3205413"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.for_the_predicate_version_">For
+ the predicate version:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ The elements of <code class="computeroutput"><span class="identifier">rng1</span></code>
+ is in ascending order. That is, for each adjacent element pair <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>, of <code class="computeroutput"><span class="identifier">rng1</span></code>,
+ <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+ The elements of <code class="computeroutput"><span class="identifier">rng2</span></code>
+ is in ascending order. That is, for each adjacent element pair <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>, of <code class="computeroutput"><span class="identifier">rng2</span></code>,
+ <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </li>
+<li class="listitem">
+ The ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ do not overlap.
+ </li>
+<li class="listitem">
+ The ranges <code class="computeroutput"><span class="identifier">rng2</span></code> and
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ do not overlap.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.merge.complexity"></a><h6>
+<a name="id3205897"></a>
+ <a class="link" href="merge.html#range.reference.algorithms.range_algorithm_mutating_algorithms.merge.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. There are no comparisons if both <code class="computeroutput"><span class="identifier">rng1</span></code>
+ and <code class="computeroutput"><span class="identifier">rng2</span></code> are empty, otherwise
+ at most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inplace_merge.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nth_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/nth_element.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,147 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - nth_element</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="merge.html" title="Range Algorithm - merge">
+<link rel="next" href="partial_sort.html" title="Range Algorithm - partial_sort">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="merge.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - nth_element">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element"></a><a class="link" href="nth_element.html" title="Range Algorithm - nth_element">
+ Range Algorithm - nth_element</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.prototype"></a><h6>
+<a name="id3206028"></a>
+ <a class="link" href="nth_element.html#range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">nth</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">nth_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">nth</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">nth</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">sort_pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">nth_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">nth</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">sort_pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.description"></a><h6>
+<a name="id3206521"></a>
+ <a class="link" href="nth_element.html#range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">nth_element</span></code> partially
+ orders a range of elements. <code class="computeroutput"><span class="identifier">nth_element</span></code>
+ arranges the range <code class="computeroutput"><span class="identifier">rng</span></code>
+ such that the element corresponding with the iterator <code class="computeroutput"><span class="identifier">nth</span></code>
+ is the same as the element that would be in that position if <code class="computeroutput"><span class="identifier">rng</span></code> has been sorted.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.definition"></a><h6>
+<a name="id3206605"></a>
+ <a class="link" href="nth_element.html#range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">nth_element</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.requirements"></a><h6>
+<a name="id3206679"></a>
+ <a class="link" href="nth_element.html#range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering relation on <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.complexity"></a><h6>
+<a name="id3206915"></a>
+ <a class="link" href="nth_element.html#range.reference.algorithms.range_algorithm_mutating_algorithms.nth_element.complexity">Complexity</a>
+ </h6>
+<p>
+ On average, linear in <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="merge.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partial_sort.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,152 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - partial_sort</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="nth_element.html" title="Range Algorithm - nth_element">
+<link rel="next" href="partition.html" title="Range Algorithm - partition">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="nth_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - partial_sort">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort"></a><a class="link" href="partial_sort.html" title="Range Algorithm - partial_sort">
+ Range Algorithm - partial_sort</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.prototype"></a><h6>
+<a name="id3206986"></a>
+ <a class="link" href="partial_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">partial_sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">sort_pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">partial_sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">sort_pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.description"></a><h6>
+<a name="id3207480"></a>
+ <a class="link" href="partial_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">partial_sort</span></code> rearranges
+ the elements in <code class="computeroutput"><span class="identifier">rng</span></code>.
+ It places the smallest <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code> elements, sorted in ascending order,
+ into the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code>. The remaining elements are placed in
+ an unspecified order into <code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">last</span><span class="special">)</span></code>.
+ </p>
+<p>
+ The non-predicative versions of this function specify that one element
+ is less than another by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;()</span></code>. The predicate versions use the
+ predicate instead.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.definition"></a><h6>
+<a name="id3207667"></a>
+ <a class="link" href="partial_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">partial_sort</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.requirements"></a><h6>
+<a name="id3207741"></a>
+ <a class="link" href="partial_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering relation on <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate version:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.complexity"></a><h6>
+<a name="id3207979"></a>
+ <a class="link" href="partial_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partial_sort.complexity">Complexity</a>
+ </h6>
+<p>
+ Approximately <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">log</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">))</span></code> comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="nth_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/partition.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,133 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - partition</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="partial_sort.html" title="Range Algorithm - partial_sort">
+<link rel="next" href="random_shuffle.html" title="Range Algorithm - random_shuffle">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="partial_sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_shuffle.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - partition">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition"></a><a class="link" href="partition.html" title="Range Algorithm - partition">
+ Range Algorithm - partition</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition.prototype"></a><h6>
+<a name="id3208103"></a>
+ <a class="link" href="partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partition.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">partition</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">partition</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">partition</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">partition</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition.description"></a><h6>
+<a name="id3208689"></a>
+ <a class="link" href="partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partition.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">partition</span></code> orders the
+ elements in <code class="computeroutput"><span class="identifier">rng</span></code> based
+ on <code class="computeroutput"><span class="identifier">pred</span></code>, such that the
+ elements that satisfy <code class="computeroutput"><span class="identifier">pred</span></code>
+ precede the elements that do not. In the versions that return a single
+ iterator, the return value is the middle iterator. In the versions that
+ have a configurable range_return, <code class="computeroutput"><span class="identifier">found</span></code>
+ corresponds to the middle iterator.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition.definition"></a><h6>
+<a name="id3208776"></a>
+ <a class="link" href="partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partition.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">partition</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition.requirements"></a><h6>
+<a name="id3208849"></a>
+ <a class="link" href="partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partition.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">PredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>'s
+ argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.partition.complexity"></a><h6>
+<a name="id3208951"></a>
+ <a class="link" href="partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.partition.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> applications of <code class="computeroutput"><span class="identifier">pred</span></code>,
+ and at most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">/</span> <span class="number">2</span></code>
+ swaps.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="partial_sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_shuffle.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/random_shuffle.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,132 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - random_shuffle</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="partition.html" title="Range Algorithm - partition">
+<link rel="next" href="remove.html" title="Range Algorithm - remove">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="partition.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - random_shuffle">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle"></a><a class="link" href="random_shuffle.html" title="Range Algorithm - random_shuffle">
+ Range Algorithm - random_shuffle</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.prototype"></a><h6>
+<a name="id3209069"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">random_shuffle</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Generator</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Generator</span><span class="special">&amp;</span> <span class="identifier">gen</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Generator</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">random_shuffle</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Generator</span><span class="special">&amp;</span> <span class="identifier">gen</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.description"></a><h6>
+<a name="id3209460"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">random_shuffle</span></code> randomly
+ rearranges the elements in <code class="computeroutput"><span class="identifier">rng</span></code>.
+ The versions of <code class="computeroutput"><span class="identifier">random_shuffle</span></code>
+ that do not specify a <code class="computeroutput"><span class="identifier">Generator</span></code>
+ use an internal random number generator. The versions of <code class="computeroutput"><span class="identifier">random_shuffle</span></code> that do specify a <code class="computeroutput"><span class="identifier">Generator</span></code> use this instead. Returns
+ the shuffles range.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.definition"></a><h6>
+<a name="id3209556"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">random_shuffle</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.requirements"></a><h6>
+<a name="id3209631"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the version without a Generator:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>For the version with a Generator:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Generator</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">RandomNumberGeneratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ distance type is convertible to <code class="computeroutput"><span class="identifier">Generator</span></code>'s
+ argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.precondition_"></a><h6>
+<a name="id3209778"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ is less than <code class="computeroutput"><span class="identifier">gen</span></code>'s
+ maximum value.
+ </li></ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.complexity"></a><h6>
+<a name="id3209844"></a>
+ <a class="link" href="random_shuffle.html#range.reference.algorithms.range_algorithm_mutating_algorithms.random_shuffle.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. If <code class="computeroutput"><span class="special">!</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>, exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ swaps are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="partition.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,139 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - remove</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="random_shuffle.html" title="Range Algorithm - random_shuffle">
+<link rel="next" href="remove_if.html" title="Range Algorithm - remove_if">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="random_shuffle.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - remove">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove"></a><a class="link" href="remove.html" title="Range Algorithm - remove">
+ Range Algorithm - remove</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove.prototype"></a><h6>
+<a name="id3209956"></a>
+ <a class="link" href="remove.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span><span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span><span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove.description"></a><h6>
+<a name="id3210578"></a>
+ <a class="link" href="remove.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">remove</span></code> removes from
+ <code class="computeroutput"><span class="identifier">rng</span></code> all of the elements
+ <code class="computeroutput"><span class="identifier">x</span></code> for which <code class="computeroutput"><span class="identifier">x</span> <span class="special">==</span> <span class="identifier">val</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>.
+ The versions of <code class="computeroutput"><span class="identifier">remove</span></code>
+ that return an iterator, return an iterator <code class="computeroutput"><span class="identifier">new_last</span></code>
+ such that the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">new_last</span><span class="special">)</span></code> contains no elements equal to <code class="computeroutput"><span class="identifier">val</span></code>. The <code class="computeroutput"><span class="identifier">range_return</span></code>
+ versions of <code class="computeroutput"><span class="identifier">remove</span></code> defines
+ <code class="computeroutput"><span class="identifier">found</span></code> as the new last
+ element. The iterators in the range <code class="computeroutput"><span class="special">[</span><span class="identifier">new_last</span><span class="special">,</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ are dereferenceable, but the elements are unspecified.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove.definition"></a><h6>
+<a name="id3210816"></a>
+ <a class="link" href="remove.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">remove</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove.requirements"></a><h6>
+<a name="id3210890"></a>
+ <a class="link" href="remove.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ Objects of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ can be compared for equality with objects of <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove.complexity"></a><h6>
+<a name="id3211006"></a>
+ <a class="link" href="remove.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">remove</span></code> performs
+ exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ comparisons for equality.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="random_shuffle.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/remove_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,138 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - remove_if</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="remove.html" title="Range Algorithm - remove">
+<link rel="next" href="replace.html" title="Range Algorithm - replace">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - remove_if">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if"></a><a class="link" href="remove_if.html" title="Range Algorithm - remove_if">
+ Range Algorithm - remove_if</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.prototype"></a><h6>
+<a name="id3211090"></a>
+ <a class="link" href="remove_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span><span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span><span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">remove</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.description"></a><h6>
+<a name="id3211674"></a>
+ <a class="link" href="remove_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">remove_if</span></code> removes from
+ <code class="computeroutput"><span class="identifier">rng</span></code> all of the elements
+ <code class="computeroutput"><span class="identifier">x</span></code> for which <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>. The versions of
+ <code class="computeroutput"><span class="identifier">remove_if</span></code> that return
+ an iterator, return an iterator <code class="computeroutput"><span class="identifier">new_last</span></code>
+ such that the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">new_last</span><span class="special">)</span></code> contains no elements where <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>. The iterators in
+ the range <code class="computeroutput"><span class="special">[</span><span class="identifier">new_last</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> are dereferenceable, but the elements
+ are unspecified.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.definition"></a><h6>
+<a name="id3211906"></a>
+ <a class="link" href="remove_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">remove_if</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.requirements"></a><h6>
+<a name="id3211980"></a>
+ <a class="link" href="remove_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">PredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>'s
+ argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.complexity"></a><h6>
+<a name="id3212097"></a>
+ <a class="link" href="remove_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.remove_if.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">remove_if</span></code> performs
+ exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ applications of <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replace.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,119 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - replace</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="remove_if.html" title="Range Algorithm - remove_if">
+<link rel="next" href="replace_if.html" title="Range Algorithm - replace_if">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - replace">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace"></a><a class="link" href="replace.html" title="Range Algorithm - replace">
+ Range Algorithm - replace</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace.prototype"></a><h6>
+<a name="id3212190"></a>
+ <a class="link" href="replace.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">replace</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">what</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">with_what</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">replace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">what</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">with_what</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace.description"></a><h6>
+<a name="id3212507"></a>
+ <a class="link" href="replace.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">replace</span></code> every element
+ in <code class="computeroutput"><span class="identifier">rng</span></code> equal to <code class="computeroutput"><span class="identifier">what</span></code> with <code class="computeroutput"><span class="identifier">with_what</span></code>.
+ Return a reference to <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace.definition"></a><h6>
+<a name="id3212588"></a>
+ <a class="link" href="replace.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">replace</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace.requirements"></a><h6>
+<a name="id3212662"></a>
+ <a class="link" href="replace.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is convertible
+ to <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>,
+ and may be compared for equality with objects of <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace.complexity"></a><h6>
+<a name="id3212814"></a>
+ <a class="link" href="replace.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">replace</span></code> performs
+ exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ comparisons for equality and at most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> assignments.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="replace_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/replace_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,117 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - replace_if</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="replace.html" title="Range Algorithm - replace">
+<link rel="next" href="rotate.html" title="Range Algorithm - rotate">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rotate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - replace_if">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if"></a><a class="link" href="replace_if.html" title="Range Algorithm - replace_if">
+ Range Algorithm - replace_if</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.prototype"></a><h6>
+<a name="id3212924"></a>
+ <a class="link" href="replace_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">replace_if</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">with_what</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">replace_if</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">with_what</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.description"></a><h6>
+<a name="id3213249"></a>
+ <a class="link" href="replace_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">replace_if</span></code> replaces every
+ element <code class="computeroutput"><span class="identifier">x</span></code> in <code class="computeroutput"><span class="identifier">rng</span></code> for which <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">true</span></code> with <code class="computeroutput"><span class="identifier">with_what</span></code>.
+ Returns a reference to <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.definition"></a><h6>
+<a name="id3213366"></a>
+ <a class="link" href="replace_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">replace_if</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.requirements"></a><h6>
+<a name="id3213441"></a>
+ <a class="link" href="replace_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">PredicateConcept</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>'s
+ argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is convertible
+ to <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.complexity"></a><h6>
+<a name="id3213609"></a>
+ <a class="link" href="replace_if.html#range.reference.algorithms.range_algorithm_mutating_algorithms.replace_if.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">replace_if</span></code> performs
+ exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ applications of <code class="computeroutput"><span class="identifier">pred</span></code>,
+ and at most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> assignments.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replace.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rotate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/rotate.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,110 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - rotate</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="replace_if.html" title="Range Algorithm - replace_if">
+<link rel="next" href="sort.html" title="Range Algorithm - sort">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - rotate">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate"></a><a class="link" href="rotate.html" title="Range Algorithm - rotate">
+ Range Algorithm - rotate</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.prototype"></a><h6>
+<a name="id3213728"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rotate</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rotate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">middle</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.description"></a><h6>
+<a name="id3213989"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">rotate</span></code> rotates the elements
+ in a range. It exchanges the two ranges <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code>
+ and <code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>. Returns a reference to <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.definition"></a><h6>
+<a name="id3214117"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">rotate</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.requirements"></a><h6>
+<a name="id3214192"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.precondition_"></a><h6>
+<a name="id3214256"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">middle</span><span class="special">)</span></code> is a valid range.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">middle</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.complexity"></a><h6>
+<a name="id3214366"></a>
+ <a class="link" href="rotate.html#range.reference.algorithms.range_algorithm_mutating_algorithms.rotate.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> swaps are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="replace_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/sort.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,154 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - sort</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="rotate.html" title="Range Algorithm - rotate">
+<link rel="next" href="stable_partition.html" title="Range Algorithm - stable_partition">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rotate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stable_partition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - sort">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort"></a><a class="link" href="sort.html" title="Range Algorithm - sort">
+ Range Algorithm - sort</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort.prototype"></a><h6>
+<a name="id3214439"></a>
+ <a class="link" href="sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.sort.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort.description"></a><h6>
+<a name="id3214822"></a>
+ <a class="link" href="sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.sort.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">sort</span></code> sorts the elements
+ in <code class="computeroutput"><span class="identifier">rng</span></code> into ascending
+ order. <code class="computeroutput"><span class="identifier">sort</span></code> is not guaranteed
+ to be stable. Returns the sorted range.
+ </p>
+<p>
+ For versions of the <code class="computeroutput"><span class="identifier">sort</span></code>
+ function without a predicate, ascending order is defined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;()</span></code>
+ such that for all adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span> <span class="special">==</span>
+ <span class="keyword">false</span></code>.
+ </p>
+<p>
+ For versions of the <code class="computeroutput"><span class="identifier">sort</span></code>
+ function with a predicate, ascending order is defined by <code class="computeroutput"><span class="identifier">pred</span></code> such that for all adjacent elements
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>, <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span> <span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort.definition"></a><h6>
+<a name="id3215077"></a>
+ <a class="link" href="sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.sort.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">sort</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort.requirements"></a><h6>
+<a name="id3215150"></a>
+ <a class="link" href="sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.sort.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For versions of sort without a predicate:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering relation on <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong>strict weak ordering</strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For versions of sort with a predicate</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.sort.complexity"></a><h6>
+<a name="id3215387"></a>
+ <a class="link" href="sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.sort.complexity">Complexity</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span> <span class="identifier">log</span><span class="special">(</span><span class="identifier">N</span><span class="special">))</span></code> comparisons (both average and worst-case),
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rotate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stable_partition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_partition.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,135 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - stable_partition</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="sort.html" title="Range Algorithm - sort">
+<link rel="next" href="stable_sort.html" title="Range Algorithm - stable_sort">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stable_sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - stable_partition">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition"></a><a class="link" href="stable_partition.html" title="Range Algorithm - stable_partition">
+ Range Algorithm - stable_partition</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.prototype"></a><h6>
+<a name="id3215508"></a>
+ <a class="link" href="stable_partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">stable_partition</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+<span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+<span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">stable_partition</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.description"></a><h6>
+<a name="id3216089"></a>
+ <a class="link" href="stable_partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">stable_partition</span></code> reorders
+ the elements in the range <code class="computeroutput"><span class="identifier">rng</span></code>
+ base on the function object <code class="computeroutput"><span class="identifier">pred</span></code>.
+ Once this function has completed all of the elements that satisfy <code class="computeroutput"><span class="identifier">pred</span></code> appear before all of the elements
+ that fail to satisfy it. <code class="computeroutput"><span class="identifier">stable_partition</span></code>
+ differs from <code class="computeroutput"><span class="identifier">partition</span></code>
+ because it preserves relative order. It is table.
+ </p>
+<p>
+ For the versions that return an iterator, the return value is the iterator
+ to the first element that fails to satisfy <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<p>
+ For versions that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ the <code class="computeroutput"><span class="identifier">found</span></code> iterator is
+ the iterator to the first element that fails to satisfy <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.definition"></a><h6>
+<a name="id3216242"></a>
+ <a class="link" href="stable_partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">stable_partition</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.requirements"></a><h6>
+<a name="id3216318"></a>
+ <a class="link" href="stable_partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">PredicateConcept</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.complexity"></a><h6>
+<a name="id3216409"></a>
+ <a class="link" href="stable_partition.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_partition.complexity">Complexity</a>
+ </h6>
+<p>
+ Best case: <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ Worst case: <code class="computeroutput"><span class="identifier">N</span> <span class="special">*</span>
+ <span class="identifier">log</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>
+ swaps, where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stable_sort.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/stable_sort.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,157 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - stable_sort</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="stable_partition.html" title="Range Algorithm - stable_partition">
+<link rel="next" href="transform.html" title="Range Algorithm - transform">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="stable_partition.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - stable_sort">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort"></a><a class="link" href="stable_sort.html" title="Range Algorithm - stable_sort">
+ Range Algorithm - stable_sort</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.prototype"></a><h6>
+<a name="id3216584"></a>
+ <a class="link" href="stable_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">stable_sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RandomAccessRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">stable_sort</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">RandomAccessRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.description"></a><h6>
+<a name="id3216967"></a>
+ <a class="link" href="stable_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">stable_sort</span></code> sorts the
+ elements in <code class="computeroutput"><span class="identifier">rng</span></code> into
+ ascending order. <code class="computeroutput"><span class="identifier">stable_sort</span></code>
+ is guaranteed to be stable. The order is preserved for equivalent elements.
+ </p>
+<p>
+ For versions of the <code class="computeroutput"><span class="identifier">stable_sort</span></code>
+ function without a predicate ascending order is defined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;()</span></code>
+ such that for all adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span> <span class="special">==</span>
+ <span class="keyword">false</span></code>.
+ </p>
+<p>
+ For versions of the <code class="computeroutput"><span class="identifier">stable_sort</span></code>
+ function with a predicate, ascending order is designed by <code class="computeroutput"><span class="identifier">pred</span></code> such that for all adjacent elements
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>, <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">y</span><span class="special">,</span><span class="identifier">x</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">false</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.definition"></a><h6>
+<a name="id3217221"></a>
+ <a class="link" href="stable_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">stable_sort</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.requirements"></a><h6>
+<a name="id3217296"></a>
+ <a class="link" href="stable_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For versions of stable_sort without a predicate</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering relation on <code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is a <span class="bold"><strong>strict weak ordering</strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For versions of stable_sort with a predicate:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code> is
+ mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">RandomAccessRange</span></code>'s
+ value type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.complexity"></a><h6>
+<a name="id3217533"></a>
+ <a class="link" href="stable_sort.html#range.reference.algorithms.range_algorithm_mutating_algorithms.stable_sort.complexity">Complexity</a>
+ </h6>
+<p>
+ Best case: <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ Worst case: <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span> <span class="identifier">log</span><span class="special">(</span><span class="identifier">N</span><span class="special">)^</span><span class="number">2</span><span class="special">)</span></code>
+ comparisons, where <code class="computeroutput"><span class="identifier">N</span></code>
+ is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="stable_partition.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="transform.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/transform.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,226 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - transform</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="stable_sort.html" title="Range Algorithm - stable_sort">
+<link rel="next" href="unique.html" title="Range Algorithm - unique">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="stable_sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unique.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - transform">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform"></a><a class="link" href="transform.html" title="Range Algorithm - transform">
+ Range Algorithm - transform</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.prototype"></a><h6>
+<a name="id3217722"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryOperation</span>
+<span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">transform</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">UnaryOperation</span> <span class="identifier">fun</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation</span>
+<span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">transform</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryOperation</span> <span class="identifier">fun</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.description"></a><h6>
+<a name="id3218064"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.description">Description</a>
+ </h6>
+<p>
+ <span class="bold"><strong>UnaryOperation version:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">transform</span></code> assigns the
+ value <code class="computeroutput"><span class="identifier">y</span></code> to each element
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)),</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">fun</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> where <code class="computeroutput"><span class="identifier">x</span></code>
+ is the corresponding value to <code class="computeroutput"><span class="identifier">y</span></code>
+ in <code class="computeroutput"><span class="identifier">rng1</span></code>. The return value
+ is <code class="computeroutput"><span class="identifier">out</span> <span class="special">+</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>BinaryOperation version:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">transform</span></code> assigns the
+ value <code class="computeroutput"><span class="identifier">z</span></code> to each element
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))),</span> <span class="identifier">z</span> <span class="special">=</span> <span class="identifier">fun</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code> where <code class="computeroutput"><span class="identifier">x</span></code>
+ is the corresponding value in <code class="computeroutput"><span class="identifier">rng1</span></code>
+ and <code class="computeroutput"><span class="identifier">y</span></code> is the corresponding
+ value in <code class="computeroutput"><span class="identifier">rng2</span></code>. This version
+ of <code class="computeroutput"><span class="identifier">transform</span></code> stops upon
+ reaching either the end of <code class="computeroutput"><span class="identifier">rng1</span></code>,
+ or the end of <code class="computeroutput"><span class="identifier">rng2</span></code>. Hence
+ there isn't a requirement for <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>
+ since there is a safe guaranteed behaviour, unlike with the iterator
+ counterpart in the standard library.
+ </p>
+<p>
+ The return value is <code class="computeroutput"><span class="identifier">out</span> <span class="special">+</span> <span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.definition"></a><h6>
+<a name="id3218616"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">transform</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.requirements"></a><h6>
+<a name="id3218691"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the unary versions of transform:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryOperation</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">UnaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type must be convertible to <code class="computeroutput"><span class="identifier">UnaryFunction</span></code>'s
+ argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryFunction</span></code>'s result
+ type must be convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the binary versions of transform:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type must be convertible to <code class="computeroutput"><span class="identifier">BinaryFunction</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type must be convertible to <code class="computeroutput"><span class="identifier">BinaryFunction</span></code>'s
+ second argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation</span></code>'s result
+ type must be convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.precondition_"></a><h6>
+<a name="id3219045"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the unary version of transform:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out</span></code> is not an iterator
+ within the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">))</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the binary version of transform:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out</span></code> is not an iterator
+ within the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">))</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out</span></code> is not an iterator
+ within the range <code class="computeroutput"><span class="special">[</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span> <span class="special">+</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">out</span> <span class="special">+</span> <span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.transform.complexity"></a><h6>
+<a name="id3219462"></a>
+ <a class="link" href="transform.html#range.reference.algorithms.range_algorithm_mutating_algorithms.transform.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. The operation is applied exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code> for the unary version and <code class="computeroutput"><span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ for the binary version.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="stable_sort.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unique.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_mutating_algorithms/unique.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,164 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - unique</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="transform.html" title="Range Algorithm - transform">
+<link rel="next" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - unique">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique"></a><a class="link" href="unique.html" title="Range Algorithm - unique">
+ Range Algorithm - unique</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique.prototype"></a><h6>
+<a name="id3219589"></a>
+ <a class="link" href="unique.html#range.reference.algorithms.range_algorithm_mutating_algorithms.unique.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">return_begin_found</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">return_begin_found</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">return_begin_found</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">return_begin_found</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">unique</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique.description"></a><h6>
+<a name="id3220621"></a>
+ <a class="link" href="unique.html#range.reference.algorithms.range_algorithm_mutating_algorithms.unique.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">unique</span></code> removes all but
+ the first element of each sequence of duplicate encountered in <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<p>
+ Elements in the range <code class="computeroutput"><span class="special">[</span><span class="identifier">new_last</span><span class="special">,</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ are dereferenceable but undefined.
+ </p>
+<p>
+ Equality is determined by the predicate if one is supplied, or by <code class="computeroutput"><span class="keyword">operator</span><span class="special">==()</span></code>
+ for <code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique.definition"></a><h6>
+<a name="id3220745"></a>
+ <a class="link" href="unique.html#range.reference.algorithms.range_algorithm_mutating_algorithms.unique.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">unique</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique.requirements"></a><h6>
+<a name="id3220821"></a>
+ <a class="link" href="unique.html#range.reference.algorithms.range_algorithm_mutating_algorithms.unique.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions of unique:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions of unique:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is mutable.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type and to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_mutating_algorithms.unique.complexity"></a><h6>
+<a name="id3221034"></a>
+ <a class="link" href="unique.html#range.reference.algorithms.range_algorithm_mutating_algorithms.unique.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ comparisons are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="transform.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>New algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="permutation_algorithms/prev_permutation.html" title="prev_permutation">
+<link rel="next" href="range_algorithm_new_algorithms/erase.html" title="erase">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="permutation_algorithms/prev_permutation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_new_algorithms/erase.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="New algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms"></a><a class="link" href="range_algorithm_new_algorithms.html" title="New algorithms">
+ New algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/erase.html">
+ erase</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/for_each.html">
+ for_each</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/insert.html">
+ insert</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/overwrite.html">
+ overwrite</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/push_back.html">
+ push_back</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/push_front.html">
+ push_front</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/remove_erase.html">
+ remove_erase</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_new_algorithms/remove_erase_if.html">
+ remove_erase_if</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="permutation_algorithms/prev_permutation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_new_algorithms/erase.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/erase.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,91 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>erase</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="next" href="for_each.html" title="for_each">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="erase">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase"></a><a class="link" href="erase.html" title="erase">
+ erase</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase.prototype"></a><h6>
+<a name="id3255065"></a>
+ <a class="link" href="erase.html#range.reference.algorithms.range_algorithm_new_algorithms.erase.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">erase</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="identifier">to_erase</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase.description"></a><h6>
+<a name="id3255222"></a>
+ <a class="link" href="erase.html#range.reference.algorithms.range_algorithm_new_algorithms.erase.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">erase</span></code> the iterator range
+ <code class="computeroutput"><span class="identifier">to_erase</span></code> from the container
+ <code class="computeroutput"><span class="identifier">target</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase.definition"></a><h6>
+<a name="id3255282"></a>
+ <a class="link" href="erase.html#range.reference.algorithms.range_algorithm_new_algorithms.erase.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase.requirements"></a><h6>
+<a name="id3255357"></a>
+ <a class="link" href="erase.html#range.reference.algorithms.range_algorithm_new_algorithms.erase.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ erase of an iterator range.
+ </li></ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.erase.complexity"></a><h6>
+<a name="id3255402"></a>
+ <a class="link" href="erase.html#range.reference.algorithms.range_algorithm_new_algorithms.erase.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Proprotional to <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">to_erase</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/for_each.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,150 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>for_each</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="erase.html" title="erase">
+<link rel="next" href="insert.html" title="insert">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="for_each">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each"></a><a class="link" href="for_each.html" title="for_each">
+ for_each</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each.prototype"></a><h6>
+<a name="id3255474"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_new_algorithms.for_each.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">BinaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryFunction</span> <span class="identifier">fn</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">BinaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryFunction</span> <span class="identifier">fn</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">BinaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryFunction</span> <span class="identifier">fn</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">BinaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryFunction</span> <span class="identifier">fn</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each.description"></a><h6>
+<a name="id3256058"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_new_algorithms.for_each.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">for_each</span></code> traverses forward
+ through <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> simultaneously. For each iteration,
+ the element <code class="computeroutput"><span class="identifier">x</span></code> is used
+ from <code class="computeroutput"><span class="identifier">rng1</span></code> and the corresponding
+ element <code class="computeroutput"><span class="identifier">y</span></code> is used from
+ <code class="computeroutput"><span class="identifier">rng2</span></code> to invoke <code class="computeroutput"><span class="identifier">fn</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code>.
+ </p>
+<p>
+ Iteration is stopped upon reaching the end of the shorter of <code class="computeroutput"><span class="identifier">rng1</span></code>, or <code class="computeroutput"><span class="identifier">rng2</span></code>.
+ It is safe to call this function with unequal length ranges.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each.definition"></a><h6>
+<a name="id3256222"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_new_algorithms.for_each.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each.requirements"></a><h6>
+<a name="id3256297"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_new_algorithms.for_each.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryFunction</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryFunction</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglepassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryFunction</span></code>'s
+ second argument type.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.for_each.complexity"></a><h6>
+<a name="id3256453"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_new_algorithms.for_each.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ applications of <code class="computeroutput"><span class="identifier">BinaryFunction</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="erase.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="insert.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/insert.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,106 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>insert</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="for_each.html" title="for_each">
+<link rel="next" href="overwrite.html" title="overwrite">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="for_each.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="overwrite.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="insert">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert"></a><a class="link" href="insert.html" title="insert">
+ insert</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert.prototype"></a><h6>
+<a name="id3256563"></a>
+ <a class="link" href="insert.html#range.reference.algorithms.range_algorithm_new_algorithms.insert.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">insert</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">before</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert.description"></a><h6>
+<a name="id3256730"></a>
+ <a class="link" href="insert.html#range.reference.algorithms.range_algorithm_new_algorithms.insert.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">insert</span></code> all of the elements
+ in the range <code class="computeroutput"><span class="identifier">from</span></code> before
+ the <code class="computeroutput"><span class="identifier">before</span></code> iterator into
+ <code class="computeroutput"><span class="identifier">target</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert.definition"></a><h6>
+<a name="id3256802"></a>
+ <a class="link" href="insert.html#range.reference.algorithms.range_algorithm_new_algorithms.insert.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">insert</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert.requirements"></a><h6>
+<a name="id3256876"></a>
+ <a class="link" href="insert.html#range.reference.algorithms.range_algorithm_new_algorithms.insert.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ insert at a specified position.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">Container</span></code>'s
+ value type.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.insert.complexity"></a><h6>
+<a name="id3256971"></a>
+ <a class="link" href="insert.html#range.reference.algorithms.range_algorithm_new_algorithms.insert.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">from</span><span class="special">)</span></code>
+ assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="for_each.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="overwrite.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/overwrite.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,111 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>overwrite</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="insert.html" title="insert">
+<link rel="next" href="push_back.html" title="push_back">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="overwrite">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite"></a><a class="link" href="overwrite.html" title="overwrite">
+ overwrite</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite.prototype"></a><h6>
+<a name="id3257045"></a>
+ <a class="link" href="overwrite.html#range.reference.algorithms.range_algorithm_new_algorithms.overwrite.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">overwrite</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span>
+ <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite.description"></a><h6>
+<a name="id3257184"></a>
+ <a class="link" href="overwrite.html#range.reference.algorithms.range_algorithm_new_algorithms.overwrite.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">overwrite</span></code> assigns the
+ values from the range <code class="computeroutput"><span class="identifier">from</span></code>
+ into the range <code class="computeroutput"><span class="identifier">to</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite.definition"></a><h6>
+<a name="id3257245"></a>
+ <a class="link" href="overwrite.html#range.reference.algorithms.range_algorithm_new_algorithms.overwrite.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">overwrite</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite.requirements"></a><h6>
+<a name="id3257320"></a>
+ <a class="link" href="overwrite.html#range.reference.algorithms.range_algorithm_new_algorithms.overwrite.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ mutable.
+ </li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">)</span>
+ <span class="special">&lt;=</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">SinglePassRange2</span><span class="special">)</span></code></li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.overwrite.complexity"></a><h6>
+<a name="id3257490"></a>
+ <a class="link" href="overwrite.html#range.reference.algorithms.range_algorithm_new_algorithms.overwrite.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code>
+ assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="insert.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="push_back.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_back.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,104 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>push_back</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="overwrite.html" title="overwrite">
+<link rel="next" href="push_front.html" title="push_front">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overwrite.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="push_back">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back"></a><a class="link" href="push_back.html" title="push_back">
+ push_back</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back.prototype"></a><h6>
+<a name="id3257564"></a>
+ <a class="link" href="push_back.html#range.reference.algorithms.range_algorithm_new_algorithms.push_back.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_back</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back.description"></a><h6>
+<a name="id3257702"></a>
+ <a class="link" href="push_back.html#range.reference.algorithms.range_algorithm_new_algorithms.push_back.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">push_back</span></code> all of the
+ elements in the range <code class="computeroutput"><span class="identifier">from</span></code>
+ to the back of the container <code class="computeroutput"><span class="identifier">target</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back.definition"></a><h6>
+<a name="id3257764"></a>
+ <a class="link" href="push_back.html#range.reference.algorithms.range_algorithm_new_algorithms.push_back.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">push_back</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back.requirements"></a><h6>
+<a name="id3257839"></a>
+ <a class="link" href="push_back.html#range.reference.algorithms.range_algorithm_new_algorithms.push_back.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ insert at <code class="computeroutput"><span class="identifier">end</span><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">Container</span></code>'s
+ value type.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_back.complexity"></a><h6>
+<a name="id3257948"></a>
+ <a class="link" href="push_back.html#range.reference.algorithms.range_algorithm_new_algorithms.push_back.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">from</span><span class="special">)</span></code>
+ assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overwrite.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="push_front.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/push_front.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,104 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>push_front</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="push_back.html" title="push_back">
+<link rel="next" href="remove_erase.html" title="remove_erase">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_erase.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="push_front">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front"></a><a class="link" href="push_front.html" title="push_front">
+ push_front</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front.prototype"></a><h6>
+<a name="id3258022"></a>
+ <a class="link" href="push_front.html#range.reference.algorithms.range_algorithm_new_algorithms.push_front.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">push_front</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front.description"></a><h6>
+<a name="id3258160"></a>
+ <a class="link" href="push_front.html#range.reference.algorithms.range_algorithm_new_algorithms.push_front.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">push_front</span></code> all of the
+ elements in the range <code class="computeroutput"><span class="identifier">from</span></code>
+ to the front of the container <code class="computeroutput"><span class="identifier">target</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front.definition"></a><h6>
+<a name="id3258221"></a>
+ <a class="link" href="push_front.html#range.reference.algorithms.range_algorithm_new_algorithms.push_front.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">push_front</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front.requirements"></a><h6>
+<a name="id3258296"></a>
+ <a class="link" href="push_front.html#range.reference.algorithms.range_algorithm_new_algorithms.push_front.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ insert at <code class="computeroutput"><span class="identifier">begin</span><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">Container</span></code>'s
+ value type.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.push_front.complexity"></a><h6>
+<a name="id3258405"></a>
+ <a class="link" href="push_front.html#range.reference.algorithms.range_algorithm_new_algorithms.push_front.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">from</span><span class="special">)</span></code>
+ assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_back.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_erase.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,92 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>remove_erase</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="push_front.html" title="push_front">
+<link rel="next" href="remove_erase_if.html" title="remove_erase_if">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_front.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_erase_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="remove_erase">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase"></a><a class="link" href="remove_erase.html" title="remove_erase">
+ remove_erase</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.prototype"></a><h6>
+<a name="id3258479"></a>
+ <a class="link" href="remove_erase.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">T</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">remove_erase</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.description"></a><h6>
+<a name="id3258617"></a>
+ <a class="link" href="remove_erase.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">remove_erase</span></code> actually
+ eliminates the elements equal to <code class="computeroutput"><span class="identifier">val</span></code>
+ from the container. This is in contrast to the <code class="computeroutput"><span class="identifier">remove</span></code>
+ algorithm which merely rearranges elements.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.definition"></a><h6>
+<a name="id3258678"></a>
+ <a class="link" href="remove_erase.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.requirements"></a><h6>
+<a name="id3258753"></a>
+ <a class="link" href="remove_erase.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ erase of an iterator range.
+ </li></ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.complexity"></a><h6>
+<a name="id3258800"></a>
+ <a class="link" href="remove_erase.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Proportional to <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">target</span><span class="special">)</span></code>s.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="push_front.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="remove_erase_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_new_algorithms/remove_erase_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>remove_erase_if</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_new_algorithms.html" title="New algorithms">
+<link rel="prev" href="remove_erase.html" title="remove_erase">
+<link rel="next" href="../range_numeric.html" title="Numeric algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove_erase.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="remove_erase_if">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if"></a><a class="link" href="remove_erase_if.html" title="remove_erase_if">
+ remove_erase_if</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.prototype"></a><h6>
+<a name="id3258872"></a>
+ <a class="link" href="remove_erase_if.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Pred</span>
+ <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">remove_erase</span><span class="special">(</span><span class="identifier">Container</span><span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
+ <span class="identifier">Pred</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.description"></a><h6>
+<a name="id3259002"></a>
+ <a class="link" href="remove_erase_if.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">remove_erase_if</span></code> removes
+ the elements <code class="computeroutput"><span class="identifier">x</span></code> that satisfy
+ <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ from the container. This is in contrast to the <code class="computeroutput"><span class="identifier">erase</span></code>
+ algorithm which merely rearranges elements.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.definition"></a><h6>
+<a name="id3259088"></a>
+ <a class="link" href="remove_erase_if.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm_ext</span><span class="special">/</span><span class="identifier">erase</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.requirements"></a><h6>
+<a name="id3259162"></a>
+ <a class="link" href="remove_erase_if.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Container</span></code> supports
+ erase of an iterator range.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Pred</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">Predicate</span></code> Concept.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.complexity"></a><h6>
+<a name="id3259234"></a>
+ <a class="link" href="remove_erase_if.html#range.reference.algorithms.range_algorithm_new_algorithms.remove_erase_if.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Proportional to <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">target</span><span class="special">)</span></code>s.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="remove_erase.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_new_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,80 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Non-mutating algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_mutating_algorithms/unique.html" title="Range Algorithm - unique">
+<link rel="next" href="range_algorithm_non_mutating_algorithms/adjacent_find.html" title="Range Algorithm - adjacent_find">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_mutating_algorithms/unique.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_non_mutating_algorithms/adjacent_find.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Non-mutating algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms"></a><a class="link" href="range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+ Non-mutating algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/adjacent_find.html">
+ Range Algorithm - adjacent_find</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/binary_search.html">
+ binary_search</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/count.html">
+ count</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/equal.html">
+ equal</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/equal_range.html">
+ equal_range</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/for_each.html">
+ for_each</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/find.html">
+ find</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/find_end.html">
+ find_end</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/find_first_of.html">
+ find_first_of</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/find_if.html">
+ find_if</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/lexicographical_compare.html">
+ lexicographical_compare</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/lower_bound.html">
+ lower_bound</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/max_element.html">
+ max_element</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/min_element.html">
+ min_element</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/mismatch.html">
+ mismatch</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/search.html">
+ search</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_non_mutating_algorithms/upper_bound.html">
+ upper_bound</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_mutating_algorithms/unique.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_non_mutating_algorithms/adjacent_find.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/adjacent_find.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,168 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - adjacent_find</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="next" href="binary_search.html" title="binary_search">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="binary_search.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - adjacent_find">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find"></a><a class="link" href="adjacent_find.html" title="Range Algorithm - adjacent_find">
+ Range Algorithm - adjacent_find</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.prototype"></a><h6>
+<a name="id3221186"></a>
+ <a class="link" href="adjacent_find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPred</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPred</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value_re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">range_return_value_re</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">adjacent_find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.description"></a><h6>
+<a name="id3222176"></a>
+ <a class="link" href="adjacent_find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.description">Description</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">adjacent_find</span></code> finds the
+ first adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>
+ in <code class="computeroutput"><span class="identifier">rng</span></code> where <code class="computeroutput"><span class="identifier">x</span> <span class="special">==</span> <span class="identifier">y</span></code>
+ </p>
+<p>
+ <span class="bold"><strong>Predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">adjacent_find</span></code> finds the
+ first adjacent elements <code class="computeroutput"><span class="special">[</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">]</span></code>
+ in <code class="computeroutput"><span class="identifier">rng</span></code> where <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.definition"></a><h6>
+<a name="id3222390"></a>
+ <a class="link" href="adjacent_find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">adjacent_find</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.requirements"></a><h6>
+<a name="id3222465"></a>
+ <a class="link" href="adjacent_find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions of adjacent_find:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions of adjacent_find:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type and to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.complexity"></a><h6>
+<a name="id3222650"></a>
+ <a class="link" href="adjacent_find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.adjacent_find.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. If <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ then no comparisons are performed; otherwise, at most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="binary_search.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/binary_search.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,157 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>binary_search</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="adjacent_find.html" title="Range Algorithm - adjacent_find">
+<link rel="next" href="count.html" title="count">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_find.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="binary_search">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search"></a><a class="link" href="binary_search.html" title="binary_search">
+ binary_search</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.prototype"></a><h6>
+<a name="id3222758"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">binary_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">binary_search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.description"></a><h6>
+<a name="id3223041"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">binary_search</span></code> returns
+ <code class="computeroutput"><span class="keyword">true</span></code> if and only if the
+ value <code class="computeroutput"><span class="identifier">val</span></code> exists in the
+ range <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.definition"></a><h6>
+<a name="id3223114"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">binary_search</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.requirements"></a><h6>
+<a name="id3223189"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions of binary_search:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions of binary_search:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.precondition_"></a><h6>
+<a name="id3223449"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate version:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is ordered in ascending
+ order according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate version:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is ordered in ascending
+ order according to the function object <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.complexity"></a><h6>
+<a name="id3223548"></a>
+ <a class="link" href="binary_search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.binary_search.complexity">Complexity</a>
+ </h6>
+<p>
+ For non-random-access ranges, the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code> where <code class="computeroutput"><span class="identifier">N</span></code>
+ is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+<p>
+ For random-access ranges, the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">log</span> <span class="identifier">N</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_find.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="count.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/count.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,108 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>count</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="binary_search.html" title="binary_search">
+<link rel="next" href="equal.html" title="equal">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary_search.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="equal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="count">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count"></a><a class="link" href="count.html" title="count">
+ count</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.prototype"></a><h6>
+<a name="id3223724"></a>
+ <a class="link" href="count.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">count</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">count</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.description"></a><h6>
+<a name="id3224023"></a>
+ <a class="link" href="count.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">count</span></code> returns the number
+ of elements <code class="computeroutput"><span class="identifier">x</span></code> in <code class="computeroutput"><span class="identifier">rng</span></code> where <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">==</span> <span class="identifier">val</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.definition"></a><h6>
+<a name="id3224115"></a>
+ <a class="link" href="count.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.requirements"></a><h6>
+<a name="id3224190"></a>
+ <a class="link" href="count.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ An object of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s
+ value type can be compared for equality with an object of type <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.complexity"></a><h6>
+<a name="id3224319"></a>
+ <a class="link" href="count.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.count.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary_search.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="equal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,163 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>equal</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="count.html" title="count">
+<link rel="next" href="equal_range.html" title="equal_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="equal_range.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="equal">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal"></a><a class="link" href="equal.html" title="equal">
+ equal</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.prototype"></a><h6>
+<a name="id3224390"></a>
+ <a class="link" href="equal.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span>
+<span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+<span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.description"></a><h6>
+<a name="id3224679"></a>
+ <a class="link" href="equal.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">equal</span></code> returns <code class="computeroutput"><span class="keyword">true</span></code> if <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code> is equal to the <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code> and for each element <code class="computeroutput"><span class="identifier">x</span></code>
+ in <code class="computeroutput"><span class="identifier">rng1</span></code>, the corresponding
+ element <code class="computeroutput"><span class="identifier">y</span></code> in <code class="computeroutput"><span class="identifier">rng2</span></code> is equal. Otherwise <code class="computeroutput"><span class="keyword">false</span></code> is returned.
+ </p>
+<p>
+ In this range version of <code class="computeroutput"><span class="identifier">equal</span></code>
+ it is perfectly acceptable to pass in two ranges of unequal lengths.
+ </p>
+<p>
+ Elements are considered equal in the non-predicate version if <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code>
+ returns <code class="computeroutput"><span class="keyword">true</span></code>. Elements are
+ considered equal in the predicate version if <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.definition"></a><h6>
+<a name="id3224923"></a>
+ <a class="link" href="equal.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">equal</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.requirements"></a><h6>
+<a name="id3224998"></a>
+ <a class="link" href="equal.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type can be compared for equality with <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.complexity"></a><h6>
+<a name="id3225296"></a>
+ <a class="link" href="equal.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="count.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="equal_range.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/equal_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,179 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>equal_range</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="equal.html" title="equal">
+<link rel="next" href="for_each.html" title="for_each">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="equal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="equal_range">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range"></a><a class="link" href="equal_range.html" title="equal_range">
+ equal_range</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.prototype"></a><h6>
+<a name="id3225397"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="identifier">equal_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SortPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">SortPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SortPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="identifier">equal_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">SortPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ </pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.description"></a><h6>
+<a name="id3226278"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">equal_range</span></code> returns a
+ range in the form of a pair of iterators where all of the elements are
+ equal to <code class="computeroutput"><span class="identifier">val</span></code>. If no values
+ are found that are equal to <code class="computeroutput"><span class="identifier">val</span></code>,
+ then an empty range is returned, hence <code class="computeroutput"><span class="identifier">result</span><span class="special">.</span><span class="identifier">first</span> <span class="special">==</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">second</span></code>.
+ For the non-predicate versions of <code class="computeroutput"><span class="identifier">equal_range</span></code>
+ the equality of elements is determined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>. For the predicate versions of <code class="computeroutput"><span class="identifier">equal_range</span></code> the equality of elements
+ is determined by <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.definition"></a><h6>
+<a name="id3226432"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">equal_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.requirements"></a><h6>
+<a name="id3226507"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SortPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to both of <code class="computeroutput"><span class="identifier">SortPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.precondition_"></a><h6>
+<a name="id3226766"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.precondition_">Precondition:</a>
+ </h6>
+<p>
+ For the non-predicate versions: <code class="computeroutput"><span class="identifier">rng</span></code>
+ is ordered in ascending order according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ For the predicate versions: <code class="computeroutput"><span class="identifier">rng</span></code>
+ is ordered in ascending order according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.complexity"></a><h6>
+<a name="id3226848"></a>
+ <a class="link" href="equal_range.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.equal_range.complexity">Complexity</a>
+ </h6>
+<p>
+ For random-access ranges, the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">log</span> <span class="identifier">N</span><span class="special">)</span></code>,
+ otherwise the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="equal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="for_each.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,123 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>find</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="for_each.html" title="for_each">
+<link rel="next" href="find_end.html" title="find_end">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="for_each.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_end.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="find">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find"></a><a class="link" href="find.html" title="find">
+ find</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.prototype"></a><h6>
+<a name="id3227540"></a>
+ <a class="link" href="find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.description"></a><h6>
+<a name="id3228119"></a>
+ <a class="link" href="find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find</span></code>
+ that return an iterator, returns the first iterator in the range <code class="computeroutput"><span class="identifier">rng</span></code> such that <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span> <span class="special">==</span> <span class="identifier">value</span></code>. <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> is returned if no such iterator exists.
+ The versions of find that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.definition"></a><h6>
+<a name="id3228244"></a>
+ <a class="link" href="find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">find</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.requirements"></a><h6>
+<a name="id3228320"></a>
+ <a class="link" href="find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code>
+ is defined for type <code class="computeroutput"><span class="identifier">Value</span></code>
+ to be compared with the <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.complexity"></a><h6>
+<a name="id3228437"></a>
+ <a class="link" href="find.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> comparisons for equality.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="for_each.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_end.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_end.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,204 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>find_end</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="find.html" title="find">
+<link rel="next" href="find_first_of.html" title="find_first_of">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_first_of.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="find_end">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end"></a><a class="link" href="find_end.html" title="find_end">
+ find_end</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.prototype"></a><h6>
+<a name="id3228510"></a>
+ <a class="link" href="find_end.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_end</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.description"></a><h6>
+<a name="id3229857"></a>
+ <a class="link" href="find_end.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find_end</span></code>
+ that return an iterator, return an iterator to the beginning of the last
+ sub-sequence equal to <code class="computeroutput"><span class="identifier">rng2</span></code>
+ within <code class="computeroutput"><span class="identifier">rng1</span></code>. Equality
+ is determined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code> for non-predicate versions of <code class="computeroutput"><span class="identifier">find_end</span></code>, and by satisfying <code class="computeroutput"><span class="identifier">pred</span></code> in the predicate versions. The
+ versions of <code class="computeroutput"><span class="identifier">find_end</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.definition"></a><h6>
+<a name="id3229993"></a>
+ <a class="link" href="find_end.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">find_end</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.requirements"></a><h6>
+<a name="id3230068"></a>
+ <a class="link" href="find_end.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ Objects of <code class="computeroutput"><span class="identifier">ForwardRange1</span></code>'s
+ value type can be compared for equality with objects of <code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value type.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.complexity"></a><h6>
+<a name="id3230367"></a>
+ <a class="link" href="find_end.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_end.complexity">Complexity</a>
+ </h6>
+<p>
+ The number of comparisons is proportional to <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>. If both <code class="computeroutput"><span class="identifier">ForwardRange1</span></code>
+ and <code class="computeroutput"><span class="identifier">ForwardRange2</span></code> are
+ models of <code class="computeroutput"><span class="identifier">BidirectionalRangeConcept</span></code>
+ then the average complexity is linear and the worst case is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_first_of.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_first_of.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,200 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>find_first_of</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="find_end.html" title="find_end">
+<link rel="next" href="find_if.html" title="find_if">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_end.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="find_first_of">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of"></a><a class="link" href="find_first_of.html" title="find_first_of">
+ find_first_of</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.prototype"></a><h6>
+<a name="id3230549"></a>
+ <a class="link" href="find_first_of.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_first_of</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.description"></a><h6>
+<a name="id3231897"></a>
+ <a class="link" href="find_first_of.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find_first_of</span></code>
+ that return an iterator, return an iterator to the first occurrence in
+ <code class="computeroutput"><span class="identifier">rng1</span></code> of any of the elements
+ in <code class="computeroutput"><span class="identifier">rng2</span></code>. Equality is
+ determined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code>
+ for non-predicate versions of <code class="computeroutput"><span class="identifier">find_first_of</span></code>,
+ and by satisfying <code class="computeroutput"><span class="identifier">pred</span></code>
+ in the predicate versions.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find_first_of</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.definition"></a><h6>
+<a name="id3232039"></a>
+ <a class="link" href="find_first_of.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">find_first_of</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.requirements"></a><h6>
+<a name="id3232114"></a>
+ <a class="link" href="find_first_of.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>,
+ and can be compared for equality with <code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.complexity"></a><h6>
+<a name="id3232371"></a>
+ <a class="link" href="find_first_of.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_first_of.complexity">Complexity</a>
+ </h6>
+<p>
+ At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code> comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_end.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find_if.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/find_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,133 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>find_if</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="find_first_of.html" title="find_first_of">
+<link rel="next" href="lexicographical_compare.html" title="lexicographical_compare">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_first_of.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lexicographical_compare.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="find_if">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if"></a><a class="link" href="find_if.html" title="find_if">
+ find_if</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.prototype"></a><h6>
+<a name="id3232469"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_if</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_if</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_if</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">find_if</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.description"></a><h6>
+<a name="id3233050"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find_if</span></code>
+ that return an iterator, returns the first iterator in the range <code class="computeroutput"><span class="identifier">rng</span></code> such that <code class="computeroutput"><span class="identifier">pred</span><span class="special">(*</span><span class="identifier">i</span><span class="special">)</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>.
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ is returned if no such iterator exists.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">find_if</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines found in the same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.definition"></a><h6>
+<a name="id3233187"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">find_if</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.requirements"></a><h6>
+<a name="id3233262"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryPredicate</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">PredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to the argument type of <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.precondition_"></a><h6>
+<a name="id3233364"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.precondition_">Precondition:</a>
+ </h6>
+<p>
+ For each iterator <code class="computeroutput"><span class="identifier">i</span></code> in
+ <code class="computeroutput"><span class="identifier">rng</span></code>, <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code> is in the domain of <code class="computeroutput"><span class="identifier">UnaryPredicate</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.complexity"></a><h6>
+<a name="id3233440"></a>
+ <a class="link" href="find_if.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.find_if.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> invocations of <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_first_of.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lexicographical_compare.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/for_each.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,113 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>for_each</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="equal_range.html" title="equal_range">
+<link rel="next" href="find.html" title="find">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="equal_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="for_each">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each"></a><a class="link" href="for_each.html" title="for_each">
+ for_each</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.prototype"></a><h6>
+<a name="id3226951"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">UnaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">fun</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">UnaryFunction</span>
+ <span class="special">&gt;</span>
+<span class="identifier">UnaryFunction</span> <span class="identifier">for_each</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">UnaryFunction</span> <span class="identifier">fun</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.description"></a><h6>
+<a name="id3227179"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">for_each</span></code> traverses forward
+ through <code class="computeroutput"><span class="identifier">rng</span></code> and for each
+ element <code class="computeroutput"><span class="identifier">x</span></code> it invokes
+ <code class="computeroutput"><span class="identifier">fun</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.definition"></a><h6>
+<a name="id3227264"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">for_each</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.requirements"></a><h6>
+<a name="id3227338"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryFunction</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">UnaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">UnaryFunction</span></code> does
+ not apply any non-constant operation through its argument.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">UnaryFunction</span></code>'s
+ argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.complexity"></a><h6>
+<a name="id3227457"></a>
+ <a class="link" href="for_each.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.for_each.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> applications of <code class="computeroutput"><span class="identifier">UnaryFunction</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="equal_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="find.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lexicographical_compare.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,170 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>lexicographical_compare</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="find_if.html" title="find_if">
+<link rel="next" href="lower_bound.html" title="lower_bound">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lower_bound.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="lexicographical_compare">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare"></a><a class="link" href="lexicographical_compare.html" title="lexicographical_compare">
+ lexicographical_compare</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.prototype"></a><h6>
+<a name="id3233525"></a>
+ <a class="link" href="lexicographical_compare.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.description"></a><h6>
+<a name="id3233815"></a>
+ <a class="link" href="lexicographical_compare.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">lexicographical_compare</span></code>
+ compares element by element <code class="computeroutput"><span class="identifier">rng1</span></code>
+ against <code class="computeroutput"><span class="identifier">rng2</span></code>. If the
+ element from <code class="computeroutput"><span class="identifier">rng1</span></code> is
+ less than the element from <code class="computeroutput"><span class="identifier">rng2</span></code>
+ then <code class="computeroutput"><span class="keyword">true</span></code> is returned. If
+ the end of <code class="computeroutput"><span class="identifier">rng1</span></code> without
+ reaching the end of <code class="computeroutput"><span class="identifier">rng2</span></code>
+ this also causes the return value to be <code class="computeroutput"><span class="keyword">true</span></code>.
+ The return value is <code class="computeroutput"><span class="keyword">false</span></code>
+ in all other circumstances. The elements are compared using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>
+ in the non-predicate versions of <code class="computeroutput"><span class="identifier">lexicographical_compare</span></code>
+ and using <code class="computeroutput"><span class="identifier">pred</span></code> in the
+ predicate versions.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.definition"></a><h6>
+<a name="id3233997"></a>
+ <a class="link" href="lexicographical_compare.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">lexicographical_compare</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.requirements"></a><h6>
+<a name="id3234072"></a>
+ <a class="link" href="lexicographical_compare.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions of lexicographical_compare:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ Let <code class="computeroutput"><span class="identifier">x</span></code> be an object
+ of <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type. Let <code class="computeroutput"><span class="identifier">y</span></code> be
+ an obect of <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type. <code class="computeroutput"><span class="identifier">x</span> <span class="special">&lt;</span>
+ <span class="identifier">y</span></code> must be valid. <code class="computeroutput"><span class="identifier">y</span> <span class="special">&lt;</span>
+ <span class="identifier">x</span></code> must be valid.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions of lexicographical_compare:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.complexity"></a><h6>
+<a name="id3234440"></a>
+ <a class="link" href="lexicographical_compare.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lexicographical_compare.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="number">2</span> <span class="special">*</span>
+ <span class="identifier">min</span><span class="special">(</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">),</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">))</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="find_if.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lower_bound.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/lower_bound.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,188 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>lower_bound</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="lexicographical_compare.html" title="lexicographical_compare">
+<link rel="next" href="max_element.html" title="max_element">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexicographical_compare.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="max_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="lower_bound">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound"></a><a class="link" href="lower_bound.html" title="lower_bound">
+ lower_bound</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.prototype"></a><h6>
+<a name="id3234552"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">lower_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">lower_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.description"></a><h6>
+<a name="id3235132"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">lower_bound</span></code>
+ that return an iterator, returns the first iterator in the range <code class="computeroutput"><span class="identifier">rng</span></code> such that: without predicate -
+ <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span>
+ <span class="special">&lt;</span> <span class="identifier">value</span></code>
+ is <code class="computeroutput"><span class="keyword">false</span></code>, with predicate
+ - <code class="computeroutput"><span class="identifier">pred</span><span class="special">(*</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">value</span><span class="special">)</span></code>
+ is <code class="computeroutput"><span class="keyword">false</span></code>.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ is returned if no such iterator exists.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">lower_bound</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.definition"></a><h6>
+<a name="id3235333"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">lower_bound</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.requirements"></a><h6>
+<a name="id3235407"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.precondition_"></a><h6>
+<a name="id3235667"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is sorted in ascending
+ order according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is sorted in ascending
+ order according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.complexity"></a><h6>
+<a name="id3235766"></a>
+ <a class="link" href="lower_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.lower_bound.complexity">Complexity</a>
+ </h6>
+<p>
+ For ranges that model the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> concept the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">log</span> <span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+<p>
+ For all other range types the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexicographical_compare.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="max_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/max_element.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,166 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>max_element</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="lower_bound.html" title="lower_bound">
+<link rel="next" href="min_element.html" title="min_element">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lower_bound.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="min_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="max_element">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element"></a><a class="link" href="max_element.html" title="max_element">
+ max_element</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.prototype"></a><h6>
+<a name="id3235916"></a>
+ <a class="link" href="max_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value_re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">max_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.description"></a><h6>
+<a name="id3236912"></a>
+ <a class="link" href="max_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">max_element</span></code>
+ that return an iterator, return the iterator to the maximum value as
+ determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> if a predicate is not supplied. Otherwise
+ the predicate <code class="computeroutput"><span class="identifier">pred</span></code> is
+ used to determine the maximum value. The versions of <code class="computeroutput"><span class="identifier">max_element</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.definition"></a><h6>
+<a name="id3237016"></a>
+ <a class="link" href="max_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">max_element</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.requirements"></a><h6>
+<a name="id3237090"></a>
+ <a class="link" href="max_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.complexity"></a><h6>
+<a name="id3237264"></a>
+ <a class="link" href="max_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.max_element.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Zero comparisons if <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>, otherwise <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lower_bound.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="min_element.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/min_element.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,166 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>min_element</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="max_element.html" title="max_element">
+<link rel="next" href="mismatch.html" title="mismatch">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="max_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mismatch.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="min_element">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element"></a><a class="link" href="min_element.html" title="min_element">
+ min_element</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.prototype"></a><h6>
+<a name="id3237372"></a>
+ <a class="link" href="min_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value_re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">min_element</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.description"></a><h6>
+<a name="id3238369"></a>
+ <a class="link" href="min_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">min_element</span></code>
+ that return an iterator, return the iterator to the minimum value as
+ determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> if a predicate is not supplied. Otherwise
+ the predicate <code class="computeroutput"><span class="identifier">pred</span></code> is
+ used to determine the minimum value. The versions of <code class="computeroutput"><span class="identifier">min_element</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.definition"></a><h6>
+<a name="id3238472"></a>
+ <a class="link" href="min_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">min_element</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.requirements"></a><h6>
+<a name="id3238547"></a>
+ <a class="link" href="min_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.complexity"></a><h6>
+<a name="id3238721"></a>
+ <a class="link" href="min_element.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.min_element.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Zero comparisons if <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>, otherwise <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="max_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="mismatch.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/mismatch.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,222 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>mismatch</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="min_element.html" title="min_element">
+<link rel="next" href="search.html" title="search">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="min_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="search.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="mismatch">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch"></a><a class="link" href="mismatch.html" title="mismatch">
+ mismatch</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.prototype"></a><h6>
+<a name="id3238829"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">mismatch</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.description"></a><h6>
+<a name="id3240549"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">mismatch</span></code>
+ that return an iterator, return an iterator to the first position where
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> differ.
+ </p>
+<p>
+ Equality is determined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code> for non-predicate versions of <code class="computeroutput"><span class="identifier">mismatch</span></code>, and by satisfying <code class="computeroutput"><span class="identifier">pred</span></code> in the predicate versions.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">mismatch</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.definition"></a><h6>
+<a name="id3240690"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">mismatch</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.requirements"></a><h6>
+<a name="id3240764"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>s value
+ type can be compared for equality with <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.precondition_"></a><h6>
+<a name="id3241062"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span> <span class="special">&gt;=</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.complexity"></a><h6>
+<a name="id3241138"></a>
+ <a class="link" href="mismatch.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.mismatch.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. At most <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code> comparisons.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="min_element.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="search.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/search.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,206 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>search</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="mismatch.html" title="mismatch">
+<link rel="next" href="upper_bound.html" title="upper_bound">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mismatch.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upper_bound.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="search">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search"></a><a class="link" href="search.html" title="search">
+ search</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.prototype"></a><h6>
+<a name="id3241211"></a>
+ <a class="link" href="search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+<span class="identifier">search</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+<span class="identifier">search</span><span class="special">(</span><span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">search</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span> <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.description"></a><h6>
+<a name="id3242562"></a>
+ <a class="link" href="search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">search</span></code>
+ that return an iterator, return an iterator to the start of the first
+ subsequence in <code class="computeroutput"><span class="identifier">rng1</span></code> that
+ is equal to the subsequence <code class="computeroutput"><span class="identifier">rng2</span></code>.
+ The <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code>
+ is returned if no such subsequence exists in <code class="computeroutput"><span class="identifier">rng1</span></code>.
+ Equality is determined by <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code> for non-predicate versions of <code class="computeroutput"><span class="identifier">search</span></code>, and by satisfying <code class="computeroutput"><span class="identifier">pred</span></code> in the predicate versions.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">search</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.definition"></a><h6>
+<a name="id3242738"></a>
+ <a class="link" href="search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">search</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.requirements"></a><h6>
+<a name="id3242812"></a>
+ <a class="link" href="search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value
+ type is a model of the <code class="computeroutput"><span class="identifier">EqualityComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code>s value
+ type can be compared for equality with <code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s
+ value type.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code> is a
+ model of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryPredicateConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange1</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange2</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument type.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.complexity"></a><h6>
+<a name="id3243111"></a>
+ <a class="link" href="search.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.search.complexity">Complexity</a>
+ </h6>
+<p>
+ Average complexity is Linear. Worst-case complexity is quadratic.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mismatch.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upper_bound.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_algorithm_non_mutating_algorithms/upper_bound.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,185 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>upper_bound</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="prev" href="search.html" title="search">
+<link rel="next" href="../set_algorithms.html" title="Set algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="search.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="upper_bound">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound"></a><a class="link" href="upper_bound.html" title="upper_bound">
+ upper_bound</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.prototype"></a><h6>
+<a name="id3243161"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">upper_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="identifier">range_return_value</span> <span class="identifier">re</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">ForwardRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="keyword">typename</span> <span class="identifier">range_return</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">,</span> <span class="identifier">re</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="identifier">upper_bound</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">Value</span> <span class="identifier">val</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.description"></a><h6>
+<a name="id3243740"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.description">Description</a>
+ </h6>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">upper_bound</span></code>
+ that return an iterator, returns the first iterator in the range <code class="computeroutput"><span class="identifier">rng</span></code> such that: without predicate -
+ <code class="computeroutput"><span class="identifier">val</span> <span class="special">&lt;</span>
+ <span class="special">*</span><span class="identifier">i</span></code>
+ is <code class="computeroutput"><span class="keyword">true</span></code>, with predicate
+ - <code class="computeroutput"><span class="identifier">pred</span><span class="special">(</span><span class="identifier">val</span><span class="special">,</span> <span class="special">*</span><span class="identifier">i</span><span class="special">)</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ is returned if no such iterator exists.
+ </p>
+<p>
+ The versions of <code class="computeroutput"><span class="identifier">upper_bound</span></code>
+ that return a <code class="computeroutput"><span class="identifier">range_return</span></code>,
+ defines <code class="computeroutput"><span class="identifier">found</span></code> in the
+ same manner as the returned iterator described above.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.definition"></a><h6>
+<a name="id3243945"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">upper_bound</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.requirements"></a><h6>
+<a name="id3244020"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code> is a model
+ of the <a class="link" href="../../../concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is the same type as <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">ForwardRange</span></code>'s value
+ type is convertible to both of <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.precondition_"></a><h6>
+<a name="id3244279"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is sorted in ascending
+ order according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng</span></code> is sorted in ascending
+ order according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.complexity"></a><h6>
+<a name="id3244377"></a>
+ <a class="link" href="upper_bound.html#range.reference.algorithms.range_algorithm_non_mutating_algorithms.upper_bound.complexity">Complexity</a>
+ </h6>
+<p>
+ For ranges that model the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">log</span> <span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ For all other range types the complexity is <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="search.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Numeric algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_new_algorithms/remove_erase_if.html" title="remove_erase_if">
+<link rel="next" href="range_numeric/accumulate.html" title="accumulate">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_new_algorithms/remove_erase_if.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_numeric/accumulate.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Numeric algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.range_numeric"></a><a class="link" href="range_numeric.html" title="Numeric algorithms"> Numeric
+ algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_numeric/accumulate.html">
+ accumulate</a></span></dt>
+<dt><span class="section"><a href="range_numeric/adjacent_difference.html">
+ adjacent_difference</a></span></dt>
+<dt><span class="section"><a href="range_numeric/inner_product.html">
+ inner_product</a></span></dt>
+<dt><span class="section"><a href="range_numeric/partial_sum.html">
+ partial_sum</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_new_algorithms/remove_erase_if.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_numeric/accumulate.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/accumulate.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/accumulate.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,157 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>accumulate</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="prev" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="next" href="adjacent_difference.html" title="adjacent_difference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adjacent_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="accumulate">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_numeric.accumulate"></a><a class="link" href="accumulate.html" title="accumulate">
+ accumulate</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_numeric.accumulate.prototype"></a><h6>
+<a name="id3259323"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span>
+ <span class="special">&gt;</span>
+<span class="identifier">Value</span> <span class="identifier">accumulate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">Value</span> <span class="identifier">init</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation</span>
+ <span class="special">&gt;</span>
+<span class="identifier">Value</span> <span class="identifier">accumulate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">Value</span> <span class="identifier">init</span><span class="special">,</span>
+ <span class="identifier">BinaryOperation</span> <span class="identifier">op</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_numeric.accumulate.description"></a><h6>
+<a name="id3259589"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">accumulate</span></code> is a generalisation
+ of summation. It computes a binary operation (<code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code> in the non-predicate version) of <code class="computeroutput"><span class="identifier">init</span></code> and all of the elements in <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<p>
+ The return value is the resultant value of the above algorithm.
+ </p>
+<a name="range.reference.algorithms.range_numeric.accumulate.definition"></a><h6>
+<a name="id3259669"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_numeric.accumulate.requirements"></a><h6>
+<a name="id3259733"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.requirements">Requirements</a>
+ </h6>
+<a name="range.reference.algorithms.range_numeric.accumulate.for_the_first_version"></a><h6>
+<a name="id3259756"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.for_the_first_version">For
+ the first version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+ An <code class="computeroutput"><span class="keyword">operator</span><span class="special">+</span></code>
+ is defined for a left-hand operand of type <code class="computeroutput"><span class="identifier">Value</span></code>
+ and a right-hand operance of the <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ value type.
+ </li>
+<li class="listitem">
+ The return type of the above operator is convertible to <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.accumulate.for_the_second_version"></a><h6>
+<a name="id3259894"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.for_the_second_version">For
+ the second version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is convertible
+ to <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s value
+ type is convertible to <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>'s
+ second argument type.
+ </li>
+<li class="listitem">
+ The return type of <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>
+ is convertible to <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.accumulate.complexity"></a><h6>
+<a name="id3260078"></a>
+ <a class="link" href="accumulate.html#range.reference.algorithms.range_numeric.accumulate.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="adjacent_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/adjacent_difference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,179 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>adjacent_difference</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="prev" href="accumulate.html" title="accumulate">
+<link rel="next" href="inner_product.html" title="inner_product">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inner_product.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="adjacent_difference">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_numeric.adjacent_difference"></a><a class="link" href="adjacent_difference.html" title="adjacent_difference">
+ adjacent_difference</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.prototype"></a><h6>
+<a name="id3260149"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">adjacent_difference</span><span class="special">(</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">adjacent_difference</span><span class="special">(</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">,</span>
+ <span class="identifier">BinaryOperation</span> <span class="identifier">op</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.description"></a><h6>
+<a name="id3260417"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">adjacent_difference</span></code> calculates
+ the differences of adjacent_elements in <code class="computeroutput"><span class="identifier">rng</span></code>.
+ </p>
+<p>
+ The first version of <code class="computeroutput"><span class="identifier">adjacent_difference</span></code>
+ uses <code class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></code>
+ to calculate the differences. The second version uses <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>
+ instead of <code class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></code>.
+ </p>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.definition"></a><h6>
+<a name="id3260522"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.requirements"></a><h6>
+<a name="id3260587"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.requirements">Requirements</a>
+ </h6>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.for_the_first_version"></a><h6>
+<a name="id3260611"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.for_the_first_version">For
+ the first version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ If <code class="computeroutput"><span class="identifier">x</span></code> and <code class="computeroutput"><span class="identifier">y</span></code> are objects of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s
+ value type, then <code class="computeroutput"><span class="identifier">x</span> <span class="special">-</span> <span class="identifier">y</span></code>
+ is defined.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+<li class="listitem">
+ The return type of <code class="computeroutput"><span class="identifier">x</span> <span class="special">-</span> <span class="identifier">y</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.for_the_second_version"></a><h6>
+<a name="id3260814"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.for_the_second_version">For
+ the second version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>'s
+ first and second argument types.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+<li class="listitem">
+ The result type of <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.precondition_"></a><h6>
+<a name="id3261002"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">result</span><span class="special">,</span> <span class="identifier">result</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is a valid range.
+ </p>
+<a name="range.reference.algorithms.range_numeric.adjacent_difference.complexity"></a><h6>
+<a name="id3261079"></a>
+ <a class="link" href="adjacent_difference.html#range.reference.algorithms.range_numeric.adjacent_difference.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. If <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ then zero applications, otherwise <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ applications are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="accumulate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inner_product.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/inner_product.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/inner_product.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,192 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>inner_product</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="prev" href="adjacent_difference.html" title="adjacent_difference">
+<link rel="next" href="partial_sum.html" title="partial_sum">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_difference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sum.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="inner_product">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_numeric.inner_product"></a><a class="link" href="inner_product.html" title="inner_product">
+ inner_product</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_numeric.inner_product.prototype"></a><h6>
+<a name="id3261186"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+ <span class="identifier">Value</span> <span class="identifier">inner_product</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">Value</span> <span class="identifier">init</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Value</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation2</span><span class="special">&gt;</span>
+ <span class="identifier">Value</span> <span class="identifier">inner_product</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">Value</span> <span class="identifier">init</span><span class="special">,</span>
+ <span class="identifier">BinaryOperation1</span> <span class="identifier">op1</span><span class="special">,</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_numeric.inner_product.description"></a><h6>
+<a name="id3261550"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">inner_product</span></code> calculates
+ a generalised inner product of the range <code class="computeroutput"><span class="identifier">rng1</span></code>
+ and <code class="computeroutput"><span class="identifier">rng2</span></code>.
+ </p>
+<p>
+ For further information on the <code class="computeroutput"><span class="identifier">inner_product</span></code>
+ algorithm please see inner_product.
+ </p>
+<a name="range.reference.algorithms.range_numeric.inner_product.definition"></a><h6>
+<a name="id3261632"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_numeric.inner_product.requirements"></a><h6>
+<a name="id3261697"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.requirements">Requirements</a>
+ </h6>
+<a name="range.reference.algorithms.range_numeric.inner_product.for_the_first_version"></a><h6>
+<a name="id3261721"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.for_the_first_version">For
+ the first version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+ If <code class="computeroutput"><span class="identifier">x</span></code> is an object of
+ type <code class="computeroutput"><span class="identifier">Value</span></code>, <code class="computeroutput"><span class="identifier">y</span></code> is an object of <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type, and <code class="computeroutput"><span class="identifier">z</span></code> is
+ an object of <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type, then <code class="computeroutput"><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span> <span class="special">*</span> <span class="identifier">z</span></code>
+ is defined.
+ </li>
+<li class="listitem">
+ The result type of the expression <code class="computeroutput"><span class="identifier">x</span>
+ <span class="special">+</span> <span class="identifier">y</span>
+ <span class="special">*</span> <span class="identifier">z</span></code>
+ is convertible to <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.inner_product.for_the_second_version"></a><h6>
+<a name="id3261975"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.for_the_second_version">For
+ the second version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">AssignableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation1</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation2</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>
+ is convertible to the first argument type of <code class="computeroutput"><span class="identifier">BinaryOperation2</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>
+ is convertible to the second argument type of <code class="computeroutput"><span class="identifier">BinaryOperation2</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Value</span></code> is convertible
+ to the value type of <code class="computeroutput"><span class="identifier">BinaryOperation1</span></code>.
+ </li>
+<li class="listitem">
+ The return type of <code class="computeroutput"><span class="identifier">BinaryOperation2</span></code>
+ is convertible to the second argument type of <code class="computeroutput"><span class="identifier">BinaryOperation1</span></code>.
+ </li>
+<li class="listitem">
+ The return type of <code class="computeroutput"><span class="identifier">BinaryOperation1</span></code>
+ is convertible to <code class="computeroutput"><span class="identifier">Value</span></code>.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.inner_product.precondition_"></a><h6>
+<a name="id3262261"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span> <span class="special">&gt;=</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span></code> is a valid range.
+ </p>
+<a name="range.reference.algorithms.range_numeric.inner_product.complexity"></a><h6>
+<a name="id3262338"></a>
+ <a class="link" href="inner_product.html#range.reference.algorithms.range_numeric.inner_product.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adjacent_difference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sum.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/irange.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/irange.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,105 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>irange</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="prev" href="inner_product.html" title="inner_product">
+<link rel="next" href="partial_sum.html" title="partial_sum">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inner_product.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sum.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="irange">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_numeric.irange"></a><a class="link" href="irange.html" title="irange">
+ irange</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_numeric.irange.prototype"></a><h6>
+<a name="id2948790"></a>
+ <a class="link" href="irange.html#range.reference.algorithms.range_numeric.irange.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">StepSize</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator_with_step</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">,</span> <span class="identifier">StepSize</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">StepSize</span> <span class="identifier">step_size</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_numeric.irange.description"></a><h6>
+<a name="id2949086"></a>
+ <a class="link" href="irange.html#range.reference.algorithms.range_numeric.irange.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> is a function
+ to generate an Integer Range.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> allows treating
+ integers as a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept. It should be noted that the <code class="computeroutput"><span class="identifier">first</span></code> and <code class="computeroutput"><span class="identifier">last</span></code>
+ parameters denoted a half-open range.
+ </p>
+<a name="range.reference.algorithms.range_numeric.irange.definition"></a><h6>
+<a name="id2949168"></a>
+ <a class="link" href="irange.html#range.reference.algorithms.range_numeric.irange.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">irange</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_numeric.irange.requirements"></a><h6>
+<a name="id2949232"></a>
+ <a class="link" href="irange.html#range.reference.algorithms.range_numeric.irange.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Integer</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">Integer</span></code> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">StepSize</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">SignedInteger</span></code>
+ Concept.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.irange.complexity"></a><h6>
+<a name="id2949314"></a>
+ <a class="link" href="irange.html#range.reference.algorithms.range_numeric.irange.complexity">Complexity</a>
+ </h6>
+<p>
+ Constant. Since this function generates a new range the most significant
+ performance cost is incurred through the iteration of the generated range.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inner_product.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="partial_sum.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/partial_sum.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/range_numeric/partial_sum.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,161 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>partial_sum</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_numeric.html" title="Numeric algorithms">
+<link rel="prev" href="inner_product.html" title="inner_product">
+<link rel="next" href="../../ranges.html" title="Provided Ranges">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inner_product.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../ranges.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="partial_sum">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.range_numeric.partial_sum"></a><a class="link" href="partial_sum.html" title="partial_sum">
+ partial_sum</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.range_numeric.partial_sum.prototype"></a><h6>
+<a name="id3262409"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">partial_sum</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryOperation</span><span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">partial_sum</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">,</span>
+ <span class="identifier">BinaryOperation</span> <span class="identifier">op</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.range_numeric.partial_sum.description"></a><h6>
+<a name="id3262670"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">partial_sum</span></code> calculates
+ a generalised partial sum of <code class="computeroutput"><span class="identifier">rng</span></code>
+ in the same manner as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">partial_sum</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">out_it</span><span class="special">)</span></code>. See partial_sum.
+ </p>
+<a name="range.reference.algorithms.range_numeric.partial_sum.definition"></a><h6>
+<a name="id3262813"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.range_numeric.partial_sum.requirements"></a><h6>
+<a name="id3262877"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.requirements">Requirements</a>
+ </h6>
+<a name="range.reference.algorithms.range_numeric.partial_sum.for_the_first_version"></a><h6>
+<a name="id3262900"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.for_the_first_version">For
+ the first version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ If <code class="computeroutput"><span class="identifier">x</span></code> and <code class="computeroutput"><span class="identifier">y</span></code> are objects of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>'s
+ value type, then <code class="computeroutput"><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span></code>
+ is defined.
+ </li>
+<li class="listitem">
+ The return type of <code class="computeroutput"><span class="identifier">x</span> <span class="special">+</span> <span class="identifier">y</span></code>
+ is convertible to the value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.partial_sum.for_the_second_version"></a><h6>
+<a name="id3263103"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.for_the_second_version">For
+ the second version</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryOperation</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">BinaryFunctionConcept</span></code>.
+ </li>
+<li class="listitem">
+ The result type of <code class="computeroutput"><span class="identifier">BinaryOperation</span></code>
+ is convertible to the value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>.
+ </li>
+<li class="listitem">
+ The value type of <code class="computeroutput"><span class="identifier">SinglePassRange</span></code>
+ is convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ol></div>
+<a name="range.reference.algorithms.range_numeric.partial_sum.precondition_"></a><h6>
+<a name="id3263262"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">result</span><span class="special">,</span> <span class="identifier">result</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code> is a valid range.
+ </p>
+<a name="range.reference.algorithms.range_numeric.partial_sum.complexity"></a><h6>
+<a name="id3263338"></a>
+ <a class="link" href="partial_sum.html#range.reference.algorithms.range_numeric.partial_sum.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. If <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ then zero applications, otherwise <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span> <span class="special">-</span> <span class="number">1</span></code>
+ applications are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="inner_product.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_numeric.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../ranges.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Set algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../algorithms.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_non_mutating_algorithms/upper_bound.html" title="upper_bound">
+<link rel="next" href="set_algorithms/includes.html" title="includes">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_non_mutating_algorithms/upper_bound.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_algorithms/includes.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Set algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.algorithms.set_algorithms"></a><a class="link" href="set_algorithms.html" title="Set algorithms"> Set algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="set_algorithms/includes.html">
+ includes</a></span></dt>
+<dt><span class="section"><a href="set_algorithms/set_union.html">
+ set_union</a></span></dt>
+<dt><span class="section"><a href="set_algorithms/set_intersection.html">
+ set_intersection</a></span></dt>
+<dt><span class="section"><a href="set_algorithms/set_difference.html">
+ set_difference</a></span></dt>
+<dt><span class="section"><a href="set_algorithms/set_symmetric_difference.html">
+ set_symmetric_difference</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_non_mutating_algorithms/upper_bound.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../algorithms.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_algorithms/includes.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/includes.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/includes.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,187 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>includes</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../set_algorithms.html" title="Set algorithms">
+<link rel="prev" href="../set_algorithms.html" title="Set algorithms">
+<link rel="next" href="set_union.html" title="set_union">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_union.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="includes">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.set_algorithms.includes"></a><a class="link" href="includes.html" title="includes">
+ includes</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.set_algorithms.includes.prototype"></a><h6>
+<a name="id3244539"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">includes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">includes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.includes.description"></a><h6>
+<a name="id3244823"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">includes</span></code> returns <code class="computeroutput"><span class="keyword">true</span></code> if and only if, for every element
+ in <code class="computeroutput"><span class="identifier">rng2</span></code>, an equivalent
+ element is also present in <code class="computeroutput"><span class="identifier">rng1</span></code>.
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.includes.definition"></a><h6>
+<a name="id3244922"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">set_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.includes.requirements"></a><h6>
+<a name="id3244995"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.set_algorithms.includes.precondition_"></a><h6>
+<a name="id3245387"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.includes.complexity"></a><h6>
+<a name="id3245507"></a>
+ <a class="link" href="includes.html#range.reference.algorithms.set_algorithms.includes.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_union.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_difference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_difference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,206 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>set_difference</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../set_algorithms.html" title="Set algorithms">
+<link rel="prev" href="set_intersection.html" title="set_intersection">
+<link rel="next" href="set_symmetric_difference.html" title="set_symmetric_difference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_intersection.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_symmetric_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="set_difference">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.set_algorithms.set_difference"></a><a class="link" href="set_difference.html" title="set_difference">
+ set_difference</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.set_algorithms.set_difference.prototype"></a><h6>
+<a name="id3248053"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_difference</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_difference</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_difference.description"></a><h6>
+<a name="id3248401"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">set_difference</span></code> constructs
+ a sorted range that is the set difference of the sorted ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code>.
+ The return value is the end of the output range.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_difference.definition"></a><h6>
+<a name="id3248497"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">set_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_difference.requirements"></a><h6>
+<a name="id3248572"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.set_algorithms.set_difference.precondition_"></a><h6>
+<a name="id3249016"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_difference.complexity"></a><h6>
+<a name="id3249135"></a>
+ <a class="link" href="set_difference.html#range.reference.algorithms.set_algorithms.set_difference.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_intersection.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_symmetric_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_intersection.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_intersection.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,206 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>set_intersection</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../set_algorithms.html" title="Set algorithms">
+<link rel="prev" href="set_union.html" title="set_union">
+<link rel="next" href="set_difference.html" title="set_difference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_union.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="set_intersection">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.set_algorithms.set_intersection"></a><a class="link" href="set_intersection.html" title="set_intersection">
+ set_intersection</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.prototype"></a><h6>
+<a name="id3246842"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_intersection</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_intersection</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.description"></a><h6>
+<a name="id3247194"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">set_intersection</span></code> constructs
+ a sorted range that is the intersection of the sorted ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code>.
+ The return value is the end of the output range.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.definition"></a><h6>
+<a name="id3247286"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">set_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.requirements"></a><h6>
+<a name="id3247359"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.precondition_"></a><h6>
+<a name="id3247803"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_intersection.complexity"></a><h6>
+<a name="id3247923"></a>
+ <a class="link" href="set_intersection.html#range.reference.algorithms.set_algorithms.set_intersection.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_union.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_difference.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_symmetric_difference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,210 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>set_symmetric_difference</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../set_algorithms.html" title="Set algorithms">
+<link rel="prev" href="set_difference.html" title="set_difference">
+<link rel="next" href="../heap_algorithms.html" title="Heap algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_difference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="set_symmetric_difference">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference"></a><a class="link" href="set_symmetric_difference.html" title="set_symmetric_difference">
+ set_symmetric_difference</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.prototype"></a><h6>
+<a name="id3249265"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span>
+<span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span>
+<span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.description"></a><h6>
+<a name="id3249617"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">set_symmetric_difference</span></code>
+ constructs a sorted range that is the set symmetric difference of the
+ sorted ranges <code class="computeroutput"><span class="identifier">rng1</span></code> and
+ <code class="computeroutput"><span class="identifier">rng2</span></code>. The return value
+ is the end of the output range.
+ </p>
+<p>
+ The ordering relationship is determined by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in the non-predicate versions, and
+ by evaluating <code class="computeroutput"><span class="identifier">pred</span></code> in
+ the predicate versions.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.definition"></a><h6>
+<a name="id3249710"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">set_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.requirements"></a><h6>
+<a name="id3249785"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.precondition_"></a><h6>
+<a name="id3250230"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_symmetric_difference.complexity"></a><h6>
+<a name="id3250350"></a>
+ <a class="link" href="set_symmetric_difference.html#range.reference.algorithms.set_algorithms.set_symmetric_difference.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="set_difference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heap_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_union.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/algorithms/set_algorithms/set_union.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,205 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>set_union</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../set_algorithms.html" title="Set algorithms">
+<link rel="prev" href="includes.html" title="includes">
+<link rel="next" href="set_intersection.html" title="set_intersection">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="includes.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_intersection.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="set_union">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.algorithms.set_algorithms.set_union"></a><a class="link" href="set_union.html" title="set_union">
+ set_union</a>
+</h5></div></div></div>
+<a name="range.reference.algorithms.set_algorithms.set_union.prototype"></a><h6>
+<a name="id3245636"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_union</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">SinglePassRange2</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">BinaryPredicate</span>
+ <span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">set_union</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">,</span>
+ <span class="identifier">OutputIterator</span> <span class="identifier">out</span><span class="special">,</span>
+ <span class="identifier">BinaryPredicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ </pre>
+<p>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_union.description"></a><h6>
+<a name="id3245987"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">set_union</span></code> constructs
+ a sorted range that is the union of the sorted ranges <code class="computeroutput"><span class="identifier">rng1</span></code>
+ and <code class="computeroutput"><span class="identifier">rng2</span></code>. The return
+ value is the end of the output range. The ordering relationship is determined
+ by using <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>
+ in the non-predicate versions, and by evaluating <code class="computeroutput"><span class="identifier">pred</span></code>
+ in the predicate versions.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_union.definition"></a><h6>
+<a name="id3246076"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">set_algorithm</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_union.requirements"></a><h6>
+<a name="id3246149"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a model of the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+<li class="listitem">
+ The ordering of objects of type <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is a <span class="bold"><strong><span class="emphasis"><em>strict weak ordering</em></span></strong></span>,
+ as defined in the <code class="computeroutput"><span class="identifier">LessThanComparableConcept</span></code>
+ requirements.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> is
+ a model of the <a class="link" href="../../../concepts/single_pass_range.html" title="Single Pass Range">Single
+ Pass Range</a> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code> and
+ <code class="computeroutput"><span class="identifier">SinglePassRange2</span></code> have
+ the same value type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BinaryPredicate</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">StrictWeakOrderingConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange1</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ first argument type.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange2</span></code>'s
+ value type is convertible to <code class="computeroutput"><span class="identifier">BinaryPredicate</span></code>'s
+ second argument types.
+ </li>
+</ul></div>
+<a name="range.reference.algorithms.set_algorithms.set_union.precondition_"></a><h6>
+<a name="id3246592"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.precondition_">Precondition:</a>
+ </h6>
+<p>
+ <span class="bold"><strong>For the non-predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>For the predicate versions:</strong></span>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">rng1</span></code> and <code class="computeroutput"><span class="identifier">rng2</span></code> are sorted in ascending order
+ according to <code class="computeroutput"><span class="identifier">pred</span></code>.
+ </p>
+<a name="range.reference.algorithms.set_algorithms.set_union.complexity"></a><h6>
+<a name="id3246711"></a>
+ <a class="link" href="set_union.html#range.reference.algorithms.set_algorithms.set_union.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. <code class="computeroutput"><span class="identifier">O</span><span class="special">(</span><span class="identifier">N</span><span class="special">)</span></code>,
+ where <code class="computeroutput"><span class="identifier">N</span></code> is <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng1</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">rng2</span><span class="special">)</span></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="includes.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../set_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="set_intersection.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Extending the library</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="ranges/irange.html" title="irange">
+<link rel="next" href="extending/method_1.html" title="Method 1: provide member functions and nested types">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ranges/irange.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="extending/method_1.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Extending the library">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.extending"></a><a class="link" href="extending.html" title="Extending the library"> Extending the library</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="extending/method_1.html"> Method 1: provide
+ member functions and nested types</a></span></dt>
+<dt><span class="section"><a href="extending/method_2.html"> Method 2: provide
+ free-standing functions and specialize metafunctions</a></span></dt>
+<dt><span class="section"><a href="extending/method_3.html"> Method 3: provide
+ range adaptor implementations</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ranges/irange.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="extending/method_1.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending/method_1.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending/method_1.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,161 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Method 1: provide member functions and nested types</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../extending.html" title="Extending the library">
+<link rel="prev" href="../extending.html" title="Extending the library">
+<link rel="next" href="method_2.html" title="Method 2: provide free-standing functions and specialize metafunctions">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../extending.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_2.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Method 1: provide member functions and nested types">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.extending.method_1"></a><a class="link" href="method_1.html" title="Method 1: provide member functions and nested types"> Method 1: provide
+ member functions and nested types</a>
+</h4></div></div></div>
+<p>
+ This procedure assumes that you have control over the types that should
+ be made conformant to a Range concept. If not, see <a class="link" href="method_2.html" title="Method 2: provide free-standing functions and specialize metafunctions">method
+ 2</a>.
+ </p>
+<p>
+ The primary templates in this library are implemented such that standard
+ containers will work automatically and so will boost::array.
+ Below is given an overview of which member functions and member types a
+ class must specify to be useable as a certain Range concept.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Member function
+ </p>
+ </th>
+<th>
+ <p>
+ Related concept
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">begin</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Notice that <code class="computeroutput"><span class="identifier">rbegin</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">rend</span><span class="special">()</span></code>
+ member functions are not needed even though the container can support bidirectional
+ iteration.
+ </p>
+<p>
+ The required member types are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Member type
+ </p>
+ </th>
+<th>
+ <p>
+ Related concept
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Again one should notice that member types <code class="computeroutput"><span class="identifier">reverse_iterator</span></code>
+ and <code class="computeroutput"><span class="identifier">const_reverse_iterator</span></code>
+ are not needed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../extending.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_2.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending/method_2.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending/method_2.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,265 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Method 2: provide free-standing functions and specialize metafunctions</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../extending.html" title="Extending the library">
+<link rel="prev" href="method_1.html" title="Method 1: provide member functions and nested types">
+<link rel="next" href="method_3.html" title="Method 3: provide range adaptor implementations">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_1.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Method 2: provide free-standing functions and specialize metafunctions">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.extending.method_2"></a><a class="link" href="method_2.html" title="Method 2: provide free-standing functions and specialize metafunctions"> Method 2: provide
+ free-standing functions and specialize metafunctions</a>
+</h4></div></div></div>
+<p>
+ This procedure assumes that you cannot (or do not wish to) change the types
+ that should be made conformant to a Range concept. If this is not true,
+ see <a class="link" href="method_1.html" title="Method 1: provide member functions and nested types">method 1</a>.
+ </p>
+<p>
+ The primary templates in this library are implemented such that certain
+ functions are found via argument-dependent-lookup (ADL). Below is given
+ an overview of which free-standing functions a class must specify to be
+ useable as a certain Range concept. Let <code class="computeroutput"><span class="identifier">x</span></code>
+ be a variable (<code class="computeroutput"><span class="keyword">const</span></code> or <code class="computeroutput"><span class="keyword">mutable</span></code>) of the class in question.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Function
+ </p>
+ </th>
+<th>
+ <p>
+ Related concept
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ <code class="computeroutput"><span class="identifier">range_begin</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">range_end</span><span class="special">()</span></code>
+ must be overloaded for both <code class="computeroutput"><span class="keyword">const</span></code>
+ and <code class="computeroutput"><span class="keyword">mutable</span></code> reference arguments.
+ </p>
+<p>
+ You must also specialize two metafunctions for your type <code class="computeroutput"><span class="identifier">X</span></code>:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Metafunction
+ </p>
+ </th>
+<th>
+ <p>
+ Related concept
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_mutable_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_const_iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="../../concepts/single_pass_range.html" title="Single Pass Range">Single Pass
+ Range</a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ A complete example is given here:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="comment">// for std::iterator_traits, std::distance()
+</span>
+<span class="keyword">namespace</span> <span class="identifier">Foo</span>
+<span class="special">{</span>
+ <span class="comment">//
+</span> <span class="comment">// Our sample UDT. A 'Pair'
+</span> <span class="comment">// will work as a range when the stored
+</span> <span class="comment">// elements are iterators.
+</span> <span class="comment">//
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">Pair</span>
+ <span class="special">{</span>
+ <span class="identifier">T</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">last</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'Foo'
+</span>
+<span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="comment">//
+</span> <span class="comment">// Specialize metafunctions. We must include the range.hpp header.
+</span> <span class="comment">// We must open the 'boost' namespace.
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_mutable_iterator</span><span class="special">&lt;</span> <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_const_iterator</span><span class="special">&lt;</span> <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="comment">//
+</span> <span class="comment">// Remark: this is defined similar to 'range_iterator'
+</span> <span class="comment">// because the 'Pair' type does not distinguish
+</span> <span class="comment">// between an iterator and a const_iterator.
+</span> <span class="comment">//
+</span> <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'boost'
+</span>
+<span class="keyword">namespace</span> <span class="identifier">Foo</span>
+<span class="special">{</span>
+ <span class="comment">//
+</span> <span class="comment">// The required functions. These should be defined in
+</span> <span class="comment">// the same namespace as 'Pair', in this case
+</span> <span class="comment">// in namespace 'Foo'.
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">range_begin</span><span class="special">(</span> <span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">first</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">range_begin</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">first</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">range_end</span><span class="special">(</span> <span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">last</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">T</span> <span class="identifier">range_end</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">x</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">last</span><span class="special">;</span>
+ <span class="special">}</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'Foo'
+</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">iter</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
+ <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">iter</span><span class="special">&gt;</span> <span class="identifier">pair</span> <span class="special">=</span> <span class="special">{</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span> <span class="special">};</span>
+ <span class="keyword">const</span> <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">iter</span><span class="special">&gt;&amp;</span> <span class="identifier">cpair</span> <span class="special">=</span> <span class="identifier">pair</span><span class="special">;</span>
+ <span class="comment">//
+</span> <span class="comment">// Notice that we call 'begin' etc with qualification.
+</span> <span class="comment">//
+</span> <span class="identifier">iter</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">pair</span> <span class="special">);</span>
+ <span class="identifier">iter</span> <span class="identifier">e</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">pair</span> <span class="special">);</span>
+ <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span> <span class="identifier">cpair</span> <span class="special">);</span>
+ <span class="identifier">e</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span> <span class="identifier">cpair</span> <span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_difference</span><span class="special">&lt;</span> <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">iter</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span> <span class="identifier">pair</span> <span class="special">);</span>
+ <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span> <span class="identifier">cpair</span> <span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span> <span class="keyword">const</span> <span class="identifier">Foo</span><span class="special">::</span><span class="identifier">Pair</span><span class="special">&lt;</span><span class="identifier">iter</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">ri</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span> <span class="identifier">cpair</span> <span class="special">),</span>
+ <span class="identifier">re</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span> <span class="identifier">cpair</span> <span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_1.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending/method_3.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending/method_3.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Method 3: provide range adaptor implementations</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../extending.html" title="Extending the library">
+<link rel="prev" href="method_2.html" title="Method 2: provide free-standing functions and specialize metafunctions">
+<link rel="next" href="method_3/method_3_1.html" title="Method 3.1: Implement a Range Adaptor without arguments">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_2.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3/method_3_1.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Method 3: provide range adaptor implementations">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.extending.method_3"></a><a class="link" href="method_3.html" title="Method 3: provide range adaptor implementations"> Method 3: provide
+ range adaptor implementations</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="method_3/method_3_1.html"> Method
+ 3.1: Implement a Range Adaptor without arguments</a></span></dt>
+<dt><span class="section"><a href="method_3/method_3_2.html"> Method
+ 3.2: Implement a Range Adaptor with arguments</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_2.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extending.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3/method_3_1.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,100 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Method 3.1: Implement a Range Adaptor without arguments</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../method_3.html" title="Method 3: provide range adaptor implementations">
+<link rel="prev" href="../method_3.html" title="Method 3: provide range adaptor implementations">
+<link rel="next" href="method_3_2.html" title="Method 3.2: Implement a Range Adaptor with arguments">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../method_3.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../method_3.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3_2.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Method 3.1: Implement a Range Adaptor without arguments">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.extending.method_3.method_3_1"></a><a class="link" href="method_3_1.html" title="Method 3.1: Implement a Range Adaptor without arguments"> Method
+ 3.1: Implement a Range Adaptor without arguments</a>
+</h5></div></div></div>
+<p>
+ To implement a Range Adaptor without arguments (e.g. reversed) you need
+ to:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Provide a range for your return type, for example:
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">iterator_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">reverse_iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">R</span> <span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">reverse_range</span> <span class="special">:</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special">&lt;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">reverse_iterator</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special">&lt;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">reverse_iterator</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">base</span><span class="special">;</span>
+
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">reverse_iterator</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">R</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span> <span class="identifier">iterator</span><span class="special">;</span>
+
+ <span class="identifier">reverse_range</span><span class="special">(</span><span class="identifier">R</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">base</span><span class="special">(</span><span class="identifier">iterator</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)),</span> <span class="identifier">iterator</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">)))</span>
+ <span class="special">{</span> <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</li>
+<li class="listitem">
+ Provide a tag to uniquely identify your adaptor in the <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code>
+ function overload set
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">detail</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">reverse_forwarder</span> <span class="special">{};</span>
+<span class="special">}</span>
+</pre>
+</li>
+<li class="listitem">
+ Implement <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code><pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">BidirectionalRng</span> <span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">reverse_range</span><span class="special">&lt;</span><span class="identifier">BidirectionalRng</span><span class="special">&gt;</span>
+<span class="keyword">operator</span><span class="special">|(</span> <span class="identifier">BidirectionalRng</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">,</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">reverse_range</span><span class="special">&lt;</span><span class="identifier">BidirectionalRng</span><span class="special">&gt;(</span> <span class="identifier">r</span> <span class="special">);</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">BidirectionalRng</span> <span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">reverse_range</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">BidirectionalRng</span><span class="special">&gt;</span>
+<span class="keyword">operator</span><span class="special">|(</span> <span class="keyword">const</span> <span class="identifier">BidirectionalRng</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">,</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">reverse_range</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">BidirectionalRng</span><span class="special">&gt;(</span> <span class="identifier">r</span> <span class="special">);</span>
+<span class="special">}</span>
+</pre>
+</li>
+</ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../method_3.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../method_3.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="method_3_2.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,155 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Method 3.2: Implement a Range Adaptor with arguments</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../method_3.html" title="Method 3: provide range adaptor implementations">
+<link rel="prev" href="method_3_1.html" title="Method 3.1: Implement a Range Adaptor without arguments">
+<link rel="next" href="../../../utilities.html" title="Utilities">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_3_1.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../method_3.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../../utilities.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Method 3.2: Implement a Range Adaptor with arguments">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.extending.method_3.method_3_2"></a><a class="link" href="method_3_2.html" title="Method 3.2: Implement a Range Adaptor with arguments"> Method
+ 3.2: Implement a Range Adaptor with arguments</a>
+</h5></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Provide a range for your return type, for example:
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">adaptor</span><span class="special">/</span><span class="identifier">argument_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">iterator_range</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">transform_iterator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Value</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">replace_value</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">result_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">argument_type</span><span class="special">;</span>
+
+ <span class="identifier">replace_value</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">m_from</span><span class="special">(</span><span class="identifier">from</span><span class="special">),</span> <span class="identifier">m_to</span><span class="special">(</span><span class="identifier">to</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">const</span> <span class="identifier">Value</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="special">(</span><span class="identifier">x</span> <span class="special">==</span> <span class="identifier">m_from</span><span class="special">)</span> <span class="special">?</span> <span class="identifier">m_to</span> <span class="special">:</span> <span class="identifier">x</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">Value</span> <span class="identifier">m_from</span><span class="special">;</span>
+ <span class="identifier">Value</span> <span class="identifier">m_to</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Range</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">replace_range</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special">&lt;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">transform_iterator</span><span class="special">&lt;</span>
+ <span class="identifier">replace_value</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;,</span>
+ <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">iterator_base</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">replace_value</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span> <span class="identifier">Fn</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">transform_iterator</span><span class="special">&lt;</span><span class="identifier">Fn</span><span class="special">,</span> <span class="identifier">iterator_base</span><span class="special">&gt;</span> <span class="identifier">replaced_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">replaced_iterator</span><span class="special">&gt;</span> <span class="identifier">base_t</span><span class="special">;</span>
+
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">replace_range</span><span class="special">(</span><span class="identifier">Range</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span> <span class="identifier">value_type</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">value_type</span> <span class="identifier">to</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">base_t</span><span class="special">(</span><span class="identifier">replaced_iterator</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">Fn</span><span class="special">(</span><span class="identifier">from</span><span class="special">,</span><span class="identifier">to</span><span class="special">)),</span>
+ <span class="identifier">replaced_iterator</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">Fn</span><span class="special">(</span><span class="identifier">from</span><span class="special">,</span><span class="identifier">to</span><span class="special">)))</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+</pre>
+</li>
+<li class="listitem">
+ Implement a holder class to hold the arguments required to construct
+ the RangeAdaptor.
+ </li>
+</ol></div>
+<p>
+ The holder combines multiple parameters into one that can be passed as
+ the right operand of <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">replace_holder</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">holder2</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">replace_holder</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">holder2</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">,</span> <span class="identifier">to</span><span class="special">)</span>
+ <span class="special">{</span> <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">replace_holder</span><span class="special">&amp;);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ Define an instance of the holder with the name of the adaptor
+ </li></ol></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">forwarder2</span><span class="special">&lt;</span><span class="identifier">replace_holder</span><span class="special">&gt;</span>
+<span class="identifier">replaced</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">forwarder2</span><span class="special">&lt;</span><span class="identifier">replace_holder</span><span class="special">&gt;();</span>
+</pre>
+<p>
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ Define <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code>
+</li></ol></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">replace_range</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;</span>
+<span class="keyword">operator</span><span class="special">|(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">replace_holder</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;&amp;</span> <span class="identifier">f</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">replace_range</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val1</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val2</span><span class="special">);</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;</span>
+<span class="keyword">inline</span> <span class="identifier">replace_range</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;</span>
+<span class="keyword">operator</span><span class="special">|(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">replace_holder</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;&amp;</span> <span class="identifier">f</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">replace_range</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val1</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val2</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="method_3_1.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../method_3.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../../utilities.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/overview.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/overview.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="synopsis.html" title="Synopsis">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
+</h3></div></div></div>
+<p>
+ Four types of objects are currently supported by the library:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ standard-like containers
+ </li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span><span class="identifier">iterator</span><span class="special">&gt;</span></code></li>
+<li class="listitem">
+ built-in arrays
+ </li>
+</ul></div>
+<p>
+ 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
+ <a class="link" href="../utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a>
+ implements the <a class="link" href="extending.html" title="Extending the library">minimal interface</a>
+ required to make the class a <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward
+ Range</a>.
+ </p>
+<p>
+ Please also see <a class="link" href="../concepts.html" title="Range Concepts">Range concepts</a> for
+ more details.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="synopsis.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="adaptors/adaptors_reference/uniqued.html" title="uniqued">
+<link rel="next" href="range_algorithm/range_algorithm_introduction.html" title="Introduction and motivation">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors/adaptors_reference/uniqued.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm/range_algorithm_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.range_algorithm"></a><a class="link" href="range_algorithm.html" title="Range Algorithm"> Range Algorithm</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_algorithm/range_algorithm_introduction.html">
+ Introduction and motivation</a></span></dt>
+<dt><span class="section"><a href="range_algorithm/range_algorithm_mutating_algorithms.html">
+ Mutating algorithms</a></span></dt>
+<dt><span class="section"><a href="range_algorithm/range_algorithm_non_mutating_algorithms.html">
+ Non-mutating algorithms</a></span></dt>
+<dt><span class="section"></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="adaptors/adaptors_reference/uniqued.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm/range_algorithm_introduction.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_introduction.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_introduction.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,257 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction and motivation</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm.html" title="Range Algorithm">
+<link rel="prev" href="../range_algorithm.html" title="Range Algorithm">
+<link rel="next" href="range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Introduction and motivation">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_introduction"></a><a class="link" href="range_algorithm_introduction.html" title="Introduction and motivation">
+ Introduction and motivation</a>
+</h4></div></div></div>
+<p>
+ In its most simple form a <span class="bold"><strong>Range Algorithm</strong></span>
+ (or range-based algorithm) is simply an iterator-based algorithm where
+ the <span class="emphasis"><em>two</em></span> iterator arguments have been replaced by
+ <span class="emphasis"><em>one</em></span> range argument. For example, we may write
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span> <span class="special">=</span> <span class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ instead of
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ However, the return type of range algorithms is almost always different
+ from that of existing iterator-based algorithms.
+ </p>
+<p>
+ One group of algorithms, like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">()</span></code>, 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
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">:</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">));</span>
+</pre>
+<p>
+ to first sort the range and then run <code class="computeroutput"><span class="identifier">unique</span><span class="special">()</span></code> on the sorted range.
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">()</span></code>
+ fall into another group of algorithms that return (potentially) narrowed
+ views of the original range. By default <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code> returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">found</span><span class="special">)</span></code>
+ where <code class="computeroutput"><span class="identifier">found</span></code> denotes the
+ iterator returned by <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+<p>
+ Therefore exactly the unique values can be copied by writing
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">)),</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream_iterator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Algorithms like <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span></code> usually return the same range:
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span> <span class="identifier">found</span><span class="special">)</span></code>. However, this behaviour may be changed
+ by supplying the algorithms with a template argument:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns a single iterator like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_found</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span>
+ <span class="identifier">found</span><span class="special">)</span></code>
+ (this is the default)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_next</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rng</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">found</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">found</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_next_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">found</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">rng</span><span class="special">))</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_begin_end</span><span class="special">&gt;(</span><span class="identifier">rng</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ returns the entire original range.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ This functionality has the following advantages:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ it allows for <span class="emphasis"><em><span class="bold"><strong>seamless functional-style
+ programming</strong></span></em></span> where you do not need to use named
+ local variables to store intermediate results
+ </li>
+<li class="listitem">
+ it is very <span class="emphasis"><em><span class="bold"><strong>safe</strong></span></em></span>
+ because the algorithm can verify out-of-bounds conditions and handle
+ tricky conditions that lead to empty ranges
+ </li>
+</ol></div>
+<p>
+ For example, consider how easy we may erase the duplicates in a sorted
+ container:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span> <span class="special">=</span> <span class="special">...;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span><span class="special">&gt;(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">sort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">)));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Notice the use of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_found_end</span></code>.
+ What if we wanted to erase all the duplicates except one of them? In old-fashined
+ STL-programming we might write
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// assume 'vec' is already sorted
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">unique</span><span class="special">(</span><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+
+<span class="comment">// remember this check or you get into problems
+</span><span class="keyword">if</span> <span class="special">(</span><span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span>
+ <span class="special">++</span><span class="identifier">i</span><span class="special">;</span>
+
+<span class="identifier">vec</span><span class="special">.</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ </p>
+<p>
+ The same task may be accomplished simply with
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">return_next_end</span><span class="special">&gt;(</span><span class="identifier">vec</span><span class="special">));</span>
+</pre>
+<p>
+ and there is no need to worry about generating an invalid range. Furthermore,
+ if the container is complex, calling <code class="computeroutput"><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></code> several times will be more expensive
+ than using a range algorithm.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Mutating algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_introduction.html" title="Introduction and motivation">
+<link rel="next" href="range_algorithm_mutating_algorithms/copy.html" title="Range Algorithm - copy">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms/copy.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Mutating algorithms">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms"></a><a class="link" href="range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+ Mutating algorithms</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/copy.html">
+ Range Algorithm - copy</a></span></dt>
+<dt><span class="section"><a href="range_algorithm_mutating_algorithms/copy_backward.html">
+ Range Algorithm - copy_backward</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_mutating_algorithms/copy.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,115 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - copy</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="next" href="copy_backward.html" title="Range Algorithm - copy_backward">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - copy">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy"></a><a class="link" href="copy.html" title="Range Algorithm - copy">
+ Range Algorithm - copy</a>
+</h5></div></div></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.prototype"></a><h6>
+<a name="id2722672"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">SinglePassRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="identifier">OutputIterator</span> <span class="identifier">copy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span> <span class="identifier">OutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.description"></a><h6>
+<a name="id2722804"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">copy</span></code> copies all elements
+ from <code class="computeroutput"><span class="identifier">source_rng</span></code> to the
+ range <code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code>. The return value is <code class="computeroutput"><span class="identifier">out_it</span> <span class="special">+</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code>
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.definition"></a><h6>
+<a name="id2722938"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.requirements"></a><h6>
+<a name="id2723012"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ a model of the <code class="computeroutput"><span class="identifier">SinglePassRangeConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="identifier">value_type</span></code> of
+ <code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.precondition_"></a><h6>
+<a name="id2723128"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out_it</span></code> is not an iterator
+ within the <code class="computeroutput"><span class="identifier">source_rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.complexity"></a><h6>
+<a name="id2723234"></a>
+ <a class="link" href="copy.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="copy_backward.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy_backward.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_mutating_algorithms/copy_backward.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,124 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Range Algorithm - copy_backward</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm_mutating_algorithms.html" title="Mutating algorithms">
+<link rel="prev" href="copy.html" title="Range Algorithm - copy">
+<link rel="next" href="../range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Range Algorithm - copy_backward">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward"></a><a class="link" href="copy_backward.html" title="Range Algorithm - copy_backward">
+ Range Algorithm - copy_backward</a>
+</h5></div></div></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.prototype"></a><h6>
+<a name="id2723305"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">BidirectionalRange</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">BidirectionalOutputIterator</span><span class="special">&gt;</span>
+ <span class="identifier">BidirectionalOutputIterator</span>
+ <span class="identifier">copy_backward</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BidirectionalRange</span><span class="special">&amp;</span> <span class="identifier">source_rng</span><span class="special">,</span>
+ <span class="identifier">BidirectionalOutputIterator</span> <span class="identifier">out_it</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.description"></a><h6>
+<a name="id2723438"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">copy_backward</span></code> copies
+ all elements from <code class="computeroutput"><span class="identifier">source_rng</span></code>
+ to the range <code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span>
+ <span class="special">-</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">),</span> <span class="identifier">out_it</span><span class="special">)</span></code>.
+ </p>
+<p>
+ The values are copied in reverse order. The return value is <code class="computeroutput"><span class="identifier">out_it</span> <span class="special">-</span>
+ <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code>.
+ </p>
+<p>
+ Note well that unlike all other standard algorithms <code class="computeroutput"><span class="identifier">out_it</span></code>
+ denotes the <span class="bold"><strong>end</strong></span> of the output sequence.
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.definition"></a><h6>
+<a name="id2723599"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">copy_backward</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.requirements"></a><h6>
+<a name="id2723674"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.requirements">Requirements</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">BidirectionalRange</span></code>
+ is a model of the <code class="computeroutput"><span class="identifier">SinglePassRangeConcept</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">OutputIterator</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">OutputIteratorConcept</span></code>.
+ </li>
+<li class="listitem">
+ The <code class="computeroutput"><span class="identifier">value_type</span></code> of
+ <code class="computeroutput"><span class="identifier">SinglePassRange</span></code> is
+ convertible to a type in <code class="computeroutput"><span class="identifier">OutputIterator</span></code>'s
+ set of value types.
+ </li>
+</ul></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.precondition_"></a><h6>
+<a name="id2723791"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.precondition_">Precondition:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">out_it</span></code> is not an iterator
+ within the <code class="computeroutput"><span class="identifier">source_rng</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="special">[</span><span class="identifier">out_it</span><span class="special">,</span> <span class="identifier">out_it</span>
+ <span class="special">+</span> <span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">))</span></code> is a valid range.
+ </li>
+</ul></div>
+<a name="range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.complexity"></a><h6>
+<a name="id2723899"></a>
+ <a class="link" href="copy_backward.html#range.reference.range_algorithm.range_algorithm_mutating_algorithms.copy_backward.complexity">Complexity</a>
+ </h6>
+<p>
+ Linear. Exactly <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">source_rng</span><span class="special">)</span></code> assignments are performed.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="copy.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_new_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_new_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,41 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title></title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+<link rel="next" href="../extending.html" title="Extending the library">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../extending.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section"><div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_new_algorithms"></a><a class="link" href="range_algorithm_new_algorithms.html">???</a>
+</h4></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_non_mutating_algorithms.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../extending.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_non_mutating_algorithms.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/range_algorithm/range_algorithm_non_mutating_algorithms.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Non-mutating algorithms</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../range_algorithm.html" title="Range Algorithm">
+<link rel="prev" href="range_algorithm_mutating_algorithms/copy_backward.html" title="Range Algorithm - copy_backward">
+<link rel="next" href="range_algorithm_new_algorithms.html" title="">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_mutating_algorithms/copy_backward.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_new_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Non-mutating algorithms"><div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.range_algorithm.range_algorithm_non_mutating_algorithms"></a><a class="link" href="range_algorithm_non_mutating_algorithms.html" title="Non-mutating algorithms">
+ Non-mutating algorithms</a>
+</h4></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="range_algorithm_mutating_algorithms/copy_backward.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../range_algorithm.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="range_algorithm_new_algorithms.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Provided Ranges</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="algorithms/range_numeric/partial_sum.html" title="partial_sum">
+<link rel="next" href="ranges/counting_range.html" title="counting_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="algorithms/range_numeric/partial_sum.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="ranges/counting_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Provided Ranges">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.ranges"></a><a class="link" href="ranges.html" title="Provided Ranges"> Provided Ranges</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> counting_range</span></dt>
+<dt><span class="section"> istream_range</span></dt>
+<dt><span class="section"> irange</span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="algorithms/range_numeric/partial_sum.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="ranges/counting_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/counting_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/counting_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>counting_range</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../ranges.html" title="Provided Ranges">
+<link rel="prev" href="../ranges.html" title="Provided Ranges">
+<link rel="next" href="istream_range.html" title="istream_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="counting_range">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.ranges.counting_range"></a><a class="link" href="counting_range.html" title="counting_range"> counting_range</a>
+</h4></div></div></div>
+<a name="range.reference.ranges.counting_range.prototype"></a><h6>
+<a name="id3263460"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.counting_range.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Incrementable</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="identifier">Incrementable</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">Incrementable</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Incrementable</span> <span class="identifier">last</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.counting_range.description"></a><h6>
+<a name="id3263845"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.counting_range.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">counting_range</span></code> is a function
+ to generator that generates an <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ wrapping a <code class="computeroutput"><span class="identifier">counting_iterator</span></code>
+ (from Boost.Iterator).
+ </p>
+<a name="range.reference.ranges.counting_range.definition"></a><h6>
+<a name="id3263904"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.counting_range.definition">Definition</a>
+ </h6>
+<p>
+ Defined in header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">counting_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.ranges.counting_range.requirements"></a><h6>
+<a name="id3263968"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.counting_range.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<code class="computeroutput"><span class="identifier">Incrementable</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">Incrementable</span></code>
+ Concept.
+ </li></ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/introduction.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/introduction.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Introduction</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../ranges.html" title="Provided Ranges">
+<link rel="prev" href="../ranges.html" title="Provided Ranges">
+<link rel="next" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Introduction">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.ranges.introduction"></a><a class="link" href="introduction.html" title="Introduction"> Introduction</a>
+</h4></div></div></div>
+<p>
+ The Boost.Range library provides some of the more commonly required ranges.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../ranges.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/irange.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/irange.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,103 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>irange</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../ranges.html" title="Provided Ranges">
+<link rel="prev" href="istream_range.html" title="istream_range">
+<link rel="next" href="../extending.html" title="Extending the library">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="istream_range.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../extending.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="irange">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.ranges.irange"></a><a class="link" href="irange.html" title="irange"> irange</a>
+</h4></div></div></div>
+<a name="range.reference.ranges.irange.prototype"></a><h6>
+<a name="id3264408"></a>
+ <a class="link" href="irange.html#range.reference.ranges.irange.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">StepSize</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator_with_step</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">,</span> <span class="identifier">StepSize</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">StepSize</span> <span class="identifier">step_size</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.irange.description"></a><h6>
+<a name="id3264704"></a>
+ <a class="link" href="irange.html#range.reference.ranges.irange.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> is a function to
+ generate an Integer Range.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> allows treating
+ integers as a model of the <a class="link" href="../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept. It should be noted that the <code class="computeroutput"><span class="identifier">first</span></code> and <code class="computeroutput"><span class="identifier">last</span></code>
+ parameters denoted a half-open range.
+ </p>
+<a name="range.reference.ranges.irange.definition"></a><h6>
+<a name="id3264785"></a>
+ <a class="link" href="irange.html#range.reference.ranges.irange.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">irange</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.ranges.irange.requirements"></a><h6>
+<a name="id3264848"></a>
+ <a class="link" href="irange.html#range.reference.ranges.irange.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Integer</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">Integer</span></code> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">StepSize</span></code> is a model of
+ the <code class="computeroutput"><span class="identifier">SignedInteger</span></code> Concept.
+ </li>
+</ol></div>
+<a name="range.reference.ranges.irange.complexity"></a><h6>
+<a name="id3264928"></a>
+ <a class="link" href="irange.html#range.reference.ranges.irange.complexity">Complexity</a>
+ </h6>
+<p>
+ Constant. Since this function generates a new range the most significant
+ performance cost is incurred through the iteration of the generated range.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="istream_range.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../extending.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/istream_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/istream_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,72 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>istream_range</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../ranges.html" title="Provided Ranges">
+<link rel="prev" href="counting_range.html" title="counting_range">
+<link rel="next" href="irange.html" title="irange">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="counting_range.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="irange.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="istream_range">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.ranges.istream_range"></a><a class="link" href="istream_range.html" title="istream_range"> istream_range</a>
+</h4></div></div></div>
+<a name="range.reference.ranges.istream_range.prototype"></a><h6>
+<a name="id3264042"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.istream_range.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Type</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Elem</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream_iterator</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">Elem</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">istream_range</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">Elem</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">&gt;&amp;</span> <span class="identifier">in</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.istream_range.description"></a><h6>
+<a name="id3264261"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.istream_range.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">istream_range</span></code> is a function
+ to generator that generates an <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ wrapping a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream_iterator</span></code>.
+ </p>
+<a name="range.reference.ranges.istream_range.definition"></a><h6>
+<a name="id3264328"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.istream_range.definition">Definition</a>
+ </h6>
+<p>
+ Defined in header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">istream_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="counting_range.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="irange.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/reference.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/reference.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../ranges.html" title="Provided Ranges">
+<link rel="prev" href="introduction.html" title="Introduction">
+<link rel="next" href="reference/counting_range.html" title="counting_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/counting_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Reference">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.ranges.reference"></a><a class="link" href="reference.html" title="Reference"> Reference</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference/counting_range.html">
+ counting_range</a></span></dt>
+<dt><span class="section"><a href="reference/istream_range.html">
+ istream_range</a></span></dt>
+<dt><span class="section"> irange</span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="introduction.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ranges.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/counting_range.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/reference/counting_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/reference/counting_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,91 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>counting_range</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="istream_range.html" title="istream_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="counting_range">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.ranges.reference.counting_range"></a><a class="link" href="counting_range.html" title="counting_range">
+ counting_range</a>
+</h5></div></div></div>
+<a name="range.reference.ranges.reference.counting_range.prototype"></a><h6>
+<a name="id3262203"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.reference.counting_range.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Incrementable</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="identifier">Incrementable</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">Incrementable</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Incrementable</span> <span class="identifier">last</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">SinglePassRange</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">counting_iterator</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="identifier">counting_range</span><span class="special">(</span><span class="identifier">SinglePassRange</span><span class="special">&amp;</span> <span class="identifier">rng</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.reference.counting_range.description"></a><h6>
+<a name="id3262589"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.reference.counting_range.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">counting_range</span></code> is a function
+ to generator that generates an <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ wrapping a <code class="computeroutput"><span class="identifier">counting_iterator</span></code>
+ (from Boost.Iterator).
+ </p>
+<a name="range.reference.ranges.reference.counting_range.definition"></a><h6>
+<a name="id3262649"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.reference.counting_range.definition">Definition</a>
+ </h6>
+<p>
+ Defined in header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">counting_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.ranges.reference.counting_range.requirements"></a><h6>
+<a name="id3262714"></a>
+ <a class="link" href="counting_range.html#range.reference.ranges.reference.counting_range.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<code class="computeroutput"><span class="identifier">Incrementable</span></code> is a
+ model of the <code class="computeroutput"><span class="identifier">Incrementable</span></code>
+ Concept.
+ </li></ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="istream_range.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/reference/irange.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/reference/irange.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,104 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>irange</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="istream_range.html" title="istream_range">
+<link rel="next" href="../../extending.html" title="Extending the library">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="istream_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../extending.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="irange">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.ranges.reference.irange"></a><a class="link" href="irange.html" title="irange"> irange</a>
+</h5></div></div></div>
+<a name="range.reference.ranges.reference.irange.prototype"></a><h6>
+<a name="id3263158"></a>
+ <a class="link" href="irange.html#range.reference.ranges.reference.irange.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Integer</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">StepSize</span><span class="special">&gt;</span>
+<span class="identifier">integer_range</span><span class="special">&lt;</span> <span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">integer_iterator_with_step</span><span class="special">&lt;</span><span class="identifier">Integer</span><span class="special">,</span> <span class="identifier">StepSize</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">irange</span><span class="special">(</span><span class="identifier">Integer</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Integer</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">StepSize</span> <span class="identifier">step_size</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.reference.irange.description"></a><h6>
+<a name="id3263454"></a>
+ <a class="link" href="irange.html#range.reference.ranges.reference.irange.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> is a function
+ to generate an Integer Range.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">irange</span></code> allows treating
+ integers as a model of the <a class="link" href="../../../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a> Concept. It should be noted that the <code class="computeroutput"><span class="identifier">first</span></code> and <code class="computeroutput"><span class="identifier">last</span></code>
+ parameters denoted a half-open range.
+ </p>
+<a name="range.reference.ranges.reference.irange.definition"></a><h6>
+<a name="id3263535"></a>
+ <a class="link" href="irange.html#range.reference.ranges.reference.irange.definition">Definition</a>
+ </h6>
+<p>
+ Defined in the header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">irange</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+<a name="range.reference.ranges.reference.irange.requirements"></a><h6>
+<a name="id3263598"></a>
+ <a class="link" href="irange.html#range.reference.ranges.reference.irange.requirements">Requirements</a>
+ </h6>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">Integer</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">Integer</span></code> Concept.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">StepSize</span></code> is a model
+ of the <code class="computeroutput"><span class="identifier">SignedInteger</span></code>
+ Concept.
+ </li>
+</ol></div>
+<a name="range.reference.ranges.reference.irange.complexity"></a><h6>
+<a name="id3263679"></a>
+ <a class="link" href="irange.html#range.reference.ranges.reference.irange.complexity">Complexity</a>
+ </h6>
+<p>
+ Constant. Since this function generates a new range the most significant
+ performance cost is incurred through the iteration of the generated range.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="istream_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../extending.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/ranges/reference/istream_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/ranges/reference/istream_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,73 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>istream_range</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="counting_range.html" title="counting_range">
+<link rel="next" href="irange.html" title="irange">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="counting_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="irange.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="istream_range">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="range.reference.ranges.reference.istream_range"></a><a class="link" href="istream_range.html" title="istream_range">
+ istream_range</a>
+</h5></div></div></div>
+<a name="range.reference.ranges.reference.istream_range.prototype"></a><h6>
+<a name="id3262788"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.reference.istream_range.prototype">Prototype</a>
+ </h6>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Type</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Elem</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="keyword">inline</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">istream_iterator</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">Elem</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+<span class="identifier">istream_range</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">Elem</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">&gt;&amp;</span> <span class="identifier">in</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.reference.ranges.reference.istream_range.description"></a><h6>
+<a name="id3263008"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.reference.istream_range.description">Description</a>
+ </h6>
+<p>
+ <code class="computeroutput"><span class="identifier">istream_range</span></code> is a function
+ to generator that generates an <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ wrapping a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream_iterator</span></code>.
+ </p>
+<a name="range.reference.ranges.reference.istream_range.definition"></a><h6>
+<a name="id3263077"></a>
+ <a class="link" href="istream_range.html#range.reference.ranges.reference.istream_range.definition">Definition</a>
+ </h6>
+<p>
+ Defined in header file <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">istream_range</span><span class="special">.</span><span class="identifier">hpp</span></code>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="counting_range.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="irange.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/semantics.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/semantics.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,163 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Semantics</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="synopsis.html" title="Synopsis">
+<link rel="next" href="semantics/metafunctions.html" title="Metafunctions">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="synopsis.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="semantics/metafunctions.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Semantics">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.semantics"></a><a class="link" href="semantics.html" title="Semantics">Semantics</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Metafunctions</span></dt>
+<dt><span class="section">Functions</span></dt>
+</dl></div>
+<a name="range.reference.semantics.notation"></a><h5>
+<a name="id3173346"></a>
+ <a class="link" href="semantics.html#range.reference.semantics.notation">notation</a>
+ </h5>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Object
+ </p>
+ </th>
+<th>
+ <p>
+ Describes
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">x</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ any type
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ denotes behavior of the primary templates
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">P</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">p</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ denotes <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span><span class="identifier">iterator</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span><span class="special">[</span><span class="identifier">sz</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ denotes an array of type <code class="computeroutput"><span class="identifier">A</span></code>
+ of size <code class="computeroutput"><span class="identifier">sz</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Char</span><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ denotes either <code class="computeroutput"><span class="keyword">char</span><span class="special">*</span></code> or <code class="computeroutput"><span class="keyword">wchar_t</span><span class="special">*</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="synopsis.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="semantics/metafunctions.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/semantics/functions.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/semantics/functions.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,408 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Functions</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../semantics.html" title="Semantics">
+<link rel="prev" href="metafunctions.html" title="Metafunctions">
+<link rel="next" href="../adaptors.html" title="Range Adaptors">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="metafunctions.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../adaptors.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Functions">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.semantics.functions"></a><a class="link" href="functions.html" title="Functions">Functions</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return type
+ </p>
+ </th>
+<th>
+ <p>
+ Returns
+ </p>
+ </th>
+<th>
+ <p>
+ Complexity
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">first</span></code> if <code class="computeroutput"><span class="identifier">p</span></code>
+ is of type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> <code class="computeroutput"><span class="identifier">a</span></code>
+ if <code class="computeroutput"><span class="identifier">a</span></code> is an array
+ <code class="computeroutput"><span class="identifier">range_begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ if that expression would invoke a function found by ADL <code class="computeroutput"><span class="identifier">t</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></code>
+ otherwise
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span></code> if <code class="computeroutput"><span class="identifier">p</span></code>
+ is of type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> <code class="computeroutput"><span class="identifier">a</span>
+ <span class="special">+</span> <span class="identifier">sz</span></code>
+ if <code class="computeroutput"><span class="identifier">a</span></code> is an array
+ of size <code class="computeroutput"><span class="identifier">sz</span></code> <code class="computeroutput"><span class="identifier">range_end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ if that expression would invoke a function found by ADL <code class="computeroutput"><span class="identifier">t</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>
+ otherwise
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">bool</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span>
+ <span class="special">==</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ -
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span>
+ <span class="special">-</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rend</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_end</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_rbegin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_rend</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ constant time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">as_literal</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> where <code class="computeroutput"><span class="identifier">U</span></code>
+ is <code class="computeroutput"><span class="identifier">Char</span><span class="special">*</span></code>
+ if <code class="computeroutput"><span class="identifier">x</span></code> is a pointer
+ to a string and <code class="computeroutput"><span class="identifier">U</span></code>
+ is <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ otherwise
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">s</span><span class="special">,</span><span class="identifier">s</span>
+ <span class="special">+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">length</span><span class="special">(</span><span class="identifier">s</span><span class="special">))</span></code> if <code class="computeroutput"><span class="identifier">s</span></code>
+ is a <code class="computeroutput"><span class="identifier">Char</span><span class="special">*</span></code>
+ or an array of <code class="computeroutput"><span class="identifier">Char</span></code>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code> otherwise
+ </p>
+ </td>
+<td>
+ <p>
+ linear time for pointers to a string or arrays of <code class="computeroutput"><span class="identifier">Char</span></code>, constant time otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">as_array</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">x</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">x</span><span class="special">))</span></code>
+ </p>
+ </td>
+<td class="auto-generated">&#160;</td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ The special <code class="computeroutput"><span class="identifier">const_</span></code>-named
+ functions are useful when you want to document clearly that your code is
+ read-only.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">as_literal</span><span class="special">()</span></code>
+ can be used <span class="emphasis"><em><span class="bold"><strong>internally</strong></span></em></span>
+ in string algorithm libraries such that arrays of characters are handled
+ correctly.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">as_array</span><span class="special">()</span></code>
+ 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.
+ </p>
+<p>
+ Notice that the above functions should always be called with qualification
+ (<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span></code>)
+ to prevent <span class="emphasis"><em><span class="bold"><strong>unintended</strong></span></em></span>
+ Argument Dependent Lookup (ADL).
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="metafunctions.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../adaptors.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/semantics/metafunctions.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/semantics/metafunctions.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,236 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Metafunctions</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../semantics.html" title="Semantics">
+<link rel="prev" href="../semantics.html" title="Semantics">
+<link rel="next" href="functions.html" title="Functions">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../semantics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="functions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Metafunctions">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="range.reference.semantics.metafunctions"></a><a class="link" href="metafunctions.html" title="Metafunctions">Metafunctions</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return type
+ </p>
+ </th>
+<th>
+ <p>
+ Complexity
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">T</span><span class="special">::</span><span class="identifier">iterator</span>
+<span class="identifier">P</span><span class="special">::</span><span class="identifier">first_type</span>
+<span class="identifier">A</span><span class="special">*</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">T</span><span class="special">::</span><span class="identifier">const_iterator</span>
+<span class="identifier">P</span><span class="special">::</span><span class="identifier">first_type</span>
+<span class="keyword">const</span> <span class="identifier">A</span><span class="special">*</span>
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_value</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_reference</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_pointer</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_pointer</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_category</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_category</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_category</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">reverse_iterator</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
+ <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">reverse_iterator</span><span class="special">&lt;</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ compile time
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../semantics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../semantics.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="functions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/reference/synopsis.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/reference/synopsis.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,185 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Synopsis</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="overview.html" title="Overview">
+<link rel="next" href="semantics.html" title="Semantics">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="semantics.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Synopsis">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.reference.synopsis"></a><a class="link" href="synopsis.html" title="Synopsis">Synopsis</a>
+</h3></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="comment">//
+</span> <span class="comment">// Single Pass Range metafunctions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_iterator</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_value</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_reference</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_pointer</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_category</span><span class="special">;</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Forward Range metafunctions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_difference</span><span class="special">;</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Bidirectional Range metafunctions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">range_reverse_iterator</span><span class="special">;</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Single Pass Range functions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">begin</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">begin</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">end</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">end</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span>
+ <span class="identifier">empty</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Forward Range functions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">distance</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Bidirectional Range functions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">rbegin</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">rbegin</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">rend</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">rend</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Random Access Range functions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">size</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">//
+</span> <span class="comment">// Special const Range functions
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">const_begin</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">const_end</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">const_rbegin</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">const_rend</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">//
+</span> <span class="comment">// String utilities
+</span> <span class="comment">//
+</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="special">...</span> <span class="identifier">see</span> <span class="identifier">below</span> <span class="special">...</span> <span class="special">&gt;</span>
+ <span class="identifier">as_literal</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="special">...</span> <span class="identifier">see</span> <span class="identifier">below</span> <span class="special">...</span> <span class="special">&gt;</span>
+ <span class="identifier">as_literal</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">as_array</span><span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">as_array</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'boost'
+</span></pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="semantics.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/style_guide.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/style_guide.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,141 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Terminology and style guidelines</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="utilities/join.html" title="Function join">
+<link rel="next" href="library_headers.html" title="Library Headers">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="utilities/join.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="library_headers.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Terminology and style guidelines">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.style_guide"></a><a class="link" href="style_guide.html" title="Terminology and style guidelines"> Terminology and style guidelines</a>
+</h2></div></div></div>
+<p>
+ The use of a consistent terminology is as important for <a class="link" href="concepts.html" title="Range Concepts">Ranges</a>
+ and range-based algorithms as it is for iterators and iterator-based algorithms.
+ If a conventional set of names are adopted, we can avoid misunderstandings
+ and write generic function prototypes that are <span class="bold"><strong><span class="emphasis"><em>self-documenting</em></span></strong></span>.
+ </p>
+<p>
+ Since ranges are characterized by a specific underlying iterator type, we get
+ a type of range for each type of iterator. Hence we can speak of the following
+ types of ranges:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<span class="bold"><strong><span class="emphasis"><em>Value access</em></span></strong></span> category:
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ Readable Range
+ </li>
+<li class="listitem">
+ Writeable Range
+ </li>
+<li class="listitem">
+ Swappable Range
+ </li>
+<li class="listitem">
+ Lvalue Range
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+<span class="bold"><strong><span class="emphasis"><em>Traversal</em></span></strong></span> category:
+ <div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem"><a class="link" href="concepts/single_pass_range.html" title="Single Pass Range">Single Pass Range</a></li>
+<li class="listitem"><a class="link" href="concepts/forward_range.html" title="Forward Range">Forward Range</a></li>
+<li class="listitem"><a class="link" href="concepts/bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a></li>
+<li class="listitem"><a class="link" href="concepts/random_access_range.html" title="Random Access Range">Random Access Range</a></li>
+</ul></div>
+</li>
+</ul></div>
+<p>
+ Notice how we have used the categories from the <a href="../../../libs/iterator/doc/new-iter-concepts.html" target="_top">new
+ style iterators</a>.
+ </p>
+<p>
+ Notice that an iterator (and therefore an range) has one <span class="bold"><strong><span class="emphasis"><em>traversal</em></span></strong></span>
+ property and one or more properties from the <span class="bold"><strong><span class="emphasis"><em>value
+ access</em></span></strong></span> category. So in reality we will mostly talk about
+ mixtures such as
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Random Access Readable Writeable Range
+ </li>
+<li class="listitem">
+ Forward Lvalue Range
+ </li>
+</ul></div>
+<p>
+ By convention, we should always specify the <span class="bold"><strong><span class="emphasis"><em>traversal</em></span></strong></span>
+ property first as done above. This seems reasonable since there will only be
+ one <span class="bold"><strong><span class="emphasis"><em>traversal</em></span></strong></span> property,
+ but perhaps many <span class="bold"><strong><span class="emphasis"><em>value access</em></span></strong></span>
+ properties.
+ </p>
+<p>
+ It might, however, be reasonable to specify only one category if the other
+ category does not matter. For example, the <a class="link" href="utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> can be constructed
+ from a Forward Range. This means that we do not care about what <span class="bold"><strong><span class="emphasis"><em>value
+ access</em></span></strong></span> properties the Range has. Similarly, a Readable
+ Range will be one that has the lowest possible <span class="bold"><strong><span class="emphasis"><em>traversal</em></span></strong></span>
+ property (Single Pass).
+ </p>
+<p>
+ As another example, consider how we specify the interface of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">sort</span><span class="special">()</span></code>. Algorithms are usually more cumbersome to
+ specify the interface of since both <span class="bold"><strong><span class="emphasis"><em>traversal</em></span></strong></span>
+ and <span class="bold"><strong><span class="emphasis"><em>value access</em></span></strong></span> properties
+ must be exactly defined. The iterator-based version looks like this:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">RandomAccessTraversalReadableWritableIterator</span> <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">sort</span><span class="special">(</span> <span class="identifier">RandomAccessTraversalReadableWritableIterator</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">RandomAccessTraversalReadableWritableIterator</span> <span class="identifier">last</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ For ranges the interface becomes
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">RandomAccessReadableWritableRange</span> <span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">sort</span><span class="special">(</span> <span class="identifier">RandomAccessReadableWritableRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="utilities/join.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="library_headers.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/upgrade.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/upgrade.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Upgrade version of Boost.Range</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="mfc_atl/references.html" title="References">
+<link rel="next" href="upgrade/upgrade_from_1_42.html" title="Upgrade from version 1.42">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mfc_atl/references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upgrade/upgrade_from_1_42.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Upgrade version of Boost.Range">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.upgrade"></a><a class="link" href="upgrade.html" title="Upgrade version of Boost.Range"> Upgrade version of Boost.Range</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="upgrade/upgrade_from_1_42.html"> Upgrade from version
+ 1.42</a></span></dt>
+<dt><span class="section"><a href="upgrade/upgrade_from_1_34.html"> Upgrade from version
+ 1.34</a></span></dt>
+</dl></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="mfc_atl/references.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upgrade/upgrade_from_1_42.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/upgrade/upgrade_1_34_to_1_35.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/upgrade/upgrade_1_34_to_1_35.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,77 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Upgrade from version 1.34</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../upgrade.html" title="Upgrade version of Boost.Range">
+<link rel="prev" href="../upgrade.html" title="Upgrade version of Boost.Range">
+<link rel="next" href="../portability.html" title="Portability">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../upgrade.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../portability.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Upgrade from version 1.34">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.upgrade.upgrade_1_34_to_1_35"></a><a class="link" href="upgrade_1_34_to_1_35.html" title="Upgrade from version 1.34"> Upgrade from version
+ 1.34</a>
+</h3></div></div></div>
+<p>
+ Boost version 1.35 introduced some larger refactorings of the library:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Direct support for character arrays was abandoned in favor of uniform treatment
+ of all arrays. Instead string algorithms can use the new function <a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">as_literal</span></code></a><code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">size</span></code></a>
+ now requires a <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a>. The old behavior is provided as <a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">distance</span></code></a><code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code> has been completely removed in favor
+ of <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">boost_range_begin</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">boost_range_end</span><span class="special">()</span></code>
+ have been renamed <code class="computeroutput"><span class="identifier">range_begin</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">range_end</span><span class="special">()</span></code> respectively.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_result_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code> and <code class="computeroutput"><span class="identifier">range_reverse_result_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ have been renamed <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ and <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ </li>
+<li class="listitem">
+ The procedure that makes a custom type work with the library has been greatly
+ simplified. See <a class="link" href="../reference/extending.html" title="Extending the library">Extending the
+ library for UDTs</a> for details.
+ </li>
+</ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../upgrade.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../portability.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_34.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_34.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,77 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Upgrade from version 1.34</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../upgrade.html" title="Upgrade version of Boost.Range">
+<link rel="prev" href="upgrade_from_1_42.html" title="Upgrade from version 1.42">
+<link rel="next" href="../portability.html" title="Portability">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upgrade_from_1_42.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../portability.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Upgrade from version 1.34">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.upgrade.upgrade_from_1_34"></a><a class="link" href="upgrade_from_1_34.html" title="Upgrade from version 1.34"> Upgrade from version
+ 1.34</a>
+</h3></div></div></div>
+<p>
+ Boost version 1.35 introduced some larger refactorings of the library:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Direct support for character arrays was abandoned in favor of uniform treatment
+ of all arrays. Instead string algorithms can use the new function <a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">as_literal</span></code></a><code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">size</span></code></a>
+ now requires a <a class="link" href="../concepts/random_access_range.html" title="Random Access Range">Random
+ Access Range</a>. The old behavior is provided as <a class="link" href="../reference/semantics/functions.html" title="Functions"><code class="computeroutput"><span class="identifier">distance</span></code></a><code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code> has been completely removed in favor
+ of <code class="computeroutput"><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+</li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">boost_range_begin</span><span class="special">()</span></code>
+ and <code class="computeroutput"><span class="identifier">boost_range_end</span><span class="special">()</span></code>
+ have been renamed <code class="computeroutput"><span class="identifier">range_begin</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">range_end</span><span class="special">()</span></code> respectively.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">range_result_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code> and <code class="computeroutput"><span class="identifier">range_reverse_result_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ have been renamed <code class="computeroutput"><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
+ and <code class="computeroutput"><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span></code>.
+ </li>
+<li class="listitem">
+ The procedure that makes a custom type work with the library has been greatly
+ simplified. See <a class="link" href="../reference/extending.html" title="Extending the library">Extending the
+ library for UDTs</a> for details.
+ </li>
+</ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upgrade_from_1_42.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../portability.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_42.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/upgrade/upgrade_from_1_42.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Upgrade from version 1.42</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../upgrade.html" title="Upgrade version of Boost.Range">
+<link rel="prev" href="../upgrade.html" title="Upgrade version of Boost.Range">
+<link rel="next" href="upgrade_from_1_34.html" title="Upgrade from version 1.34">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../upgrade.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upgrade_from_1_34.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Upgrade from version 1.42">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.upgrade.upgrade_from_1_42"></a><a class="link" href="upgrade_from_1_42.html" title="Upgrade from version 1.42"> Upgrade from version
+ 1.42</a>
+</h3></div></div></div>
+<p>
+ New features:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem"><a class="link" href="../reference/adaptors.html" title="Range Adaptors">Range adaptors</a></li>
+<li class="listitem"><a class="link" href="../reference/algorithms.html" title="Range Algorithm">Range algorithms</a></li>
+</ol></div>
+<p>
+ Removed:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<code class="computeroutput"><span class="identifier">iterator_range</span></code> no longer
+ has a <code class="computeroutput"><span class="identifier">is_singular</span></code> member
+ function. The singularity restrictions have been removed from the <code class="computeroutput"><span class="identifier">iterator_range</span></code> class since this added
+ restrictions to ranges of iterators whose default constructors were not
+ singular. Previously the <code class="computeroutput"><span class="identifier">is_singular</span></code>
+ member function always returned <code class="computeroutput"><span class="keyword">false</span></code>
+ in release build configurations, hence it is not anticipated that this
+ interface change will produce difficulty in upgrading.
+ </li></ol></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../upgrade.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="upgrade_from_1_34.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/utilities.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/utilities.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,82 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Utilities</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="prev" href="reference/extending/method_3/method_3_2.html" title="Method 3.2: Implement a Range Adaptor with arguments">
+<link rel="next" href="utilities/iterator_range.html" title="Class iterator_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/extending/method_3/method_3_2.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="utilities/iterator_range.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Utilities">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="range.utilities"></a><a class="link" href="utilities.html" title="Utilities"> Utilities</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Class iterator_range</span></dt>
+<dt><span class="section"> Class sub_range</span></dt>
+<dt><span class="section"> Function join</span></dt>
+</dl></div>
+<p>
+ Having an abstraction that encapsulates a pair of iterators is very useful.
+ The standard library uses <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> 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, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span><span class="identifier">iterator</span><span class="special">&gt;</span></code> is hardly self-documenting whereas more
+ domain specific class names are. Therefore these two classes are provided:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Class <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+</li>
+<li class="listitem">
+ Class <code class="computeroutput"><span class="identifier">sub_range</span></code>
+</li>
+<li class="listitem">
+ Function <code class="computeroutput"><span class="identifier">join</span></code>
+</li>
+</ul></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">iterator_range</span></code> class is
+ templated on an <a href="../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators" target="_top">Forward
+ Traversal Iterator</a> and should be used whenever fairly general code
+ is needed. The <code class="computeroutput"><span class="identifier">sub_range</span></code> class
+ is templated on an <a class="link" href="concepts/forward_range.html" title="Forward Range">Forward Range</a>
+ 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 <code class="computeroutput"><span class="identifier">sub_range</span></code> can propagate constness because
+ it knows what a corresponding <code class="computeroutput"><span class="identifier">const_iterator</span></code>
+ is.
+ </p>
+<p>
+ Both classes can be used as ranges since they implement the <a class="link" href="reference/extending.html" title="Extending the library">minimal
+ interface</a> required for this to work automatically.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/extending/method_3/method_3_2.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="utilities/iterator_range.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/utilities/iterator_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/utilities/iterator_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,322 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Class iterator_range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../utilities.html" title="Utilities">
+<link rel="prev" href="../utilities.html" title="Utilities">
+<link rel="next" href="sub_range.html" title="Class sub_range">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../utilities.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sub_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Class iterator_range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.utilities.iterator_range"></a><a class="link" href="iterator_range.html" title="Class iterator_range"> Class <code class="computeroutput"><span class="identifier">iterator_range</span></code></a>
+</h3></div></div></div>
+<p>
+ The intention of the <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ class is to encapsulate two iterators so they fulfill the <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward
+ Range</a> concept. A few other functions are also provided for convenience.
+ </p>
+<p>
+ If the template argument is not a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators" target="_top">Forward
+ Traversal Iterator</a>, one can still use a subset of the interface.
+ In particular, <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code>
+ requires Random Access Traversal Iterators whereas <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code> only requires Single Pass Iterators.
+ </p>
+<p>
+ Recall that many default constructed iterators are <span class="bold"><strong><span class="emphasis"><em>singular</em></span></strong></span>
+ and hence can only be assigned, but not compared or incremented or anything.
+ However, if one creates a default constructed <code class="computeroutput"><span class="identifier">iterator_range</span></code>,
+ then one can still call all its member functions. This design decision avoids
+ the <code class="computeroutput"><span class="identifier">iterator_range</span></code> imposing
+ limitations upon ranges of iterators that are not singular. Any singularity
+ limitation is simply propogated from the underlying iterator type.
+ </p>
+<a name="range.utilities.iterator_range.synopsis"></a><h5>
+<a name="id3271139"></a>
+ <a class="link" href="iterator_range.html#range.utilities.iterator_range.synopsis">Synopsis</a>
+ </h5>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">iterator_range</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// Forward Range types
+</span> <span class="keyword">typedef</span> <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">const_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">iterator_difference</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">difference_type</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// construction, assignment
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">(</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="identifier">Begin</span><span class="special">,</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="identifier">End</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">(</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// Forward Range functions
+</span> <span class="identifier">iterator</span> <span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">iterator</span> <span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// convenience
+</span> <span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">equal</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">front</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">back</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="identifier">advance_begin</span><span class="special">(</span><span class="identifier">difference_type</span> <span class="identifier">n</span><span class="special">);</span>
+ <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="identifier">advance_end</span><span class="special">(</span><span class="identifier">difference_type</span> <span class="identifier">n</span><span class="special">);</span>
+ <span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="comment">// for Random Access Range only:
+</span> <span class="identifier">reference</span> <span class="keyword">operator</span><span class="special">[](</span> <span class="identifier">difference_type</span> <span class="identifier">at</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span> <span class="keyword">operator</span><span class="special">()(</span> <span class="identifier">difference_type</span> <span class="identifier">at</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">size_type</span> <span class="identifier">size</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="comment">// stream output
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Traits</span> <span class="special">&gt;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;&amp;</span>
+ <span class="keyword">operator</span><span class="special">&lt;&lt;(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;&amp;</span> <span class="identifier">Os</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">// comparison
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator2</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator2</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator2</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator2</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span> <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">ForwardTraversalIterator</span><span class="special">&gt;&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="comment">// external construction
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="identifier">ForwardTraversalIterator</span> <span class="special">&gt;</span>
+ <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">Begin</span><span class="special">,</span>
+ <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">End</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Range</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="identifier">Range</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_begin</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_end</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Range</span> <span class="special">&gt;</span>
+ <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_begin</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_end</span> <span class="special">);</span>
+
+ <span class="comment">// convenience
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="identifier">Sequence</span> <span class="identifier">copy_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'boost'
+</span></pre>
+<p>
+ </p>
+<p>
+ If an instance of <code class="computeroutput"><span class="identifier">iterator_range</span></code>
+ is constructed by a client with two iterators, the client must ensure that
+ the two iterators delimit a valid closed-open range [begin,end).
+ </p>
+<p>
+ It is worth noticing that the templated constructors and assignment operators
+ allow conversion from <code class="computeroutput"><span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;</span></code> to <code class="computeroutput"><span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">const_iterator</span><span class="special">&gt;</span></code>. 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.
+ </p>
+<a name="range.utilities.iterator_range.details_member_functions"></a><h5>
+<a name="id3274370"></a>
+ <a class="link" href="iterator_range.html#range.utilities.iterator_range.details_member_functions">Details
+ member functions</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="special">!</span><span class="identifier">empty</span><span class="special">();</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">equal</span><span class="special">(</span> <span class="identifier">iterator_range</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="identifier">begin</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">r</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">&amp;&amp;</span>
+ <span class="identifier">end</span><span class="special">()</span>
+ <span class="special">==</span> <span class="identifier">r</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="range.utilities.iterator_range.details_functions"></a><h5>
+<a name="id3274615"></a>
+ <a class="link" href="iterator_range.html#range.utilities.iterator_range.details_functions">Details
+ functions</a>
+ </h5>
+<p>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span>
+ <span class="identifier">l</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">size</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span> <span class="special">?</span> <span class="keyword">false</span>
+ <span class="special">:</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">equal</span><span class="special">(</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span> <span class="special">);</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span>
+ <span class="identifier">l</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="special">!(</span> <span class="identifier">l</span> <span class="special">==</span> <span class="identifier">r</span> <span class="special">);</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange1</span><span class="special">&amp;</span>
+ <span class="identifier">l</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lexicographical_compare</span><span class="special">(</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span> <span class="special">);</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">iterator_range</span> <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="identifier">Range</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_begin</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">Range</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">advance_end</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Effects:</strong></span></em></span>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">iterator</span> <span class="identifier">new_begin</span> <span class="special">=</span> <span class="identifier">begin</span><span class="special">(</span> <span class="identifier">r</span> <span class="special">),</span>
+<span class="identifier">iterator</span> <span class="identifier">new_end</span> <span class="special">=</span> <span class="identifier">end</span><span class="special">(</span> <span class="identifier">r</span> <span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">advance</span><span class="special">(</span> <span class="identifier">new_begin</span><span class="special">,</span> <span class="identifier">advance_begin</span> <span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">advance</span><span class="special">(</span> <span class="identifier">new_end</span><span class="special">,</span> <span class="identifier">advance_end</span> <span class="special">);</span>
+<span class="keyword">return</span> <span class="identifier">make_iterator_range</span><span class="special">(</span> <span class="identifier">new_begin</span><span class="special">,</span> <span class="identifier">new_end</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">Sequence</span> <span class="identifier">copy_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span></code>
+ </p>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="emphasis"><em><span class="bold"><strong>Returns</strong></span></em></span> <code class="computeroutput"><span class="identifier">Sequence</span><span class="special">(</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span> <span class="special">);</span></code>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../utilities.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sub_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/utilities/join.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/utilities/join.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,89 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function join</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../utilities.html" title="Utilities">
+<link rel="prev" href="sub_range.html" title="Class sub_range">
+<link rel="next" href="../style_guide.html" title="Terminology and style guidelines">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sub_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../style_guide.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Function join">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.utilities.join"></a><a class="link" href="join.html" title="Function join"> Function join</a>
+</h3></div></div></div>
+<p>
+ The intention of the <code class="computeroutput"><span class="identifier">join</span></code>
+ function is to join two ranges into one longer range.
+ </p>
+<p>
+ The resultant range will have the lowest common traversal of the two ranges
+ supplied as parameters.
+ </p>
+<p>
+ 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.
+ </p>
+<a name="range.utilities.join.synposis"></a><h5>
+<a name="id3277052"></a>
+ <a class="link" href="join.html#range.utilities.join.synposis">Synposis</a>
+ </h5>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">join_iterator</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">add_const</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_value</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="special">&gt;</span>
+<span class="identifier">join</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">)</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SinglePassRange1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SinglePassRange2</span><span class="special">&gt;</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">join_iterator</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">SinglePassRange2</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">range_value</span><span class="special">&lt;</span><span class="identifier">SinglePassRange1</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+<span class="special">&gt;</span>
+<span class="identifier">join</span><span class="special">(</span><span class="identifier">SinglePassRange1</span><span class="special">&amp;</span> <span class="identifier">rng1</span><span class="special">,</span> <span class="identifier">SinglePassRange2</span><span class="special">&amp;</span> <span class="identifier">rng2</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<a name="range.utilities.join.example"></a><h5>
+<a name="id3277600"></a>
+ <a class="link" href="join.html#range.utilities.join.example">Example</a>
+ </h5>
+<p>
+ The expression <code class="computeroutput"><span class="identifier">join</span><span class="special">(</span><span class="identifier">irange</span><span class="special">(</span><span class="number">0</span><span class="special">,</span><span class="number">5</span><span class="special">),</span> <span class="identifier">irange</span><span class="special">(</span><span class="number">5</span><span class="special">,</span><span class="number">10</span><span class="special">))</span></code> would
+ evaluate to a range representing an integer range <code class="computeroutput"><span class="special">[</span><span class="number">0</span><span class="special">,</span><span class="number">10</span><span class="special">)</span></code>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sub_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../style_guide.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/range/utilities/sub_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/range/utilities/sub_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,122 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Class sub_range</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
+<link rel="up" href="../utilities.html" title="Utilities">
+<link rel="prev" href="iterator_range.html" title="Class iterator_range">
+<link rel="next" href="join.html" title="Function join">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="iterator_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Class sub_range">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="range.utilities.sub_range"></a><a class="link" href="sub_range.html" title="Class sub_range"> Class <code class="computeroutput"><span class="identifier">sub_range</span></code></a>
+</h3></div></div></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">sub_range</span></code> class inherits
+ all its functionality from the <a class="link" href="iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> class. The <code class="computeroutput"><span class="identifier">sub_range</span></code> class is often easier to use
+ because one must specify the <a class="link" href="../concepts/forward_range.html" title="Forward Range">Forward
+ Range</a> template argument instead of an iterator. Moreover, the <code class="computeroutput"><span class="identifier">sub_range</span></code> class can propagate constness
+ since it knows what a corresponding <code class="computeroutput"><span class="identifier">const_iterator</span></code>
+ is.
+ </p>
+<a name="range.utilities.sub_range.synopsis"></a><h5>
+<a name="id3275774"></a>
+ <a class="link" href="sub_range.html#range.utilities.sub_range.synopsis">Synopsis</a>
+ </h5>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">sub_range</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">iterator_range</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">ForwardRange</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">const_iterator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">iterator_difference</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">difference_type</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// construction, assignment
+</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardTraversalIterator</span> <span class="special">&gt;</span>
+ <span class="identifier">sub_range</span><span class="special">(</span> <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">Begin</span><span class="special">,</span> <span class="identifier">ForwardTraversalIterator</span> <span class="identifier">End</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span> <span class="special">&gt;</span>
+ <span class="identifier">sub_range</span><span class="special">(</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span> <span class="special">&gt;</span>
+ <span class="identifier">sub_range</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">Range2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span> <span class="special">&gt;</span>
+ <span class="identifier">sub_range</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ForwardRange2</span> <span class="special">&gt;</span>
+ <span class="identifier">sub_range</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span> <span class="keyword">const</span> <span class="identifier">ForwardRange2</span><span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">);</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// Forward Range functions
+</span> <span class="identifier">iterator</span> <span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">const_iterator</span> <span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">iterator</span> <span class="identifier">end</span><span class="special">();</span>
+ <span class="identifier">const_iterator</span> <span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="comment">// convenience
+</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">front</span><span class="special">();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">front</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">back</span><span class="special">();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">back</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="comment">// for Random Access Range only:
+</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">[](</span> <span class="identifier">size_type</span> <span class="identifier">at</span> <span class="special">);</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">[](</span> <span class="identifier">size_type</span> <span class="identifier">at</span> <span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="comment">// rest of interface inherited from iterator_range
+</span> <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace 'boost'
+</span></pre>
+<p>
+ </p>
+<p>
+ 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 <code class="computeroutput"><span class="identifier">sub_range</span></code>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"hello"</span><span class="special">);</span>
+<span class="identifier">iterator_range</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">&gt;</span> <span class="identifier">ir</span> <span class="special">=</span> <span class="identifier">find_first</span><span class="special">(</span> <span class="identifier">str</span><span class="special">,</span> <span class="string">"ll"</span> <span class="special">);</span>
+<span class="identifier">sub_range</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="identifier">sub</span> <span class="special">=</span> <span class="identifier">find_first</span><span class="special">(</span> <span class="identifier">str</span><span class="special">,</span> <span class="string">"ll"</span> <span class="special">);</span>
+</pre>
+<p>
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="iterator_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../utilities.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="join.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: trunk/libs/range/doc/html/standalone_HTML.manifest
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/html/standalone_HTML.manifest 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,19 @@
+index.html
+range/concepts.html
+range/concepts/single_pass_range.html
+range/concepts/forward_range.html
+range/concepts/bidirectional_range.html
+range/concepts/random_access_range.html
+range/concepts/concept_checking.html
+range/reference.html
+range/reference/synopsis.html
+range/reference/semantics.html
+range/reference/extending.html
+range/utilities.html
+range/utilities/sub_range.html
+range/style_guide.html
+range/library_headers.html
+range/examples.html
+range/portability.html
+range/faq.html
+range/history_ack.html

Added: trunk/libs/range/doc/introduction.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/introduction.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,73 @@
+[section Introduction]
+
+Generic algorithms have so far been specified in terms of two or more iterators. Two iterators would together form a range of values that the algorithm could work on. This leads to a very general interface, but also to a somewhat clumsy use of the algorithms with redundant specification of container names. Therefore we would like to raise the abstraction level for algorithms so they specify their interface in terms of __ranges__ as much as possible.
+
+The most common form of ranges we are used to work with is standard library containers. However, one often finds it desirable to extend that code to work with other types that offer enough functionality to satisfy the needs of the generic code [*/if a suitable layer of indirection is applied/] . For example, raw arrays are often suitable for use with generic code that works with containers, provided a suitable adapter is used. Likewise, null terminated strings can be treated as containers of characters, if suitably adapted.
+
+This library therefore provides the means to adapt standard-like containers, null terminated strings, `std::pairs` of iterators, and raw arrays (and more), such that the same generic code can work with them all. The basic idea is to add another layer of indirection using __metafunctions__ and free-standing functions so syntactic and/or semantic differences can be removed.
+
+The main advantages are
+
+* simpler implementation and specification of generic range algorithms
+* more flexible, compact and maintainable client code
+* safe use of built-in arrays (for legacy code; why else would you use built-in arrays?)
+
+Below are given a small example (the complete example can be found [@http://www.boost.org/libs/range/test/algorithm_example.cpp here] ):
+
+``
+ //
+ // example: extracting bounds in a generic algorithm
+ //
+ template< class ForwardReadableRange, class T >
+ inline typename boost::range_iterator< ForwardReadableRange >::type
+ find( ForwardReadableRange& c, const T& value )
+ {
+ return std::find( boost::begin( c ), boost::end( c ), value );
+ }
+
+ template< class ForwardReadableRange, class T >
+ inline typename boost::range_iterator< const ForwardReadableRange >::type
+ find( const ForwardReadableRange& c, const T& value )
+ {
+ return std::find( boost::begin( c ), boost::end( c ), value );
+ }
+
+ //
+ // replace first value and return its index
+ //
+ template< class ForwardReadableWriteableRange, class T >
+ inline typename boost::range_size< ForwardReadableWriteableRange >::type
+ my_generic_replace( ForwardReadableWriteableRange& c, const T& value, const T& replacement )
+ {
+ typename boost::range_iterator< ForwardReadableWriteableRange >::type found = find( c, value );
+
+ if( found != boost::end( c ) )
+ *found = replacement;
+ return std::distance( boost::begin( c ), found );
+ }
+
+ //
+ // usage
+ //
+ const int N = 5;
+ std::vector<int> my_vector;
+ int values[] = { 1,2,3,4,5,6,7,8,9 };
+
+ my_vector.assign( values, boost::end( values ) );
+ typedef std::vector<int>::iterator iterator;
+ std::pair<iterator,iterator> my_view( boost::begin( my_vector ),
+ boost::begin( my_vector ) + N );
+ char str_val[] = "a string";
+ char* str = str_val;
+
+ std::cout << my_generic_replace( my_vector, 4, 2 );
+ std::cout << my_generic_replace( my_view, 4, 2 );
+ std::cout << my_generic_replace( str, 'a', 'b' );
+
+ // prints '3', '5' and '0'
+``
+
+By using the free-standing functions and __metafunctions__, the code automatically works for all the types supported by this library; now and in the future. Notice that we have to provide two versions of `find()` since we cannot forward a non-const rvalue with reference arguments (see this article about __the_forwarding_problem__ ).
+
+[endsect]
+

Added: trunk/libs/range/doc/istream_range.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/istream_range.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Boost.Range Utilities</title>
+ <link rel="stylesheet" href="style.css" type="text/css" />
+</head>
+
+ <body>
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range</h1></td>
+ </tr>
+ </table>
+ <a name="istream_range"></a> <h1>Function <code>istream_range</code></h1>
+ <p>
+ The intention of the <code>istream_range</code> function is to construct
+ a new range with a pair of <code>std::istream_iterator</code>s that wrap a
+ specified <code>std::basic_istream</code> instance.
+ </p>
+
+ <h3>Synopsis</h3>
+
+ <pre>
+<span class="keyword">namespace </span><span class="identifier">boost</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt; </span><span class="keyword">class </span><span class="identifier">
+ Type,</span><span class="identifier"> <span style="color: #0000ff">class <span style="color: #000000">
+ Elem</span><span style="color: #000000">, <span style="color: #0000ff">class <span
+ style="color: #000000">Traits </span></span></span></span></span><span class="special">&gt; <span style="color: #0000ff">inline</span>
+ </span><span class="keyword"></span><span class="identifier">range&lt; std::istream_iterator&lt;Type, Elem, Traits&gt; &gt;
+ istream_range(std::basic_istream&lt;Elem, Traits&gt;&amp; in);
+} </pre>
+
+ <p>
+ &copy; <a name="Copyright" id="Copyright">Copyright</a> Neil Groves 2009.
+</p>
+
+ <p>
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy
+ at <a href=
+ "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+
+
+ </body>
+</html>
+

Added: trunk/libs/range/doc/mfc_atl.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/mfc_atl.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,139 @@
+[def __mfc_collections__ [@http://msdn.microsoft.com/en-us/library/942860sh.aspx MFC Collection Classes]]
+[def __atl_collections__ [@http://msdn.microsoft.com/en-us/library/15e672bd.aspx ATL Collection Classes]]
+
+[section:mfc_atl MFC/ATL (courtesy of Shunsuke Sogame)]
+
+[h4 Introduction]
+This implementation was kindly donated by Shunsuke Sogame. This header adapts MFC and ATL containers to the appropriate Range concepts.
+
+[table
+ []
+ [[[*Author:]] [Shunsuke Sogame]]
+ [[[*Contact:]] [mb2act_at_[hidden]]]
+ [[[*Date:]] [26th of May 2006]]
+ [[[*Copyright:]] [Shunsuke Sogame 2005-2006. Use, modification and distribution is subject to the Boost Software License, Version 1.0]]
+]
+
+[h4 Overview]
+
+Boost.Range MFC/ATL Extension provides Boost.Range support for MFC/ATL collection and string types.
+
+``
+CTypedPtrArray<CPtrArray, CList<CString> *> myArray;
+...
+BOOST_FOREACH (CList<CString> *theList, myArray)
+{
+ BOOST_FOREACH (CString& str, *theList)
+ {
+ boost::to_upper(str);
+ std::sort(boost::begin(str), boost::end(str));
+ ...
+ }
+}
+``
+
+[section:requirements Requirements]
+
+* Boost C++ Libraries Version 1.34.0 or later (no compilation required)
+* Visual C++ 7.1 or later (for MFC and ATL)
+
+[endsect]
+
+[section:mfc_ranges MFC Ranges]
+If the `<boost/range/mfc.hpp>` is included before or after Boost.Range headers, the MFC collections and strings become models of Range. The table below lists the Traversal Category and `range_reference` of MFC ranges.
+
+[table
+ [[Range] [Traversal Category] [`range_reference<Range>::type`]]
+ [[`CArray<T,A>`] [__random_access_range__] [`T&`]]
+ [[`CList<T,A>`] [__bidirectional_range__] [`T&`]]
+ [[`CMap<K,AK,M,AM>`] [__forward_range__] [`Range::CPair&`]]
+ [[`CTypedPtrArray<B,T*>`] [__random_access_range__] [`T* const`]]
+ [[`CTypedPtrList<B,T*>`] [__bidirectional_range__] [`T* const`]]
+ [[`CTypedPtrMap<B,T*,V*>`] [__forward_range__] [`std::pair<T*,V*> const`]]
+ [[`CByteArray`] [__random_access_range__] [`BYTE&`]]
+ [[`CDWordArray`] [__random_access_range__] [`DWORD&`]]
+ [[`CObArray`] [__random_access_range__] [`CObject*&`]]
+ [[`CPtrArray`] [__random_access_range__] [`void*&`]]
+ [[`CStringArray`] [__random_access_range__] [`CString&`]]
+ [[`CUIntArray`] [__random_access_range__] [`UINT&`]]
+ [[`CWordArray`] [__random_access_range__] [`WORD&`]]
+ [[`CObList`] [__bidirectional_range__] [`CObject*&`]]
+ [[`CPtrList`] [__bidirectional_range__] [`void*&`]]
+ [[`CStringList`] [__bidirectional_range__] [`CString&`]]
+ [[`CMapPtrToWord`] [__forward_range__] [`std::pair<void*,WORD> const`]]
+ [[`CMapPtrToPtr`] [__forward_range__] [`std::pair<void*,void*> const`]]
+ [[`CMapStringToOb`] [__forward_range__] [`std::pair<String,CObject*> const`]]
+ [[`CMapStringToString`] [__forward_range__] [`Range::CPair&`]]
+ [[`CMapWordToOb`] [__forward_range__] [`std::pair<WORD,CObject*> const`]]
+ [[`CMapWordToPtr`] [__forward_range__] [`std::pair<WORD,void*> const`]]
+]
+
+Other Boost.Range metafunctions are defined by the following. Let `Range` be any type listed above and `Ref` be the same as `range_reference<Range>::type`. `range_value<Range>::type` is the same as `remove_reference<remove_const<Ref>::type>::type`, `range_difference<Range>::type` is the same as `std::ptrdiff_t`, and `range_pointer<Range>::type` is the same as `add_pointer<remove_reference<Ref>::type>::type`. As for `const Range`, see below.
+[endsect]
+
+[section:atl_ranges ATL Ranges]
+
+If the `<boost/range/atl.hpp>` is included before or after Boost.Range headers, the ATL collections and strings become models of Range. The table below lists the Traversal Category and `range_reference` of ATL ranges.
+
+[table
+ [[Range] [Traversal Category] [`range_reference<Range>::type`]]
+ [[`CAtlArray<E,ET>`] [__random_access_range__] [`E&`]]
+ [[`CAutoPtrArray<E>`] [__random_access_range__] [`E&`]]
+ [[`CInterfaceArray<I,pi>`] [__random_access_range__] [`CComQIPtr<I,pi>&`]]
+ [[`CAtlList<E,ET>`] [__bidirectional_range__] [`E&`]]
+ [[`CAutoPtrList<E>`] [__bidirectional_range__] [`E&`]]
+ [[`CHeapPtrList<E,A>`] [__bidirectional_range__] [`E&`]]
+ [[`CInterfaceList<I,pi>`] [__bidirectional_range__] [`CComQIPtr<I,pi>&`]]
+ [[`CAtlMap<K,V,KT,VT>`] [__forward_range__] [`Range::CPair&`]]
+ [[`CRBTree<K,V,KT,VT>`] [__bidirectional_range__] [`Range::CPair&`]]
+ [[`CRBMap<K,V,KT,VT>`] [__bidirectional_range__] [`Range::CPair&`]]
+ [[`CRBMultiMap<K,V,KT,VT>`] [__bidirectional_range__] [`Range::CPair&`]]
+ [[`CSimpleStringT<B,b>`] [__random_access_range__] [`B&`]]
+ [[`CStringT<B,ST>`] [__random_access_range__] [`B&`]]
+ [[`CFixedStringT<S,n>`] [__random_access_range__] [`range_reference<S>::type`]]
+ [[`CComBSTR`] [__random_access_range__] [`OLECHAR&`]]
+ [[`CSimpleArray<T,TE>`] [__random_access_range__] [`T&`]]
+]
+
+Other __boost_range_home__ metafunctions are defined by the following. Let `Range` be any type listed above and `Ref` be the same as `range_reference<Range>::type`. `range_value<Range>::type` is the same as `remove_reference<Ref>::type`, `range_difference<Range>::type` is the same as `std::ptrdiff_t`, and `range_pointer<Range>::type` is the same as `add_pointer<remove_reference<Ref>::type>::type`. As for `const Range`, see below.
+
+[endsect]
+
+[section:const_ranges const Ranges]
+
+`range_reference<const Range>::type` is defined by the following algorithm. Let `Range` be any type listed above and `Ref` be the same as `range_reference<Range>::type`.
+
+``
+if (Range is CObArray || Range is CObList)
+ return CObject const * &
+else if (Range is CPtrArray || Range is CPtrList)
+ return void const * &
+else if (there is a type X such that X& is the same as Ref)
+ return X const &
+else if (there is a type X such that X* const is the same as Ref)
+ return X const * const
+else
+ return Ref
+``
+
+
+Other Boost.Range metafunctions are defined by the following.
+
+[table
+ [[Range metafunction] [Result]]
+ [[`range_value<const Range>::type`] [`range_value<Range>::type`]]
+ [[`range_difference<const Range>::type`] [`std::ptrdiff_t`]]
+ [[`range_pointer<const Range>::type`] [`add_pointer<remove_reference<range_reference<const Range>::type>::type>::type`]]
+]
+
+[endsect]
+
+[section:references References]
+
+# __boost_range_home__
+# __mfc_collections__
+# __atl_collections__
+
+[endsect]
+
+[endsect]

Added: trunk/libs/range/doc/portability.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/portability.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+[section Portability]
+
+A huge effort has been made to port the library to as many compilers as possible.
+
+Full support for built-in arrays require that the compiler supports class template partial specialization. For non-conforming compilers there might be a chance that it works anyway thanks to workarounds in the type traits library.
+Visual C++ 6/7.0 has a limited support for arrays: as long as the arrays are of built-in type it should work.
+
+Notice also that some compilers cannot do function template ordering properly. 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.
+
+For maximum portability you should follow these guidelines:
+
+# do not use built-in arrays,
+# do not pass rvalues to __begin__`()`, __end__`()` and __iterator_range__ Range constructors and assignment operators,
+# use __const_begin__`()` and __const_end__`()` whenever your code by intention is read-only; this will also solve most rvalue problems,
+# do not rely on ADL:
+ * if you overload functions, include that header before the headers in this library,
+ * put all overloads in namespace boost.
+
+
+
+[endsect]
+

Added: trunk/libs/range/doc/reference.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,11 @@
+[section Reference]
+
+[include reference/overview.qbk]
+[include reference/synopsis.qbk]
+[include reference/semantics.qbk]
+[include reference/adaptors.qbk]
+[include reference/algorithms.qbk]
+[include reference/ranges.qbk]
+[include reference/extending.qbk]
+
+[endsect]

Added: trunk/libs/range/doc/reference/adaptors.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,205 @@
+[section:adaptors Range Adaptors]
+
+[section:adaptors_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
+
+``
+#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_iterator`s. 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|()`.
+
+[heading 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.
+
+[heading 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 );
+``
+
+[heading 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]
+
+[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( <see arguments below> )
+rng | boost::adaptors::transformed(fun)
+rng | boost::adaptors::uniqued
+``
+
+[endsect]
+
+[section:adaptors_general_requirements General Requirements]
+
+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.
+
+[endsect]
+
+[section:adaptors_reference Reference]
+[include adaptors/adjacent_filtered.qbk]
+[include adaptors/copied.qbk]
+[include adaptors/filtered.qbk]
+[include adaptors/indexed.qbk]
+[include adaptors/indirected.qbk]
+[include adaptors/map_keys.qbk]
+[include adaptors/map_values.qbk]
+[include adaptors/replaced.qbk]
+[include adaptors/replaced_if.qbk]
+[include adaptors/reversed.qbk]
+[include adaptors/sliced.qbk]
+[include adaptors/strided.qbk]
+[include adaptors/tokenized.qbk]
+[include adaptors/transformed.qbk]
+[include adaptors/uniqued.qbk]
+[endsect]
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/adaptors/adjacent_filtered.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/adjacent_filtered.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="adjacent_filtered"></a>
+ <h4><code>adjacent_filtered</code></h4>
+ <blockquote>
+ <pre> rng | boost::adaptors::adjacent_filtered( bi_pred )
+ </pre>
+ <pre> boost::make_adjacent_filtered_range( rng, bi_pred )
+ </pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is convertible to both argument types
+ of <code>bi_pred</code>.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all adjacent elements <code>[x,y]</code> in the returned range,
+ <code>bi_pred(x,y)</code> is <code>true</code>.
+ </li>
+ <li>
+ <b>Throws:</b>
+ Whatever the copy-constructor of bi_pred might throw.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/adjacent_filtered.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;functional&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | adjacent_filtered(std::not_equal_to&lt;<span class="keyword">int</span>&gt;()),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This would produce the output:<br />
+ <code>1,2,3,4,5,6</code><br />
+ </p>
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/adjacent_filtered.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/adjacent_filtered.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+[section:adjacent_filtered adjacent_filtered]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::adjacent_filtered(bi_pred)`]]
+ [[Function] [`boost::adaptors::adjacent_filter(rng, bi_pred)`]]
+]
+
+* [*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`
+
+[section:adjacent_filtered_example adjacent_filtered example]
+``
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <functional>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | adjacent_filtered(std::not_equal_to<int>()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+1,2,3,4,5,6
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/copied.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/copied.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="copied"></a>
+ <h4><code>copied</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::copied( n, m )</pre>
+ <pre>boost::make_copied_range( rng, n, m )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <code>0 &lt;= n &amp;&amp; n &lt;= m &amp;&amp; m &lt; distance(rng)</code>
+ </li>
+ <li>
+ <b>Returns:</b>
+ A new <code>iterator_range</code> that holds the sliced range
+ <code>[n,m)</code> of the original range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ RandomAccessRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/copied.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | copied(1, 5),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This would produce the output:
+ <code>2,3,4,5</code>
+ </p>
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/copied.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/copied.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+[section:copied copied]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::copied(n, m)`]]
+ [[Function] [`boost::adaptors::copy(rng, n, m)`]]
+]
+
+* [*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`
+
+[section:copied_example copied example]
+``
+#include <boost/range/adaptor/copied.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | copied(1, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+2,3,4,5
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/examples/adjacent_filtered.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/adjacent_filtered.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,23 @@
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <functinoal>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | adjacent_filtered(std::not_equal_to<int>()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/copied.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/copied.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/copied.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | copied(1, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/filtered.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/filtered.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,27 @@
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct is_even
+{
+ bool operator()(int x) const { return x % 2 == 0; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | filtered(is_even()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/indexed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/indexed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+#include <boost/range/adaptor/indexed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+template<typename Iterator>
+void display_element_and_index(Iterator first, Iterator last)
+{
+ for (Iterator it = first; it != last; ++it)
+ {
+ std::cout << "Element = " << *it
+ << " Index = " << it.index() << std::endl;
+ }
+}
+
+template<typename SinglePassRange>
+void display_element_and_index(const SinglePassRange& rng)
+{
+ display_element_and_index(boost::begin(rng), boost::end(rng));
+}
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 10,20,30,40,50,60,70,80,90;
+
+ display_element_and_index( input | indexed(0) );
+
+ return 0;
+]
+

Added: trunk/libs/range/doc/reference/adaptors/examples/indirected.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/indirected.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,23 @@
+#include <boost/range/adaptor/indirected.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/shared_ptr.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+
+ std::vector<boost::shared_ptr<int> > input;
+
+ for (int i = 0; i < 10; ++i)
+ input.push_back(boost::shared_ptr<int>(new int(i)));
+
+ boost::copy(
+ input | indirected,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/map_keys.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/map_keys.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,24 @@
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int, int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_keys,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/map_values.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/map_values.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,24 @@
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int, int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_values,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/replaced.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/replaced.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/replaced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,2,5,2,7,2,9;
+
+ boost::copy(
+ input | replaced(2, 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/replaced_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/replaced_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,26 @@
+#include <boost/range/adaptor/replaced_if.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct is_even
+{
+ bool operator()(int x) const { return x % 2 == 0; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | replaced_if(is_even(), 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}

Added: trunk/libs/range/doc/reference/adaptors/examples/reversed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/reversed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | reversed,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/sliced.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/sliced.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | sliced(2, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/strided.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/strided.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/strided.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | strided(2),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/tokenized.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/tokenized.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,19 @@
+#include <boost/range/adaptor/tokenized.hpp>
+#include <boost/range/algorithm_ext/push_back.hpp>
+#include <boost/assert.hpp>
+#include <algorithm>
+#include <string>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+
+ std::string input = " a b c d e f g hijklmnopqrstuvwxyz";
+ std::vector< boost::sub_match< std::string::iterator > > result;
+ boost::push_back(result, input | tokenized(boost::regex("\\b")));
+
+ BOOST_ASSERT( boost::size(result) == 16u );
+
+ return 0;
+}

Added: trunk/libs/range/doc/reference/adaptors/examples/transformed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/transformed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,28 @@
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct double_int
+{
+ typedef int result_type;
+ int operator()(int x) const { return x * 2; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | transformed(double_int()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/examples/uniqued.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/examples/uniqued.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,22 @@
+#include <boost/range/adaptor/uniqued.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | uniqued,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+

Added: trunk/libs/range/doc/reference/adaptors/filtered.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/filtered.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="filtered"></a>
+ <h4><code>filtered</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::filtered( pred )</pre>
+ <pre>boost::make_filtered_range( rng, pred )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is convertible to the argument type of
+ <code>pred</code>.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range,
+ <code>pred(x)</code> is <code>true</code>
+ </li>
+ <li>
+ <b>Throws:</b>
+ Whatever the copy-constructor of pred might throw.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ ForwardRange
+ </li>
+ <li>
+ <b>Returned Range Category:</b>
+ ForwardRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/filtered.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">struct</span> is_even
+ {
+ <span class="keyword">bool operator</span>()(<span class="keyword">int</span> x) <span class="keyword">const</span> { <span class="keyword">return</span> x % 2 == 0; }
+ };
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | filtered(is_even()),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This would produce the output: <br />
+ <code>2,4,6,8</code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/filtered.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/filtered.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+[section:filtered filtered]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::filtered(pred)`]]
+ [[Function] [`boost::adaptors::filter(rng, pred)`]]
+]
+
+* [*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`
+
+[section:filtered_example filtered example]
+``
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct is_even
+{
+ bool operator()( int x ) const { return x % 2 == 0; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | filtered(is_even()),
+ std::ostream_iterator<int>(std::cout, ","));
+}
+``
+[endsect]
+
+This would produce the output:
+``
+2,4,6,8
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/indexed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/indexed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="indexed"></a>
+ <h4><code>indexed</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::indexed</pre>
+ <pre>boost::make_indexed_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Returns:</b>
+ 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
+ <code>index()</code> member function that returns the appropriate
+ index for the element in the sequence corresponding with the
+ iterator.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/indexed.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">template</span>&lt;<span class="keyword">class</span> Iterator&gt;
+ void display_element_and_index(Iterator first, Iterator last)
+ {
+ <span class="keyword">for</span> (Iterator it = first; it != last; ++it)
+ {
+ std::cout << "Element = " << *it
+ << " Index = " << it.index() << std::endl;
+ }
+ }
+
+ <span class="keyword">template</span>&lt;<span class="keyword">class</span> SinglePassRange&gt;
+ void display_element_and_index(<span class="keyword">const</span> SinglePassRange& rng)
+ {
+ display_element_and_index(boost::begin(rng), boost::end(rng));
+ }
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 10,20,30,40,50,60,70,80,90;
+
+ display_element_and_index( input | indexed(0) );
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ Element = 10 Index = 0 <br />
+ Element = 20 Index = 1 <br />
+ Element = 30 Index = 2 <br />
+ Element = 40 Index = 3 <br />
+ Element = 50 Index = 4 <br />
+ Element = 60 Index = 5 <br />
+ Element = 70 Index = 6 <br />
+ Element = 80 Index = 7 <br />
+ Element = 90 Index = 8 <br />
+ </code>
+ </p>
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/indexed.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/indexed.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,86 @@
+[section:indexed indexed]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::indexed`]]
+ [[Function] [`boost::adaptors::index(rng)`]]
+]
+
+* [*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`
+
+[section:indexed_example indexed example]
+``
+#include <boost/range/adaptor/indexed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+template<class Iterator>
+void display_element_and_index(Iterator first, Iterator last)
+{
+ for (Iterator it = first; it != last; ++it)
+ {
+ std::cout << "Element = " << *it << " Index = " << it.index() << std::endl;
+ }
+}
+
+template<class SinglePassRange>
+void display_element_and_index(const SinglePassRange& rng)
+{
+ display_element_and_index(boost::begin(rng), boost::end(rng));
+}
+
+template<class Iterator1, class Iterator2>
+void check_element_and_index(
+ Iterator1 test_first,
+ Iterator1 test_last,
+ Iterator2 reference_first,
+ Iterator2 reference_last)
+{
+ BOOST_CHECK_EQUAL( std::distance(test_first, test_last),
+ std::distance(reference_first, reference_last) );
+
+ int reference_index = 0;
+
+ Iterator1 test_it = test_first;
+ Iterator2 reference_it = reference_first;
+ for (; test_it != test_last; ++test_it, ++reference_it, ++reference_index)
+ {
+ BOOST_CHECK_EQUAL( *test_it, *reference_it );
+ BOOST_CHECK_EQUAL( test_it.index(), reference_index );
+ }
+}
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 10,20,30,40,50,60,70,80,90;
+
+ display_element_and_index( input | indexed(0) );
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+Element = 10 Index = 0
+Element = 20 Index = 1
+Element = 30 Index = 2
+Element = 40 Index = 3
+Element = 50 Index = 4
+Element = 60 Index = 5
+Element = 70 Index = 6
+Element = 80 Index = 7
+Element = 90 Index = 8
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/indirected.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/indirected.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="indirected"></a>
+ <h4><code>indirected</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::indirected</pre>
+ <pre>boost::make_indirected_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range defines unary <code>operator*()</code>
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range,
+ <code>x</code> is the result of <code>*y</code> where
+ <code>y</code> is the corresponding element in the original range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/indirected.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/shared_ptr.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::vector&lt;boost::shared_ptr&lt;<span class="keyword">int</span>&gt; &gt; input;
+
+ <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i < 10; ++i)
+ input.push_back(boost::shared_ptr&lt;<span class="keyword">int</span>&gt;(<span class="keyword">new int</span>(i)));
+
+ boost::copy(
+ input | indirected,
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>0,1,2,3,4,5,6,7,8,9</code>
+ </p>
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/indirected.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/indirected.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,46 @@
+[section:indirected indirected]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::indirected`]]
+ [[Function] [`boost::adaptors::indirect(rng)`]]
+]
+
+* [*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`
+
+[section:indirected_example indirected example]
+``
+#include <boost/range/adaptor/indirected.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/shared_ptr.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+
+ std::vector<boost::shared_ptr<int> > input;
+
+ for (int i = 0; i < 10; ++i)
+ input.push_back(boost::shared_ptr<int>(new int(i)));
+
+ boost::copy(
+ input | indirected,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+0,1,2,3,4,5,6,7,8,9
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/map_keys.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/map_keys.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="map_keys"></a>
+ <h4><code>map_keys</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::map_keys</pre>
+ <pre>boost::make_map_key_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is an instantiation of std::pair.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range,
+ <code>x</code> is the result of <code>y.first</code> where
+ <code>y</code> is the corresponding element in the original range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/map.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;map&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::map&lt;<span class="keyword">int</span>,<span class="keyword">int</span>&gt; input;
+ <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_keys,
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 0,1,2,3,4,5,6,7,8,9
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/map_keys.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/map_keys.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+[section:map_keys map_keys]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::map_keys`]]
+ [[Function] [`boost::adaptors::keys(rng)`]]
+]
+
+* [*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`
+
+[section:map_keys_example map_keys example]
+``
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int,int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_keys,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+0,1,2,3,4,5,6,7,8,9
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/map_values.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/map_values.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="map_values"></a>
+ <h4><code>map_values</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::map_values</pre>
+ <pre>boost::make_map_value_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is an instantiation of std::pair.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range,
+ <code>x</code> is the result of <code>y.second</code> where
+ <code>y</code> is the corresponding element in the original range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/map.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;map&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::assign;
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::map&lt;<span class="keyword">int</span>,<span class="keyword">int</span>&gt; input;
+ <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_values,
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 0,10,20,30,40,50,60,70,80,90
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/map_values.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/map_values.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+[section:map_values map_values]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::map_values`]]
+ [[Function] [`boost::adaptors::values(rng)`]]
+]
+
+* [*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`
+
+[section:map_values_example map_values example]
+``
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int,int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_values,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+0,10,20,30,40,50,60,70,80,90
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/replaced.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/replaced.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="replaced"></a>
+ <h4><code>replaced</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::replaced( new_value, old_value )</pre>
+ <pre>boost::make_replaced_range( rng, new_value, old_value )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <ul>
+ <li>
+ <code>new_value</code> is convertible to the value-type of
+ the range.
+ </li>
+ <li>
+ <code>old_value</code> is convertible to the value-type of
+ the range.
+ </li>
+ </ul>
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range, the value
+ <code>x</code> is equal to the value of
+ <code>(y == old_value) ? new_value : y</code>
+ where <code>y</code> is the corresponding element in the original
+ range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ ForwardRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/replaced.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,2,5,2,7,2,9;
+
+ boost::copy(
+ input | replaced(2, 10),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 1,10,3,10,5,10,7,10,9
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/replaced.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/replaced.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,47 @@
+[section:replaced replaced]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::replaced(new_value, old_value)`]]
+ [[Function] [`boost::adaptors::replace(rng, new_value, old_value)`]]
+]
+
+* [*Precondition:]
+ * `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`
+
+[section:replaced_example replaced example]
+``
+#include <boost/range/adaptor/replaced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,2,5,2,7,2,9;
+
+ boost::copy(
+ input | replaced(2, 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+1,10,3,10,5,10,7,10,9
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/replaced_if.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/replaced_if.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="replaced_if"></a>
+ <h4><code>replaced_if</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::replaced_if( pred, new_value )</pre>
+ <pre>boost::make_replaced_if_range( rng, pred, new_value )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <ul>
+ <li>
+ The range value-type is convertible to the argument type
+ of <code>pred</code>.
+ </li>
+ <li>
+ <code>new_value</code> is convertible to the value-type
+ of the range.
+ </li>
+ </ul>
+ </li>
+ <li>
+ <b>Postconditions:</b>
+ For all elements <code>[x]</code> in the returned range, the value
+ <code>x</code> is equal to the value of
+ <code>pred(y) ? new_value : y</code>
+ where <code>y</code> is the corresponding element in the original
+ range.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ ForwardRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/replaced_if.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">struct</span> is_even
+ {
+ <span class="keyword">bool operator</span>()(<span class="keyword">int</span> x) <span class="keyword">const</span> { <span class="keyword">return</span> x % 2 == 0; }
+ };
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | replaced_if(is_even(), 10),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 1,10,3,10,5,10,7,10,9
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/replaced_if.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/replaced_if.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+[section:replaced_if replaced_if]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::replaced_if(pred, new_value)`]]
+ [[Function] [`boost::adaptors::replace_if(rng, pred, new_value)`]]
+]
+
+* [*Precondition:]
+ * 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`
+
+[section:replaced_if_example replaced_if example]
+``
+#include <boost/range/adaptor/replaced_if.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct is_even
+{
+ bool operator()(int x) const { return x % 2 == 0; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | replaced_if(is_even(), 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+1,10,3,10,5,10,7,10,9
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/reversed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/reversed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="reversed"></a>
+ <h4><code>reversed</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::reversed</pre>
+ <pre>boost::make_reversed_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Returns:</b>
+ A range whose iterators behave as if they were the original
+ iterators wrapped in <code>reverse_iterator</code>.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ BidirectionalRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/reversed.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | reversed,
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 9,8,7,6,5,4,3,2,1
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/reversed.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/reversed.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,44 @@
+[section:reversed reversed]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::reversed`]]
+ [[Function] [`boost::adaptors::reverse(rng)`]]
+]
+
+* [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`.
+* [*Range Category:] `BidirectionalRange`
+
+[section:reversed_example reversed example]
+``
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+void reversed_example_test()
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | reversed,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+9,8,7,6,5,4,3,2,1
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/sliced.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/sliced.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="sliced"></a>
+ <h4><code>sliced</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::sliced( n, m )</pre>
+ <pre>boost::make_sliced_range( rng, n, m )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <code>0 <= n && n <= m && m < distance(rng)</code>
+ </li>
+ <li>
+ <b>Returns:</b>
+ <code>make_range(rng, n, m)</code>
+ </li>
+ <li>
+ <b>Range Category:</b>
+ RandomAccessRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/sliced.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | sliced(2, 5),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 3,4,5
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/sliced.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/sliced.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+[section:sliced sliced]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::sliced(n, m)`]]
+ [[Function] [`boost::adaptors::slice(rng, n, m)`]]
+]
+
+* [*Precondition:] `0 <= n && n <= m && m < distance(rng)`
+* [*Returns:] `make_range(rng, n, m)`
+* [*Range Category:] `RandomAccessRange`
+
+[section:sliced_example sliced example]
+``
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | sliced(2, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+3,4,5
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/strided.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/strided.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="strided"></a>
+ <h4><code>strided</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::strided( n )</pre>
+ <pre>boost::make_strided_range( rng, n )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <code>0 <= n && n &lt;= distance(rng)</code>
+ </li>
+ <li>
+ <b>Returns:</b>
+ A new range based on <code>rng</code> where traversal is performed in steps of <code>n</code>.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ RandomAccessRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/strided.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | strided(2),
+ std::ostream_iterator&lt;<span class="keyword">int</span>&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output:
+ <code>
+ 1,3,5,7,9
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/strided.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/strided.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+[section:strided strided]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::strided(n)`]]
+ [[Function] [`boost::adaptors::stride(rng, n)`]]
+]
+
+* [*Precondition:] `0 <= n && n < distance(rng)`
+* [*Returns:] A new range based on `rng` where traversal is performed in steps of `n`.
+* [*Range Category:] `RandomAccessRange`
+
+[section:strided_example strided example]
+``
+#include <boost/range/adaptor/strided.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | strided(2),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+1,3,5,7,9
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/tokenized.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/tokenized.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="tokenized"></a>
+ <h4><code>tokenized</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::tokenized( regex )</pre>
+ <pre>rng | boost::adaptors::tokenized( regex, i )</pre>
+ <pre>rng | boost::adaptors::tokenized( regex, rndRng )</pre>
+ <pre>rng | boost::adaptors::tokenized( regex, i, flags )</pre>
+ <pre>rng | boost::adaptors::tokenized( regex, rndRng, flags )</pre>
+ <pre>boost::make_tokenized_range( rng, regex, i, flags )</pre>
+ <pre>boost::make_tokenized_range( rng, regex, rngRng, flags )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ <ul>
+ <li>
+ Let <code>T</code> denote
+ <code>typename range_value< decltype(rng) >::type</code>,
+ then <code>regex</code> has the type
+ <code>basic_regex&lt;T&gt;</code> or is
+ implicitly convertible to one of these types.
+ </li>
+ <li>
+ <code>i</code> has the type <code>int</code>.
+ </li>
+ <li>
+ the value-type of <code>rndRng</code> is <code>int</code>.
+ </li>
+ <li>
+ <code>flags</code> has the type
+ <code>regex_constants::syntax_option_type</code>.
+ </li>
+ </ul>
+ </li>
+ <li>
+ <b>Returns:</b>
+ A range whose iterators behave as if they were the
+ original iterators wrapped in <code>regex_token_iterator</code>.
+ The first iterator in the range would be constructed by
+ forwarding all the arguments of <code>tokenized()</code> to the
+ <code>regex_token_iterator</code> constructor.
+ </li>
+ <li>
+ <b>Throws:</b>
+ Whatever constructing and copying equivalent
+ <code>regex_token_iterator</code>s might throw.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ RandomAccessRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/tokenized.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm_ext/push_back.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/assert.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;string&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv)
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+
+ std::string input = "a b c d e f g hijklmnopqrstuvwxyz";
+ std::vector< boost::sub_match< std::string::iterator > > result;
+ boost::push_back(result, input | tokenized(boost::regex("\\b")));
+
+ BOOST_ASSERT( boost::size(result) == 16u );
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/tokenized.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/tokenized.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,42 @@
+[section:tokenized tokenized]
+
+[table
+ [[Syntax] [Code]]
+ [
+ [Pipe]
+ [
+ ``
+ rng | boost::adaptors::tokenized(regex)
+ rng | boost::adaptors::tokenized(regex, i)
+ rng | boost::adaptors::tokenized(regex, rndRng)
+ rng | boost::adaptors::tokenized(regex, i, flags)
+ rng | boost::adaptors::tokenized(regex, rndRng, flags)
+ ``
+ ]
+ ]
+ [
+ [Function]
+ [
+ ``
+ boost::adaptors::tokenize(rng, regex)
+ boost::adaptors::tokenize(rng, regex, i)
+ boost::adaptors::tokenize(rng, regex, rndRng)
+ boost::adaptors::tokenize(rng, regex, i, flags)
+ boost::adaptors::tokenize(rng, regex, rndRng, flags)
+ ``
+ ]
+ ]
+]
+
+* [*Precondition:]
+ * Let `T` denote `typename range_value<decltype(rng)>::type`, then `regex` has the type `basic_regex<T>` or is implicitly convertible to one of these types.
+ * `i` has the type `int`.
+ * the `value_type` of `rndRng` is `int`.
+ * `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`
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/transformed.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/transformed.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="transformed"></a>
+ <h4><code>transformed</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::transformed( fun )</pre>
+ <pre>boost::make_transformed_range( rng, fun )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is convertible to the argument type
+ of fun.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all elements <code>x</code> in the returned range,
+ <code>x</code> is the result of <code>fun(y)</code> where
+ <code>y</code> is the corresponding element in the original range.
+ </li>
+ <li>
+ <b>Throws:</b>
+ Whatever the copy-constructor of <code>fun</code> might throw.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ SinglePassRange
+ </li>
+ </ul>
+ <hr />
+ <h3>Example</h3>
+ <pre>
+ <span class="keyword">#include</span> &lt;boost/range/adaptor/transformed.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/algorithm/copy.hpp&gt;
+ <span class="keyword">#include</span> &lt;boost/range/assign.hpp&gt;
+ <span class="keyword">#include</span> &lt;algorithm&gt;
+ <span class="keyword">#include</span> &lt;iostream&gt;
+ <span class="keyword">#include</span> &lt;vector&gt;
+
+ <span class="keyword">struct</span> double_int
+ {
+ <span class="keyword">typedef int</span> result_type;
+ <span class="keyword">int operator</span>()(<span class="keyword">int</span> x) <span class="keyword">const</span> { <span class="keyword">return</span> x * 2; }
+ };
+
+ <span class="keyword">int</span> main(<span class="keyword">int</span> argc, <span class="keyword">const char</span>* argv[])
+ {
+ <span class="keyword">using namespace</span> boost::adaptors;
+ <span class="keyword">using namespace</span> boost::assign;
+
+ std::vector&lt;<span class="keyword">int</span>&gt; input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | transformed(double_int()),
+ std::ostream_iterator&lt;int&gt;(std::cout, ","));
+
+ <span class="keyword">return</span> 0;
+ }
+ </pre>
+ <p>
+ This produces the output: <br />
+ <code>
+ 2,4,6,8,10,12,14,16,18,20
+ </code>
+ </p>
+
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/transformed.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/transformed.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+[section:transformed transformed]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::transformed(fun)`]]
+ [[Function] [`boost::adaptors::transform(rng, fun)`]]
+]
+
+* [*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`
+
+[section:transformed_example transformed example]
+``
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+struct double_int
+{
+ typedef int result_type;
+ int operator()(int x) const { return x * 2; }
+};
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | transformed(double_int()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+``
+[endsect]
+
+This would produce the output:
+``
+2,4,6,8,10,12,14,16,18,20
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/adaptors/uniqued.html
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/uniqued.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Boost.Range Range Adaptors </title>
+ <link rel="stylesheet" href="../style.css" type="text/css">
+</head>
+
+ <body>
+
+ <table border="0" >
+ <tr>
+ <td ><img src="../../../boost.png" border="0" /></td>
+ <td ><h1 align="center">Boost.Range </h1></td>
+ </tr>
+ </table>
+
+ <h2> Range Adaptors </h2>
+
+ <hr />
+ <a name="uniqued"></a>
+ <h4><code>uniqued</code></h4>
+ <blockquote>
+ <pre>rng | boost::adaptors::uniqued</pre>
+ <pre>boost::make_uniqued_range( rng )</pre>
+ </blockquote>
+ <ul>
+ <li>
+ <b>Precondition:</b>
+ The value-type of the range is comparable with
+ <code>operator==()</code>.
+ </li>
+ <li>
+ <b>Postcondition:</b>
+ For all adjacent elements <code>[x,y]</code> in the returned range,
+ <code>x==y</code> is false.
+ </li>
+ <li>
+ <b>Range Category:</b>
+ ForwardRange
+ </li>
+ </ul>
+
+ <hr />
+ <h3>Example</h3>
+
+ <pre>
+ #include &lt;boost/range/adaptor/uniqued.hpp&gt;
+ #include &lt;boost/range/algorithm/copy.hpp&gt;
+ #include &lt;boost/assign.hpp&gt;
+ #include &lt;algorithm&gt;
+ #include &lt;iostream&gt;
+ #include &lt;vector&gt;
+
+ int main(int argc, const char* argv)
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector&lt;int&gt; input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | uniqued,
+ std::ostream_iterator&lt;int&gt;(std::cout, ",") );
+
+ return 0;
+ }
+ </pre>
+ <p>
+ This would produce the output:<br />
+ <code>1,2,3,4,5,6</code><br />
+ </p>
+ <hr />
+ <p>
+ (C) Copyright Neil Groves 2009
+ (C) Copyright Thorsten Ottosen 2003-2004
+ </p>
+
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ <br />
+ </body>
+</html>
+

Added: trunk/libs/range/doc/reference/adaptors/uniqued.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/adaptors/uniqued.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,43 @@
+[section:uniqued uniqued]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::uniqued`]]
+ [[Function] [`boost::adaptors::unique(rng)`]]
+]
+
+* [*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`
+
+[section:uniqued_example uniqued example]
+``
+#include <boost/range/adaptor/uniqued.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+void uniqued_example_test()
+{
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | uniqued,
+ std::ostream_iterator<int>(std::cout, ","));
+}
+``
+[endsect]
+
+This would produce the output:
+``
+1,2,3,4,5,6
+``
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/adjacent_find.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/adjacent_find.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,80 @@
+[section:adjacent_find Range Algorithm - adjacent_find]
+
+[heading Prototype]
+
+``
+template<class ForwardRange>
+typename range_iterator<ForwardRange>::type
+adjacent_find(ForwardRange& rng);
+
+template<class ForwardRange>
+typename range_iterator<const ForwardRange>::type
+adjacent_find(const ForwardRange& rng);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<ForwardRange>::type
+adjacent_find(ForwardRange& rng, BinaryPred pred);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<const ForwardRange>::type
+adjacent_find(const ForwardRange& rng, BinaryPred pred);
+
+template<range_return_value_re, class ForwardRange>
+typename range_return<ForwardRange, re>::type
+adjacent_find(ForwardRange& rng);
+
+template<range_return_value_re, class ForwardRange>
+typename range_return<const ForwardRange, re>::type
+adjacent_find(const ForwardRange& rng);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<ForwardRange, re>::type
+adjacent_find(ForwardRange& rng, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<const ForwardRange, re>::type
+adjacent_find(const ForwardRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+[*Non-predicate versions:]
+
+`adjacent_find` finds the first adjacent elements `[x,y]` in `rng` where `x == y`
+
+[*Predicate versions:]
+
+`adjacent_find` finds the first adjacent elements `[x,y]` in `rng` where `pred(x,y)` is `true`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/adjacent_find.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions of adjacent_find:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange`'s value type is a model of the `EqualityComparableConcept`.
+
+[*For the predicate versions of adjacent_find:]
+
+* `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 and to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+Linear. If `empty(rng)` then no comparisons are performed; otherwise, at most `distance(rng) - 1` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/binary_search.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/binary_search.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+[section:binary_search binary_search]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class Value>
+bool binary_search(const ForwardRange& rng, const Value& val);
+
+template<class ForwardRange, class Value, class BinaryPredicate>
+bool binary_search(const ForwardRange& rng, const Value& val, BinaryPredicate pred);
+``
+
+[heading Description]
+
+`binary_search` returns `true` if and only if the value `val` exists in the range `rng`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/binary_search.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions of binary_search:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `Value` is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `Value` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* `ForwardRange`'s value type is the same type as `Value`.
+
+[*For the predicate versions of binary_search:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `ForwardRange`'s value type is the same type as `Value`.
+* `ForwardRange`'s value type is convertible to `BinaryPredicate`'s argument type.
+
+[heading Precondition:]
+
+[*For the non-predicate version:]
+
+`rng` is ordered in ascending order according to `operator<`.
+
+[*For the predicate version:]
+
+`rng` is ordered in ascending order according to the function object `pred`.
+
+[heading Complexity]
+
+For non-random-access ranges, the complexity is `O(N)` where `N` is `distance(rng)`.
+
+For random-access ranges, the complexity is `O(log N)` where `N` is `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/copy.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/copy.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+[section:copy Range Algorithm - copy]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange, class OutputIterator>
+OutputIterator copy(const SinglePassRange& source_rng, OutputIterator out_it);
+``
+
+[heading Description]
+
+`copy` copies all elements from `source_rng` to the range `[out_it, out_it + distance(source_rng))`.
+The return value is `out_it + distance(source_rng)`
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/copy.hpp`
+
+[heading Requirements]
+
+* `SinglePassRange` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* The `value_type` of __single_pass_range__ Concept is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+* `out_it` is not an iterator within the `source_rng`.
+* `[out_it, out_it + distance(source_rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. Exactly `distance(source_rng)` assignments are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/copy_backward.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/copy_backward.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,41 @@
+[section:copy_backward Range Algorithm - copy_backward]
+
+[heading Prototype]
+
+``
+template<class BidirectionalRange, class BidirectionalOutputIterator>
+ BidirectionalOutputIterator
+ copy_backward(const BidirectionalRange& source_rng,
+ BidirectionalOutputIterator out_it);
+``
+
+[heading Description]
+
+`copy_backward` copies all elements from `source_rng` to the range `[out_it - distance(source_rng), out_it)`.
+
+The values are copied in reverse order. The return value is `out_it - distance(source_rng)`.
+
+Note well that unlike all other standard algorithms `out_it` denotes the *end* of the output sequence.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/copy_backward.hpp`
+
+[heading Requirements]
+
+* `BidirectionalRange` is a model of __bidirectional_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* The `value_type` of __bidirectional_range__ Concept is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+* `out_it` is not an iterator within the `source_rng`.
+* `[out_it, out_it + distance(source_rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. Exactly `distance(source_rng)` assignments are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/count.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/count.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+[section:count count]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange, class Value>
+typename range_difference<SinglePassRange>::type
+count(SinglePassRange& rng, const Value& val);
+
+template<class SinglePassRange, class Value>
+typename range_difference<const SinglePassRange>::type
+count(const SinglePassRange& rng, const Value& val);
+``
+
+[heading Description]
+
+`count` returns the number of elements `x` in `rng` where `x == val` is `true`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/count.hpp`
+
+[heading Requirements]
+
+* `SinglePassRange` is a model of the __single_pass_range__ Concept.
+* `Value` is a model of the `EqualityComparableConcept`.
+* `SinglePassRange`'s value type is a model of the `EqualityComparableConcept`.
+* An object of `SinglePassRange`'s value type can be compared for equality with an object of type `Value`.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/equal.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/equal.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,59 @@
+[section:equal equal]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2
+>
+bool equal(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+>
+bool equal(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`equal` returns `true` if `distance(rng1)` is equal to the `distance(rng2)` and for each element `x` in `rng1`, the corresponding element `y` in `rng2` is equal. Otherwise `false` is returned.
+
+In this range version of `equal` it is perfectly acceptable to pass in two ranges of unequal lengths.
+
+Elements are considered equal in the non-predicate version if `operator==` returns `true`. Elements are considered equal in the predicate version if `pred(x,y)` is `true`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/equal.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange1`'s value type is a model of the `EqualityComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `EqualityComparableConcept`.
+* `SinglePassRange1`'s value type can be compared for equality with `SinglePassRange2`'s value type.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+Linear. At most `min(distance(rng1), distance(rng2))` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/equal_range.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/equal_range.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,78 @@
+[section:equal_range equal_range]
+
+[heading Prototype]
+
+``
+template<
+ class ForwardRange,
+ class Value
+ >
+std::pair<typename range_iterator<ForwardRange>::type,
+ typename range_iterator<ForwardRange>::type>
+equal_range(ForwardRange& rng, const Value& val);
+
+template<
+ class ForwardRange,
+ class Value
+ >
+std::pair<typename range_iterator<const ForwardRange>::type,
+ typename range_iterator<const ForwardRange>::type>
+equal_range(const ForwardRange& rng, const Value& val);
+
+template<
+ class ForwardRange,
+ class Value,
+ class SortPredicate
+ >
+std::pair<typename range_iterator<ForwardRange>::type,
+ typename range_iterator<ForwardRange>::type>
+equal_range(ForwardRange& rng, const Value& val, SortPredicate pred);
+
+template<
+ class ForwardRange,
+ class Value,
+ class SortPredicate
+ >
+std::pair<typename range_iterator<const ForwardRange>::type,
+ typename range_iterator<const ForwardRange>::type>
+equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred);
+ ``
+
+[heading Description]
+
+`equal_range` returns a range in the form of a pair of iterators where all of the elements are equal to `val`. If no values are found that are equal to `val`, then an empty range is returned, hence `result.first == result.second`. For the non-predicate versions of `equal_range` the equality of elements is determined by `operator<`.
+For the predicate versions of `equal_range` the equality of elements is determined by `pred`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/equal_range.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `Value` is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `Value` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* `ForwardRange`'s value type is the same type as `Value`.
+
+[*For the predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `SortPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `ForwardRange`'s value type is the same as `Value`.
+* `ForwardRange`'s value type is convertible to both of `SortPredicate`'s argument types.
+
+[heading Precondition:]
+
+For the non-predicate versions: `rng` is ordered in ascending order according to `operator<`.
+
+For the predicate versions: `rng` is ordered in ascending order according to `pred`.
+
+[heading Complexity]
+
+For random-access ranges, the complexity is `O(log N)`, otherwise the complexity is `O(N)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/fill.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/fill.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,34 @@
+[section:fill Range Algorithm - fill]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class Value>
+void fill( ForwardRange& rng, const Value& val );
+
+template<class ForwardRange, class Value>
+void fill( const ForwardRange& rng, const Value& val );
+``
+
+[heading Description]
+
+`fill` assigns the value `val` to every element in the range `rng`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/fill.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `Value` is a model of the `AssignableConcept`.
+* `Value` is convertible to `ForwardRange`'s value type.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)` assignments are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/find.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/find.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,52 @@
+[section:find find]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange, class Value>
+typename range_iterator<SinglePassRange>::type
+find(SinglePassRange& rng, Value val);
+
+template<class SinglePassRange, class Value>
+typename range_iterator<const SinglePassRange>::type
+find(const SinglePassRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class SinglePassRange,
+ class Value
+ >
+typename range_return<SinglePassRange, re>::type
+find(SinglePassRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class SinglePassRange,
+ class Value
+ >
+typename range_return<const SinglePassRange, re>::type
+find(const SinglePassRange& rng, Value val);
+``
+
+[heading Description]
+
+The versions of `find` that return an iterator, returns the first iterator in the range `rng` such that `*i == value`. `end(rng)` is returned if no such iterator exists.
+The versions of find 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/find.hpp`
+
+[heading Requirements]
+
+* `SinglePassRange` is a model of the __single_pass_range__ Concept.
+* `Value` is a model of the `EqualityComparableConcept`.
+* The `operator==` is defined for type `Value` to be compared with the `SinglePassRange`'s value type.
+
+[heading Complexity]
+
+Linear. At most `distance(rng)` comparisons for equality.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/find_end.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/find_end.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+[section:find_end find_end]
+
+[heading Prototype]
+
+``
+template<class ForwardRange1, class ForwardRange2>
+typename range_iterator<ForwardRange1>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<class ForwardRange1, class ForwardRange2>
+typename range_iterator<const ForwardRange1>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<ForwardRange1>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<const ForwardRange1>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2
+ >
+typename range_return<ForwardRange1, re>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2
+ >
+typename range_return<const ForwardRange1, re>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<ForwardRange1, re>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<const ForwardRange1, re>::type
+find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `find_end` that return an iterator, return an iterator to the beginning of the last sub-sequence equal to `rng2` within `rng1`.
+Equality is determined by `operator==` for non-predicate versions of `find_end`, and by satisfying `pred` in the predicate versions. The versions of `find_end` 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/find_end.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `ForwardRange1` is a model of the __forward_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `ForwardRange1`'s value type is a model of the `EqualityComparableConcept`.
+* `ForwardRange2`'s value type is a model of the `EqualityComparableConcept`.
+* Objects of `ForwardRange1`'s value type can be compared for equality with objects of `ForwardRange2`'s value type.
+
+[*For the predicate versions:]
+
+* `ForwardRange1` is a model of the __forward_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `ForwardRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `ForwardRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+The number of comparisons is proportional to `distance(rng1) * distance(rng2)`. If both `ForwardRange1` and `ForwardRange2` are models of `BidirectionalRangeConcept` then the average complexity is linear and the worst case is `distance(rng1) * distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/find_first_of.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/find_first_of.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+[section:find_first_of find_first_of]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange1, class ForwardRange2>
+typename range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2);
+
+template<class SinglePassRange1, class ForwardRange2>
+typename range_iterator<const SinglePassRange1>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ class SinglePassRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ class SinglePassRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<const SinglePassRange1>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+
+template<
+ range_return_value re,
+ class SinglePassRange1,
+ class ForwardRange2
+ >
+typename range_return<SinglePassRange1, re>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class SinglePassRange1,
+ class ForwardRange2
+ >
+typename range_return<const SinglePassRange1, re>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class SinglePassRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<SinglePassRange1, re>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class SinglePassRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<const SinglePassRange1, re>::type
+find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `find_first_of` that return an iterator, return an iterator to the first occurrence in `rng1` of any of the elements in `rng2`.
+Equality is determined by `operator==` for non-predicate versions of `find_first_of`, and by satisfying `pred` in the predicate versions.
+
+The versions of `find_first_of` 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/find_first_of.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `SinglePassRange1`'s value type is a model of the `EqualityComparableConcept`, and can be compared for equality with `ForwardRange2`'s value type.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `ForwardRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+At most `distance(rng1) * distance(rng2)` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/find_if.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/find_if.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,57 @@
+[section:find_if find_if]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange, class UnaryPredicate>
+typename range_iterator<SinglePassRange>::type
+find_if(SinglePassRange& rng, UnaryPredicate pred);
+
+template<class SinglePassRange, class UnaryPredicate>
+typename range_iterator<const SinglePassRange>::type
+find_if(const SinglePassRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class SinglePassRange,
+ class UnaryPredicate
+ >
+typename range_return<SinglePassRange, re>::type
+find_if(SinglePassRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class SinglePassRange,
+ class UnaryPredicate
+ >
+typename range_return<const SinglePassRange, re>::type
+find_if(const SinglePassRange& rng, UnaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `find_if` that return an iterator, returns the first iterator in the range `rng` such that `pred(*i)` is `true`. `end(rng)` is returned if no such iterator exists.
+
+The versions of `find_if` 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/find_if.hpp`
+
+[heading Requirements]
+
+* `SinglePassRange` is a model of the __single_pass_range__ Concept.
+* `UnaryPredicate` is a model of the `PredicateConcept`.
+* The value type of `SinglePassRange` is convertible to the argument type of `UnaryPredicate`.
+
+[heading Precondition:]
+
+For each iterator `i` in `rng`, `*i` is in the domain of `UnaryPredicate`.
+
+[heading Complexity]
+
+Linear. At most `distance(rng)` invocations of `pred`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/for_each.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/for_each.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,40 @@
+[section:for_each for_each]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange,
+ class UnaryFunction
+ >
+UnaryFunction for_each(SinglePassRange& rng, UnaryFunction fun);
+
+template<
+ class SinglePassRange,
+ class UnaryFunction
+ >
+UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun);
+``
+
+[heading Description]
+
+`for_each` traverses forward through `rng` and for each element `x` it invokes `fun(x)`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/for_each.hpp`
+
+[heading Requirements]
+
+* `SinglePassRange` is a model of the __single_pass_range__ Concept.
+* `UnaryFunction` is a model of the `UnaryFunctionConcept`.
+* `UnaryFunction` does not apply any non-constant operation through its argument.
+* `SinglePassRange`'s value type is convertible to `UnaryFunction`'s argument type.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)` applications of `UnaryFunction`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/generate.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/generate.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,39 @@
+[section:generate Range Algorithm - generate]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class Generator>
+ForwardRange& generate( ForwardRange& rng, Generator gen );
+
+template<class ForwardRange, class Generator>
+const ForwardRange& generate( const ForwardRange& rng, Generator gen );
+``
+
+[heading Description]
+
+`generate` assigns the result of `gen()` to each element in range `rng`. Returns the resultant range.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/generate.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `Generator` is a model of the `GeneratorConcept`.
+* The `value_type` of `SinglePassRange` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+* `out_it` is not an iterator within `rng`.
+* `[out_it, out_it + distance(rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)` assignments are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/includes.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/includes.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+[section:includes includes]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange1, class SinglePassRange2>
+bool includes(const SinglePassRange1& rng1, const SinglePassRange2& rng2);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+bool includes(const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`includes` returns `true` if and only if, for every element in `rng2`, an equivalent element is also present in `rng1`.
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/inplace_merge.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/inplace_merge.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,72 @@
+[section:inplace_merge Range Algorithm - inplace_merge]
+
+[heading Prototype]
+
+``
+template<class BidirectionalRange>
+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,
+ typename range_iterator<const BidirectionalRange>::type middle,
+ BinaryPredicate pred );
+``
+
+[heading Description]
+
+`inplace_merge` combines two consecutive sorted ranges `[begin(rng), middle)` and `[middle, end(rng))` into a single sorted range `[begin(rng), end(rng))`. That is, it starts with a range `[begin(rng), end(rng))` that consists of two pieces each of which is in ascending order, and rearranges it so that the entire range is in ascending order. `inplace_merge` is stable, meaning both that the relative order of elements within each input range is preserved.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/inplace_merge.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate version:]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `range_value<BidirectionalRange>::type` is a model of `LessThanComparableConcept`
+* The ordering on objects of `range_type<BidirectionalRange>::type` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate version:]
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `BidirectionalRange`'s value type is convertible to both `BinaryPredicate`'s argument types.
+
+[heading Precondition:]
+
+[heading For the non-predicate version:]
+
+* `middle` is in the range `rng`.
+* `[begin(rng), middle)` is in ascending order. That is for each pair of adjacent elements `[x,y]`, `y < x` is `false`.
+* `[middle, end(rng))` is in ascending order. That is for each pair of adjacent elements `[x,y]`, `y < x` is `false`.
+
+[heading For the predicate version:]
+
+* `middle` is in the range `rng`.
+* `[begin(rng), middle)` is in ascending order. That is for each pair of adjacent elements `[x,y]`, `pred(y,x) == false`.
+* `[middle, end(rng))` is in ascending order. That is for each pair of adjacent elements `[x,y]`, `pred(y,x) == false`.
+
+[heading Complexity]
+
+Worst case: `O(N log(N))`
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/lexicographical_compare.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/lexicographical_compare.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+[section:lexicographical_compare lexicographical_compare]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2
+ >
+bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+bool lexicographical_compare(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`lexicographical_compare` compares element by element `rng1` against `rng2`. If the element from `rng1` is less than the element from `rng2` then `true` is returned. If the end of `rng1` without reaching the end of `rng2` this also causes the return value to be `true`. The return value is `false` in all other circumstances. The elements are compared using `operator<` in the non-predicate versions of `lexicographical_compare` and using `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/lexicographical_compare.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions of lexicographical_compare:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* Let `x` be an object of `SinglePassRange1`'s value type. Let `y` be an obect of `SinglePassRange2`'s value type. `x < y` must be valid. `y < x` must be valid.
+
+[*For the predicate versions of lexicographical_compare:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+Linear. At most `2 * min(distance(rng1), distance(rng2))` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/lower_bound.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/lower_bound.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,80 @@
+[section:lower_bound lower_bound]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class Value>
+typename range_iterator<ForwardRange>::type
+lower_bound(ForwardRange& rng, Value val);
+
+template<class ForwardRange, class Value>
+typename range_iterator<const ForwardRange>::type
+lower_bound(const ForwardRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<ForwardRange, re>::type
+lower_bound(ForwardRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<const ForwardRange, re>::type
+lower_bound(const ForwardRange& rng, Value val);
+``
+
+[heading Description]
+
+The versions of `lower_bound` that return an iterator, returns the first iterator in the range `rng` such that:
+without predicate - `*i < value` is `false`,
+with predicate - `pred(*i, value)` is `false`.
+
+`end(rng)` is returned if no such iterator exists.
+
+The versions of `lower_bound` 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/lower_bound.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `Value` is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `Value` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* `ForwardRange`'s value type is the same type as `Value`.
+
+[*For the predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `ForwardRange`'s value type is the same type as `Value`.
+* `ForwardRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng` is sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng` is sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+For ranges that model the __random_access_range__ concept the complexity is `O(log N)`, where `N` is `distance(rng)`.
+
+For all other range types the complexity is `O(N)`.
+
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/make_heap.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/make_heap.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+[section:make_heap make_heap]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void make_heap(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+void make_heap(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class Compare>
+void make_heap(RandomAccessRange& rng, Compare pred);
+
+template<class RandomAccessRange, class Compare>
+void make_heap(const RandomAccessRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`make_heap` turns `rng` into a heap.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/heap_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Complexity]
+
+Linear. At most `3 * distance(rng)` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/max_element.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/max_element.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,81 @@
+[section:max_element max_element]
+
+[heading Prototype]
+
+``
+template<class ForwardRange>
+typename range_iterator<ForwardRange>::type
+max_element(ForwardRange& rng);
+
+template<class ForwardRange>
+typename range_iterator<const ForwardRange>::type
+max_element(const ForwardRange& rng);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<ForwardRange>::type
+max_element(ForwardRange& rng, BinaryPredicate pred);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<const ForwardRange>::type
+max_element(const ForwardRange& rng, BinaryPredicate pred);
+
+
+template<
+ range_return_value re,
+ class ForwardRange
+ >
+typename range_return<ForwardRange, re>::type
+max_element(ForwardRange& rng);
+
+template<
+ range_return_value_re,
+ class ForwardRange
+ >
+typename range_return<const ForwardRange, re>::type
+max_element(const ForwardRange& rng);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<ForwardRange, re>::type
+max_element(ForwardRange& rng, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<const ForwardRange, re>::type
+max_element(const ForwardRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `max_element` that return an iterator, return the iterator to the maximum value as determined by using `operator<` if a predicate is not supplied. Otherwise the predicate `pred` is used to determine the maximum value. The versions of `max_element` 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/max_element.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 `LessThanComparableConcept`.
+
+[*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 both of `BinaryPredicate`'s argument types.
+
+[heading Complexity]
+
+Linear. Zero comparisons if `empty(rng)`, otherwise `distance(rng) - 1` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/merge.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/merge.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,83 @@
+[section:merge Range Algorithm - merge]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator
+ >
+OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryPredicate
+ >
+OutputIterator merge(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`merge` combines two sorted ranges `rng1` and `rng2` into a single sorted range by copying elements. `merge` is stable. The return value is `out + distance(rng1) + distance(rng2)`.
+
+The two versions of `merge` differ by how they compare the elements.
+
+The non-predicate version uses the `operator<()` for the range value type. The predicate version uses the predicate instead of `operator<()`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/merge.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate version:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `range_value<SinglePassRange1>::type` is the same as `range_value<SinglePassRange2>::type`.
+* `range_value<SinglePassRange1>::type` is a model of the `LessThanComparableConcept`.
+* The ordering on objects of `range_value<SinglePassRange1>::type` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* `range_value<SinglePassRange1>::type` is convertible to a type in `OutputIterator`'s set of value types.
+
+[*For the predicate version:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `range_value<SinglePassRange1>::type` is the same as `range_value<SinglePassRange2>::type`.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to both `BinaryPredicate`'s argument types.
+* `range_value<SinglePassRange1>::type` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+[heading For the non-predicate version:]
+
+* The elements of `rng1` are in ascending order. That is, for each adjacent element pair `[x,y]` of `rng1`, `y < x == false`.
+* The elements of `rng2` are in ascending order. That is, for each adjacent element pair `[x,y]` of `rng2`, `y < x == false`.
+* The ranges `rng1` and `[out, out + distance(rng1) + distance(rng2))` do not overlap.
+* The ranges `rng2` and `[out, out + distance(rng1) + distance(rng2))` do not overlap.
+* `[out, out + distance(rng1) + distance(rng2))` is a valid range.
+
+[heading For the predicate version:]
+
+* The elements of `rng1` is in ascending order. That is, for each adjacent element pair `[x,y]`, of `rng1`, `pred(y, x) == false`.
+* The elements of `rng2` is in ascending order. That is, for each adjacent element pair `[x,y]`, of `rng2`, `pred(y, x) == false`.
+* The ranges `rng1` and `[out, out + distance(rng1) + distance(rng2))` do not overlap.
+* The ranges `rng2` and `[out, out + distance(rng1) + distance(rng2))` do not overlap.
+* `[out, out + distance(rng1) + distance(rng2))` is a valid range.
+
+[heading Complexity]
+
+Linear. There are no comparisons if both `rng1` and `rng2` are empty, otherwise at most `distance(rng1) + distance(rng2) - 1` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/min_element.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/min_element.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,81 @@
+[section:min_element min_element]
+
+[heading Prototype]
+
+``
+template<class ForwardRange>
+typename range_iterator<ForwardRange>::type
+min_element(ForwardRange& rng);
+
+template<class ForwardRange>
+typename range_iterator<const ForwardRange>::type
+min_element(const ForwardRange& rng);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<ForwardRange>::type
+min_element(ForwardRange& rng, BinaryPredicate pred);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_iterator<const ForwardRange>::type
+min_element(const ForwardRange& rng, BinaryPredicate pred);
+
+
+template<
+ range_return_value re,
+ class ForwardRange
+ >
+typename range_return<ForwardRange, re>::type
+min_element(ForwardRange& rng);
+
+template<
+ range_return_value_re,
+ class ForwardRange
+ >
+typename range_return<const ForwardRange, re>::type
+min_element(const ForwardRange& rng);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<ForwardRange, re>::type
+min_element(ForwardRange& rng, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class BinaryPredicate
+ >
+typename range_return<const ForwardRange, re>::type
+min_element(const ForwardRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `min_element` that return an iterator, return the iterator to the minimum value as determined by using `operator<` if a predicate is not supplied. Otherwise the predicate `pred` is used to determine the minimum value. The versions of `min_element` 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/min_element.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 `LessThanComparableConcept`.
+
+[*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 both of `BinaryPredicate`'s argument types.
+
+[heading Complexity]
+
+Linear. Zero comparisons if `empty(rng)`, otherwise `distance(rng) - 1` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/mismatch.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/mismatch.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,116 @@
+[section:mismatch mismatch]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange1, class SinglePassRange2>
+std::pair<
+ typename range_iterator<SinglePassRange1>::type,
+ typename range_iterator<const SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2);
+
+template<class SinglePassRange1, class SinglePassRange2>
+std::pair<
+ typename range_iterator<const SinglePassRange1>::type,
+ typename range_iterator<const SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2);
+
+template<class SinglePassRange1, class SinglePassRange2>
+std::pair<
+ typename range_iterator<SinglePassRange1>::type,
+ typename range_iterator<SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2);
+
+template<class SinglePassRange1, class SinglePassRange2>
+std::pair<
+ typename range_iterator<const SinglePassRange1>::type,
+ typename range_iterator<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2);
+
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+std::pair<
+ typename range_iterator<SinglePassRange1>::type,
+ typename range_iterator<const SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+std::pair<
+ typename range_iterator<const SinglePassRange1>::type,
+ typename range_iterator<const SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+std::pair<
+ typename range_iterator<SinglePassRange1>::type,
+ typename range_iterator<SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2,
+ BinaryPredicate pred);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryPredicate
+ >
+std::pair<
+ typename range_iterator<const SinglePassRange1>::type,
+ typename range_iterator<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `mismatch` that return an iterator, return an iterator to the first position where `rng1` and `rng2` differ.
+
+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`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange1`'s value type is a model of the `EqualityComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `EqualityComparableConcept`.
+* `SinglePassRange1`s value type can be compared for equality with `SinglePassRange2`'s value type.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Precondition:]
+
+`distance(rng2) >= distance(rng1)`
+
+[heading Complexity]
+
+Linear. At most `distance(rng1)` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/next_permutation.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/next_permutation.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+[section:next_permutation next_permutation]
+
+[heading Prototype]
+
+``
+template<class BidirectionalRange>
+void next_permutation(BidirectionalRange& rng);
+
+template<class BidirectionalRange>
+void next_permutation(const BidirectionalRange& rng);
+
+template<class BidirectionalRange, class Compare>
+void next_permutation(BidirectionalRange& rng, Compare pred);
+
+template<class BidirectionalRange, class Compare>
+void next_permutation(const BidirectionalRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`next_permutation` transforms the range of elements `rng` into the lexicographically next greater permutation of the elements if such a permutation exists. If one does not exist then the range is transformed into the lexicographically smallest permutation and `false` is returned. `true` is returned when the next greater permutation is successfully generated.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/permutation.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `BidirectionalRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `BidirectionalRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `BidirectionalRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Complexity]
+
+Linear. At most `distance(rng) / 2` swaps.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/nth_element.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/nth_element.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+[section:nth_element Range Algorithm - nth_element]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void nth_element(RandomAccessRange& rng,
+ typename range_iterator<RandomAccessRange>::type nth);
+
+template<class RandomAccessRange>
+void nth_element(const RandomAccessRange& rng,
+ typename range_iterator<const RandomAccessRange>::type nth);
+
+template<class RandomAccessRange>
+void nth_element(RandomAccessRange& rng,
+ typename range_iterator<RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred);
+
+template<class RandomAccessRange>
+void nth_element(const RandomAccessRange& rng,
+ typename range_iterator<const RandomAccessRange>::type nth,
+ BinaryPredicate sort_pred);
+``
+
+[heading Description]
+
+`nth_element` partially orders a range of elements. `nth_element` arranges the range `rng` 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.
+
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/nth_element.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate version:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering relation on `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+
+[*For the predicate version:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+
+[heading Complexity]
+
+On average, linear in `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/partial_sort.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/partial_sort.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,60 @@
+[section:partial_sort Range Algorithm - partial_sort]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void partial_sort(RandomAccessRange& rng,
+ typename range_iterator<RandomAccessRange>::type middle);
+
+template<class RandomAccessRange>
+void partial_sort(const RandomAccessRange& rng,
+ typename range_iterator<const RandomAccessRange>::type middle);
+
+template<class RandomAccessRange>
+void partial_sort(RandomAccessRange& rng,
+ typename range_iterator<RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred);
+
+template<class RandomAccessRange>
+void partial_sort(const RandomAccessRange& rng,
+ typename range_iterator<const RandomAccessRange>::type middle,
+ BinaryPredicate sort_pred);
+``
+
+[heading Description]
+
+`partial_sort` rearranges the elements in `rng`. It places the smallest `distance(begin(rng), middle)` elements, sorted in ascending order, into the range `[begin(rng), middle)`. The remaining elements are placed in an unspecified order into `[middle, last)`.
+
+The non-predicative versions of this function specify that one element is less than another by using `operator<()`. The predicate versions use the predicate instead.
+
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/partial_sort.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate version:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering relation on `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+
+[*For the predicate version:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+
+[heading Complexity]
+
+Approximately `distance(rng) * log(distance(begin(rng), middle))` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/partition.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/partition.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+[section:partition Range Algorithm - partition]
+
+[heading Prototype]
+
+``
+template<
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_iterator<ForwardRange>::type
+partition(ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_iterator<const ForwardRange>::type
+partition(const ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_return<ForwardRange, re>::type
+partition(ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_return<const ForwardRange, re>::type
+partition(const ForwardRange& rng, UnaryPredicate pred);
+``
+
+[heading Description]
+
+`partition` orders the elements in `rng` based on `pred`, such that the elements that satisfy `pred` precede the elements that do not. In the versions that return a single iterator, the return value is the middle iterator. In the versions that have a configurable range_return, `found` corresponds to the middle iterator.
+
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/partition.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `UnaryPredicate` is a model of the `PredicateConcept`.
+* `ForwardRange`'s value type is convertible to `UnaryPredicate`'s argument type.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)` applications of `pred`, and at most `distance(rng) / 2` swaps.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/pop_heap.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/pop_heap.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,56 @@
+[section:pop_heap pop_heap]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void pop_heap(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+void pop_heap(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class Compare>
+void pop_heap(RandomAccessRange& rng, Compare pred);
+
+template<class RandomAccessRange, class Compare>
+void pop_heap(const RandomAccessRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`pop_heap` removes the largest element from the heap. It is assumed that `begin(rng), prior(end(rng))` is already a heap and that the element to be added is `*prior(end(rng))`.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/heap_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Precondition:]
+
+* `!empty(rng)`
+* `rng` is a heap.
+
+[heading Complexity]
+
+Logarithmic. At most `2 * log(distance(rng))` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/prev_permutation.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/prev_permutation.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,51 @@
+[section:prev_permutation prev_permutation]
+
+[heading Prototype]
+
+``
+template<class BidirectionalRange>
+void prev_permutation(BidirectionalRange& rng);
+
+template<class BidirectionalRange>
+void prev_permutation(const BidirectionalRange& rng);
+
+template<class BidirectionalRange, class Compare>
+void prev_permutation(BidirectionalRange& rng, Compare pred);
+
+template<class BidirectionalRange, class Compare>
+void prev_permutation(const BidirectionalRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`prev_permutation` transforms the range of elements `rng` into the lexicographically next smaller permutation of the elements if such a permutation exists. If one does not exist then the range is transformed into the lexicographically largest permutation and `false` is returned. `true` is returned when the next smaller permutation is successfully generated.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/permutation.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `BidirectionalRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `BidirectionalRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `BidirectionalRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Complexity]
+
+Linear. At most `distance(rng) / 2` swaps.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/push_heap.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/push_heap.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,56 @@
+[section:push_heap push_heap]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void push_heap(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+void push_heap(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class Compare>
+void push_heap(RandomAccessRange& rng, Compare pred);
+
+template<class RandomAccessRange, class Compare>
+void push_heap(const RandomAccessRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`push_heap` adds an element to a heap. It is assumed that `begin(rng)`, `prior(end(rng))` is already a heap and that the element to be added is `*prior(end(rng))`.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/heap_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Precondition:]
+
+* `!empty(rng)`
+* `[begin(rng), prior(end(rng)))` is a heap.
+
+[heading Complexity]
+
+Logarithmic. At most `log(distance(rng))` comparisons.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/random_shuffle.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/random_shuffle.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,50 @@
+[section:random_shuffle Range Algorithm - random_shuffle]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+RandomAccessRange& random_shuffle(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+const RandomAccessRange& random_shuffle(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class Generator>
+RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen);
+
+template<class RandomAccessRange, class Generator>
+const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen);
+``
+
+[heading Description]
+
+`random_shuffle` randomly rearranges the elements in `rng`. The versions of `random_shuffle` that do not specify a `Generator` use an internal random number generator. The versions of `random_shuffle` that do specify a `Generator` use this instead. Returns the shuffles range.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/random_shuffle.hpp`
+
+[heading Requirements]
+
+[*For the version without a Generator:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+
+[*For the version with a Generator:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `Generator` is a model of the `RandomNumberGeneratorConcept`.
+* `RandomAccessRange`'s distance type is convertible to `Generator`'s argument type.
+
+[heading Precondition:]
+
+* `distance(rng)` is less than `gen`'s maximum value.
+
+
+[heading Complexity]
+
+Linear. If `!empty(rng)`, exactly `distance(rng) - 1` swaps are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/remove.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/remove.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+[section:remove Range Algorithm - remove]
+
+[heading Prototype]
+
+``
+template<
+ class ForwardRange,
+ class Value
+ >
+typename range_iterator<ForwardRange>::type
+remove(ForwardRange& rng, const Value& val);
+
+template<
+ class ForwardRange,
+ class Value
+ >
+typename range_iterator<const ForwardRange>::type
+remove(const ForwardRange& rng, const Value& val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<ForwardRange,re>::type
+remove(ForwardRange& rng, const Value& val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<const ForwardRange,re>::type
+remove(const ForwardRange& rng, const Value& val);
+``
+
+[heading Description]
+
+`remove` removes from `rng` all of the elements `x` for which `x == val` is `true`. The versions of `remove` that return an iterator, return an iterator `new_last` such that the range `[begin(rng), new_last)` contains no elements equal to `val`. The `range_return` versions of `remove` defines `found` as the new last element. The iterators in the range `[new_last, end(rng))` are dereferenceable, but the elements are unspecified.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/remove.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` performs exactly `distance(rng)` comparisons for equality.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/remove_if.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/remove_if.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+[section:remove_if Range Algorithm - remove_if]
+
+[heading Prototype]
+
+``
+template<
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_iterator<ForwardRange>::type
+remove(ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_iterator<const ForwardRange>::type
+remove(const ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_return<ForwardRange,re>::type
+remove(ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+ >
+typename range_return<const ForwardRange,re>::type
+remove(const ForwardRange& rng, UnaryPredicate pred);
+``
+
+[heading Description]
+
+`remove_if` removes from `rng` all of the elements `x` for which `pred(x)` is `true`. The versions of `remove_if` that return an iterator, return an iterator `new_last` such that the range `[begin(rng), new_last)` contains no elements where `pred(x)` is `true`. The iterators in the range `[new_last, end(rng))` are dereferenceable, but the elements are unspecified.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/remove_if.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `UnaryPredicate` is a model of the `PredicateConcept`.
+* `ForwardRange`'s value type is convertible to `UnaryPredicate`'s argument type.
+
+[heading Complexity]
+
+Linear. `remove_if` performs exactly `distance(rng)` applications of `pred`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/replace.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/replace.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,41 @@
+[section:replace Range Algorithm - replace]
+
+[heading Prototype]
+
+``
+template<
+ class ForwardRange,
+ class Value
+ >
+ForwardRange& replace(ForwardRange& rng, const Value& what, const Value& with_what);
+
+template<
+ class ForwardRange,
+ class UnaryPredicate
+ >
+const ForwardRange& replace(const ForwardRange& rng, const Value& what, const Value& with_what);
+``
+
+[heading Description]
+
+`replace` every element in `rng` equal to `what` with `with_what`. Return a reference to `rng`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/replace.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`.
+* `Value` is a model of the `EqualityComparableConcept`, and may be compared for equality with objects of `ForwardRange`'s value type.
+
+[heading Complexity]
+
+Linear. `replace` performs exactly `distance(rng)` comparisons for equality and at most `distance(rng)` assignments.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/replace_if.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/replace_if.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,36 @@
+[section:replace_if Range Algorithm - replace_if]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class UnaryPredicate, class Value>
+ForwardRange& replace_if(ForwardRange& rng, UnaryPredicate pred, const Value& with_what);
+
+template<class ForwardRange, class UnaryPredicate, class Value>
+const ForwardRange& replace_if(const ForwardRange& rng, UnaryPredicate pred, const Value& with_what);
+``
+
+[heading Description]
+
+`replace_if` replaces every element `x` in `rng` for which `pred(x) == true` with `with_what`. Returns a reference to `rng`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/replace_if.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `UnaryPredicate` is a model of the `PredicateConcept`
+* `ForwardRange`'s value type is convertible to `UnaryPredicate`'s argument type.
+* `Value` is convertible to `ForwardRange`'s value type.
+* `Value` is a model of the `AssignableConcept`.
+
+[heading Complexity]
+
+Linear. `replace_if` performs exactly `distance(rng)` applications of `pred`, and at most `distance(rng)` assignments.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/reverse.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/reverse.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+[section:reverse Range Algorithm - reverse]
+
+[heading Prototype]
+
+``
+template<class BidirectionalRange>
+BidirectionalRange& reverse(BidirectionalRange& rng);
+
+template<class BidirectionalRange>
+const BidirectionalRange& reverse(const BidirectionalRange& rng);
+``
+
+[heading Description]
+
+`reverse` reverses a range. Returns a reference to the reversed range.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/reverse.hpp`
+
+[heading Requirements]
+
+* `BidirectionalRange` is a model of the __bidirectional_range__ Concept.
+* `BidirectionalRange` is mutable.
+
+[heading Complexity]
+
+Linear. `reverse` makes `distance(rng)/2` calls to `iter_swap`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/rotate.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/rotate.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,39 @@
+[section:rotate Range Algorithm - rotate]
+
+[heading Prototype]
+
+``
+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);
+``
+
+[heading 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`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/rotate.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+
+[heading Precondition:]
+
+* `[begin(rng), middle)` is a valid range.
+* `[middle, end(rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. At most `distance(rng)` swaps are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/search.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/search.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,101 @@
+[section:search search]
+
+[heading Prototype]
+
+``
+template<class ForwardRange1, class ForwardRange2>
+typename range_iterator<ForwardRange1>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<class ForwardRange1, class ForwardRange2>
+typename range_iterator<const ForwardRange1>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<ForwardRange1>::type,
+search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_iterator<const ForwardRange1>::type
+search(const ForwardRange1& rng1, ForwardRange2& rng2, BinaryPredicate pred);
+
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2
+ >
+typename range_return<ForwardRange1, re>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2
+ >
+typename range_return<const ForwardRange1, re>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<ForwardRange1, re>::type,
+search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange1,
+ class ForwardRange2,
+ class BinaryPredicate
+ >
+typename range_return<const ForwardRange1, re>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred);
+``
+
+[heading Description]
+
+The versions of `search` that return an iterator, return an iterator to the start of the first subsequence in `rng1` that is equal to the subsequence `rng2`. The `end(rng1)` is returned if no such subsequence exists in `rng1`.
+Equality is determined by `operator==` for non-predicate versions of `search`, and by satisfying `pred` in the predicate versions.
+
+The versions of `search` 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/search.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `ForwardRange1` is a model of the __forward_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `ForwardRange1`'s value type is a model of the `EqualityComparableConcept`.
+* `ForwardRange2`'s value type is a model of the `EqualityComparableConcept`.
+* `ForwardRange1`s value type can be compared for equality with `ForwardRange2`'s value type.
+
+[*For the predicate versions:]
+
+* `ForwardRange1` is a model of the __forward_range__ Concept.
+* `ForwardRange2` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `ForwardRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `ForwardRange2`'s value type is convertible to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+Average complexity is Linear. Worst-case complexity is quadratic.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/set_difference.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/set_difference.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,76 @@
+[section:set_difference set_difference]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator
+ >
+OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryPredicate
+ >
+OutputIterator set_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`set_difference` constructs a sorted range that is the set difference of the sorted ranges `rng1` and `rng2`. The return value is the end of the output range.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/set_intersection.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/set_intersection.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,76 @@
+[section:set_intersection set_intersection]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator
+ >
+OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryPredicate
+ >
+OutputIterator set_intersection(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`set_intersection` constructs a sorted range that is the intersection of the sorted ranges `rng1` and `rng2`. The return value is the end of the output range.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/set_symmetric_difference.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/set_symmetric_difference.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,78 @@
+[section:set_symmetric_difference set_symmetric_difference]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator
+ >
+OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryPredicate
+ >
+OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred);
+``
+
+[heading Description]
+
+`set_symmetric_difference` constructs a sorted range that is the set symmetric difference of the sorted ranges `rng1` and `rng2`. The return value is the end of the output range.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/set_union.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/set_union.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,75 @@
+[section:set_union set_union]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator
+ >
+OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryPredicate
+ >
+OutputIterator set_union(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryPredicate pred);
+ ``
+
+[heading Description]
+
+`set_union` constructs a sorted range that is the union of the sorted ranges `rng1` and `rng2`. The return value is the end of the output range.
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
+* `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `SinglePassRange1` and `SinglePassRange2` have the same value type.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
+* `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng1` and `rng2` are sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/sort.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/sort.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,53 @@
+[section:sort Range Algorithm - sort]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+RandomAccessRange& sort(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+const RandomAccessRange& sort(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class BinaryPredicate>
+RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred);
+
+template<class RandomAccessRange, class BinaryPredicate>
+const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+`sort` sorts the elements in `rng` into ascending order. `sort` is not guaranteed to be stable. Returns the sorted range.
+
+For versions of the `sort` function without a predicate, ascending order is defined by `operator<()` such that for all adjacent elements `[x,y]`, `y < x == false`.
+
+For versions of the `sort` function with a predicate, ascending order is defined by `pred` such that for all adjacent elements `[x,y]`, `pred(y, x) == false`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/sort.hpp`
+
+[heading Requirements]
+
+[*For versions of sort without a predicate:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering relation on `RandomAccessRange`'s value type is a [*strict weak ordering], as defined in the `LessThanComparableConcept` requirements.
+
+[*For versions of sort with a predicate]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+[heading Complexity]
+
+`O(N log(N))` comparisons (both average and worst-case), where `N` is `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/sort_heap.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/sort_heap.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+[section:sort_heap sort_heap]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+void sort_heap(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+void sort_heap(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class Compare>
+void sort_heap(RandomAccessRange& rng, Compare pred);
+
+template<class RandomAccessRange, class Compare>
+void sort_heap(const RandomAccessRange& rng, Compare pred);
+``
+
+[heading Description]
+
+`sort_heap` turns a heap into a sorted range.
+
+The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/heap_algorithm.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `RandomAccessRange`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+
+[*For the predicate versions:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `Compare` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `Compare`'s argument types.
+
+[heading Precondition:]
+
+`rng` is a heap.
+
+[heading Complexity]
+
+At most `N * log(N)` comparisons, where `N` is `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/stable_partition.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/stable_partition.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,56 @@
+[section:stable_partition Range Algorithm - stable_partition]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class UnaryPredicate>
+typename range_iterator<ForwardRange>::type
+stable_partition(ForwardRange& rng, UnaryPredicate pred);
+
+template<class ForwardRange, class UnaryPredicate>
+typename range_iterator<const ForwardRange>::type
+stable_partition(const ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+>
+typename range_return<ForwardRange, re>::type
+stable_partition(ForwardRange& rng, UnaryPredicate pred);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class UnaryPredicate
+>
+typename range_return<const ForwardRange, re>::type
+stable_partition(const ForwardRange& rng, UnaryPredicate pred);
+``
+
+[heading Description]
+
+`stable_partition` reorders the elements in the range `rng` base on the function object `pred`. Once this function has completed all of the elements that satisfy `pred` appear before all of the elements that fail to satisfy it. `stable_partition` differs from `partition` because it preserves relative order. It is table.
+
+For the versions that return an iterator, the return value is the iterator to the first element that fails to satisfy `pred`.
+
+For versions that return a `range_return`, the `found` iterator is the iterator to the first element that fails to satisfy `pred`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/stable_partition.hpp`
+
+[heading Requirements]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `UnaryPredicate` is a model of the `PredicateConcept`.
+
+[heading Complexity]
+
+Best case: `O(N)` where `N` is `distance(rng)`.
+Worst case: `N * log(N)` swaps, where `N` is `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/stable_sort.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/stable_sort.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,54 @@
+[section:stable_sort Range Algorithm - stable_sort]
+
+[heading Prototype]
+
+``
+template<class RandomAccessRange>
+RandomAccessRange& stable_sort(RandomAccessRange& rng);
+
+template<class RandomAccessRange>
+const RandomAccessRange& stable_sort(const RandomAccessRange& rng);
+
+template<class RandomAccessRange, class BinaryPredicate>
+RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate pred);
+
+template<class RandomAccessRange, class BinaryPredicate>
+const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+`stable_sort` sorts the elements in `rng` into ascending order. `stable_sort` is guaranteed to be stable. The order is preserved for equivalent elements.
+
+For versions of the `stable_sort` function without a predicate ascending order is defined by `operator<()` such that for all adjacent elements `[x,y]`, `y < x == false`.
+
+For versions of the `stable_sort` function with a predicate, ascending order is designed by `pred` such that for all adjacent elements `[x,y]`, `pred(y,x) == false`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/stable_sort.hpp`
+
+[heading Requirements]
+
+[*For versions of stable_sort without a predicate]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `RandomAccessRange`'s value type is a model of the `LessThanComparableConcept`.
+* The ordering relation on `RandomAccessRange`'s value type is a [*strict weak ordering], as defined in the `LessThanComparableConcept` requirements.
+
+[*For versions of stable_sort with a predicate:]
+
+* `RandomAccessRange` is a model of the __random_access_range__ Concept.
+* `RandomAccessRange` is mutable.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `RandomAccessRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+[heading Complexity]
+
+Best case: `O(N)` where `N` is `distance(rng)`.
+Worst case: `O(N log(N)^2)` comparisons, where `N` is `distance(rng)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/transform.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/transform.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,83 @@
+[section:transform Range Algorithm - transform]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class OutputIterator,
+ class UnaryOperation
+>
+OutputIterator transform(const SinglePassRange1& rng,
+ OutputIterator out,
+ UnaryOperation fun);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class OutputIterator,
+ class BinaryOperation
+>
+OutputIterator transform(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ OutputIterator out,
+ BinaryOperation fun);
+``
+
+[heading Description]
+
+[*UnaryOperation version:]
+
+`transform` assigns the value `y` to each element `[out, out + distance(rng)), y = fun(x)` where `x` is the corresponding value to `y` in `rng1`. The return value is `out + distance(rng)`.
+
+[*BinaryOperation version:]
+
+`transform` assigns the value `z` to each element `[out, out + min(distance(rng1), distance(rng2))), z = fun(x,y)` where `x` is the corresponding value in `rng1` and `y` is the corresponding value in `rng2`. This version of `transform` stops upon reaching either the end of `rng1`, or the end of `rng2`. Hence there isn't a requirement for `distance(rng1) == distance(rng2)` since there is a safe guaranteed behaviour, unlike with the iterator counterpart in the standard library.
+
+The return value is `out + min(distance(rng1), distance(rng2))`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/transform.hpp`
+
+[heading Requirements]
+
+[*For the unary versions of transform:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `UnaryOperation` is a model of the `UnaryFunctionConcept`.
+* `SinglePassRange1`'s value type must be convertible to `UnaryFunction`'s argument type.
+* `UnaryFunction`'s result type must be convertible to a type in `OutputIterator`'s set of value types.
+
+[*For the binary versions of transform:]
+
+* `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+* `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+* `OutputIterator` is a model of the `OutputIteratorConcept`.
+* `BinaryOperation` is a model of the `BinaryFunctionConcept`.
+* `SinglePassRange1`'s value type must be convertible to `BinaryFunction`'s first argument type.
+* `SinglePassRange2`'s value type must be convertible to `BinaryFunction`'s second argument type.
+* `BinaryOperation`'s result type must be convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+[*For the unary version of transform:]
+
+* `out` is not an iterator within the range `[begin(rng1) + 1, end(rng1))`.
+* `[out, out + distance(rng1))` is a valid range.
+
+[*For the binary version of transform:]
+
+* `out` is not an iterator within the range `[begin(rng1) + 1, end(rng1))`.
+* `out` is not an iterator within the range `[begin(rng2) + 1, end(rng2))`.
+* `[out, out + min(distance(rng1), distance(rng2)))` is a valid range.
+
+
+[heading Complexity]
+
+Linear. The operation is applied exactly `distance(rng1)` for the unary version and `min(distance(rng1), distance(rng2))` for the binary version.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/unique.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/unique.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,72 @@
+[section:unique Range Algorithm - unique]
+
+[heading Prototype]
+
+``
+template<class ForwardRange>
+typename range_return<ForwardRange, return_begin_found>::type
+unique(ForwardRange& rng);
+
+template<class ForwardRange>
+typename range_return<const ForwardRange, return_begin_found>::type
+unique(const ForwardRange& rng);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_return<ForwardRange, return_begin_found>::type
+unique(ForwardRange& rng, BinaryPredicate pred);
+
+template<class ForwardRange, class BinaryPredicate>
+typename range_return<const ForwardRange, return_begin_found>::type
+unique(const ForwardRange& rng, BinaryPredicate pred);
+
+template<range_return_value re, class ForwardRange>
+typename range_return<ForwardRange, re>::type
+unique(ForwardRange& rng);
+
+template<range_return_value re, class ForwardRange>
+typename range_return<const ForwardRange, re>::type
+unique(const ForwardRange& rng);
+
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+typename range_return<ForwardRange, re>::type
+unique(ForwardRange& rng, BinaryPredicate pred);
+
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+typename range_return<const ForwardRange, re>::type
+unique(const ForwardRange& rng, BinaryPredicate pred);
+``
+
+[heading Description]
+
+`unique` removes all but the first element of each sequence of duplicate encountered in `rng`.
+
+Elements in the range `[new_last, end(rng))` are dereferenceable but undefined.
+
+Equality is determined by the predicate if one is supplied, or by `operator==()` for `ForwardRange`'s value type.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm/unique.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions of unique:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `ForwardRange`'s value type is a model of the `EqualityComparableConcept`.
+
+[*For the predicate versions of unique:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `ForwardRange` is mutable.
+* `BinaryPredicate` is a model of the `BinaryPredicateConcept`.
+* `ForwardRange`'s value type is convertible to `BinaryPredicate`'s first argument type and to `BinaryPredicate`'s second argument type.
+
+[heading Complexity]
+
+Linear. `O(N)` where `N` is `distance(rng)`. Exactly `distance(rng)` comparisons are performed.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm/upper_bound.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm/upper_bound.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,77 @@
+[section:upper_bound upper_bound]
+
+[heading Prototype]
+
+``
+template<class ForwardRange, class Value>
+typename range_iterator<ForwardRange>::type
+upper_bound(ForwardRange& rng, Value val);
+
+template<class ForwardRange, class Value>
+typename range_iterator<const ForwardRange>::type
+upper_bound(const ForwardRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<ForwardRange, re>::type
+upper_bound(ForwardRange& rng, Value val);
+
+template<
+ range_return_value re,
+ class ForwardRange,
+ class Value
+ >
+typename range_return<const ForwardRange, re>::type
+upper_bound(const ForwardRange& rng, Value val);
+``
+
+[heading Description]
+
+The versions of `upper_bound` that return an iterator, returns the first iterator in the range `rng` such that:
+without predicate - `val < *i` is `true`,
+with predicate - `pred(val, *i)` is `true`.
+
+`end(rng)` is returned if no such iterator exists.
+
+The versions of `upper_bound` 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/upper_bound.hpp`
+
+[heading Requirements]
+
+[*For the non-predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `Value` is a model of the `LessThanComparableConcept`.
+* The ordering of objects of type `Value` is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
+* `ForwardRange`'s value type is the same type as `Value`.
+
+[*For the predicate versions:]
+
+* `ForwardRange` is a model of the __forward_range__ Concept.
+* `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
+* `ForwardRange`'s value type is the same type as `Value`.
+* `ForwardRange`'s value type is convertible to both of `BinaryPredicate`'s argument types.
+
+[heading Precondition:]
+
+[*For the non-predicate versions:]
+
+`rng` is sorted in ascending order according to `operator<`.
+
+[*For the predicate versions:]
+
+`rng` is sorted in ascending order according to `pred`.
+
+[heading Complexity]
+
+For ranges that model the __random_access_range__ Concept the complexity is `O(log N)`, where `N` is `distance(rng)`. For all other range types the complexity is `O(N)`.
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/algorithm_ext/erase.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/erase.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,30 @@
+[section:erase erase]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class SinglePassRange
+ >
+void erase(Container& target,
+ iterator_range<typename Container::iterator> to_erase);
+``
+
+[heading Description]
+
+`erase` the iterator range `to_erase` from the container `target`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/erase.hpp`
+
+[heading Requirements]
+
+# `Container` supports erase of an iterator range.
+
+[heading Complexity]
+
+Linear. Proprotional to `distance(to_erase)`.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/for_each.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/for_each.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,68 @@
+[section:for_each for_each]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryFunction
+ >
+BinaryFunction for_each(const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryFunction fn);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryFunction
+ >
+BinaryFunction for_each(const SinglePassRange1& rng1,
+ SinglePassRange2& rng2,
+ BinaryFunction fn);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryFunction
+ >
+BinaryFunction for_each(SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ BinaryFunction fn);
+
+template<
+ class SinglePassRange1,
+ class SinglePassRange2,
+ class BinaryFunction
+ >
+BinaryFunction for_each(SinglePassRange1& rng1,
+ SinglePassRange2& rng2,
+ BinaryFunction fn);
+``
+
+[heading Description]
+
+`for_each` traverses forward through `rng1` and `rng2` simultaneously.
+For each iteration, the element `x` is used from `rng1` and the corresponding
+element `y` is used from `rng2` to invoke `fn(x,y)`.
+
+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.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/for_each.hpp`
+
+[heading Requirements]
+
+# `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+# `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+# `BinaryFunction` is a model of the `BinaryFunctionConcept`.
+# `SinglePassRange1`'s value type is convertible to `BinaryFunction`'s first argument type.
+# `SinglepassRange2`'s value type is convertible to `BinaryFunction`'s second argument type.
+
+[heading Complexity]
+
+Linear. Exactly `min(distance(rng1), distance(rng2))` applications of `BinaryFunction`.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/insert.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/insert.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,33 @@
+[section:insert insert]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class SinglePassRange
+ >
+void insert(Container& target,
+ typename Container::iterator before,
+ const SinglePassRange& from);
+``
+
+[heading Description]
+
+`insert` all of the elements in the range `from` before the `before` iterator into `target`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/insert.hpp`
+
+[heading Requirements]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `Container` supports insert at a specified position.
+# `SinglePassRange`'s value type is convertible to `Container`'s value type.
+
+[heading Complexity]
+
+Linear. `distance(from)` assignments are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/overwrite.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/overwrite.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,34 @@
+[section:overwrite overwrite]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange1,
+ class SinglePassRange2
+ >
+void overwrite(const SinglePassRange1& from,
+ SinglePassRange2& to);
+``
+
+[heading Description]
+
+`overwrite` assigns the values from the range `from` into the range `to`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/overwrite.hpp`
+
+[heading Requirements]
+
+# `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+# `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+# `SinglePassRange2` is mutable.
+# `distance(SinglePassRange1) <= distance(SinglePassRange2)`
+# `SinglePassRange1`'s value type is convertible to `SinglePassRange2`'s value type.
+
+[heading Complexity]
+
+Linear. `distance(rng1)` assignments are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/push_back.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/push_back.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+[section:push_back push_back]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class SinglePassRange
+ >
+void push_back(Container& target,
+ const SinglePassRange& from);
+``
+
+[heading Description]
+
+`push_back` all of the elements in the range `from` to the back of the container `target`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/push_back.hpp`
+
+[heading Requirements]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `Container` supports insert at `end()`.
+# `SinglePassRange`'s value type is convertible to `Container`'s value type.
+
+[heading Complexity]
+
+Linear. `distance(from)` assignments are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/push_front.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/push_front.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+[section:push_front push_front]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class SinglePassRange
+ >
+void push_front(Container& target,
+ const SinglePassRange& from);
+``
+
+[heading Description]
+
+`push_front` all of the elements in the range `from` to the front of the container `target`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/push_front.hpp`
+
+[heading Requirements]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `Container` supports insert at `begin()`.
+# `SinglePassRange`'s value type is convertible to `Container`'s value type.
+
+[heading Complexity]
+
+Linear. `distance(from)` assignments are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/remove_erase.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/remove_erase.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,31 @@
+[section:remove_erase remove_erase]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class T
+ >
+void remove_erase(Container& target,
+ const T& val);
+``
+
+[heading Description]
+
+`remove_erase` actually eliminates the elements equal to `val` from the container. This
+is in contrast to the `remove` algorithm which merely rearranges elements.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/erase.hpp`
+
+[heading Requirements]
+
+# `Container` supports erase of an iterator range.
+
+[heading Complexity]
+
+Linear. Proportional to `distance(target)`s.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithm_ext/remove_erase_if.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithm_ext/remove_erase_if.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+[section:remove_erase_if remove_erase_if]
+
+[heading Prototype]
+
+``
+template<
+ class Container,
+ class Pred
+ >
+void remove_erase(Container& target,
+ Pred pred);
+``
+
+[heading Description]
+
+`remove_erase_if` removes the elements `x` that satisfy `pred(x)` from the container.
+This is in contrast to the `erase` algorithm which merely rearranges elements.
+
+[heading Definition]
+
+Defined in the header file `boost/range/algorithm_ext/erase.hpp`
+
+[heading Requirements]
+
+# `Container` supports erase of an iterator range.
+# `Pred` is a model of the `Predicate` Concept.
+
+[heading Complexity]
+
+Linear. Proportional to `distance(target)`s.
+
+[endsect]

Added: trunk/libs/range/doc/reference/algorithms.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/algorithms.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,162 @@
+[section:algorithms Range Algorithm]
+
+[section:range_algorithm_introduction Introduction and motivation]
+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:
+
+[table
+ [[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:
+
+# it allows for ['*seamless functional-style programming*] where you do not need to use named local variables to store intermediate results
+# it is very ['*safe*] because the algorithm can verify out-of-bounds conditions and handle tricky conditions that lead to empty ranges
+
+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.
+
+[endsect]
+
+[section:range_algorithm_mutating_algorithms Mutating algorithms]
+[include algorithm/copy.qbk]
+[include algorithm/copy_backward.qbk]
+[include algorithm/fill.qbk]
+[include algorithm/generate.qbk]
+[include algorithm/inplace_merge.qbk]
+[include algorithm/merge.qbk]
+[include algorithm/nth_element.qbk]
+[include algorithm/partial_sort.qbk]
+[include algorithm/partition.qbk]
+[include algorithm/random_shuffle.qbk]
+[include algorithm/remove.qbk]
+[include algorithm/remove_if.qbk]
+[include algorithm/replace.qbk]
+[include algorithm/replace_if.qbk]
+[include algorithm/rotate.qbk]
+[include algorithm/sort.qbk]
+[include algorithm/stable_partition.qbk]
+[include algorithm/stable_sort.qbk]
+[include algorithm/transform.qbk]
+[include algorithm/unique.qbk]
+[endsect]
+
+[section:range_algorithm_non_mutating_algorithms Non-mutating algorithms]
+[include algorithm/adjacent_find.qbk]
+[include algorithm/binary_search.qbk]
+[include algorithm/count.qbk]
+[include algorithm/equal.qbk]
+[include algorithm/equal_range.qbk]
+[include algorithm/for_each.qbk]
+[include algorithm/find.qbk]
+[include algorithm/find_end.qbk]
+[include algorithm/find_first_of.qbk]
+[include algorithm/find_if.qbk]
+[include algorithm/lexicographical_compare.qbk]
+[include algorithm/lower_bound.qbk]
+[include algorithm/max_element.qbk]
+[include algorithm/min_element.qbk]
+[include algorithm/mismatch.qbk]
+[include algorithm/search.qbk]
+[include algorithm/upper_bound.qbk]
+[endsect]
+
+[section:set_algorithms Set algorithms]
+[include algorithm/includes.qbk]
+[include algorithm/set_union.qbk]
+[include algorithm/set_intersection.qbk]
+[include algorithm/set_difference.qbk]
+[include algorithm/set_symmetric_difference.qbk]
+[endsect]
+
+[section:heap_algorithms Heap algorithms]
+[include algorithm/push_heap.qbk]
+[include algorithm/pop_heap.qbk]
+[include algorithm/make_heap.qbk]
+[endsect]
+
+[section:permutation_algorithms Permutation algorithms]
+[include algorithm/next_permutation.qbk]
+[include algorithm/prev_permutation.qbk]
+[endsect]
+
+[section:range_algorithm_new_algorithms New algorithms]
+[include algorithm_ext/erase.qbk]
+[include algorithm_ext/for_each.qbk]
+[include algorithm_ext/insert.qbk]
+[include algorithm_ext/overwrite.qbk]
+[include algorithm_ext/push_back.qbk]
+[include algorithm_ext/push_front.qbk]
+[include algorithm_ext/remove_erase.qbk]
+[include algorithm_ext/remove_erase_if.qbk]
+[endsect]
+
+[section:range_numeric Numeric algorithms]
+[include numeric/accumulate.qbk]
+[include numeric/adjacent_difference.qbk]
+[include numeric/inner_product.qbk]
+[include numeric/partial_sum.qbk]
+[endsect]
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/extending.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/extending.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,316 @@
+[section:extending Extending the library]
+
+[section:method_1 Method 1: provide member functions and nested types]
+
+This procedure assumes that you have control over the types that should be made conformant to a Range concept. If not, see [link range.reference.extending.method_2 method 2].
+
+The primary templates in this library are implemented such that standard containers will work automatically and so will __boost_array__. Below is given an overview of which member functions and member types a class must specify to be useable as a certain Range concept.
+
+[table
+ [[Member function] [Related concept ]]
+ [[`begin()` ] [__single_pass_range__]]
+ [[`end()` ] [__single_pass_range__]]
+]
+
+Notice that `rbegin()` and `rend()` member functions are not needed even though the container can support bidirectional iteration.
+
+The required member types are:
+
+[table
+ [[Member type ] [Related concept ]]
+ [[`iterator` ] [__single_pass_range__]]
+ [[`const_iterator`] [__single_pass_range__]]
+]
+
+Again one should notice that member types `reverse_iterator` and `const_reverse_iterator` are not needed.
+
+[endsect]
+
+[section:method_2 Method 2: provide free-standing functions and specialize metafunctions]
+
+This procedure assumes that you cannot (or do not wish to) change the types that should be made conformant to a Range concept. If this is not true, see [link range.reference.extending.method_1 method 1].
+
+The primary templates in this library are implemented such that certain functions are found via argument-dependent-lookup (ADL). Below is given an overview of which free-standing functions a class must specify to be useable as a certain Range concept. Let `x` be a variable (`const` or `mutable`) of the class in question.
+
+[table
+ [[Function ] [Related concept ]]
+ [[`range_begin(x)`] [__single_pass_range__]]
+ [[`range_end(x)` ] [__single_pass_range__]]
+]
+
+`range_begin()` and `range_end()` must be overloaded for both `const` and `mutable` reference arguments.
+
+You must also specialize two metafunctions for your type `X`:
+
+[table
+ [[Metafunction ] [Related concept ]]
+ [[`boost::range_mutable_iterator`] [__single_pass_range__]]
+ [[`boost::range_const_iterator`] [__single_pass_range__]]
+]
+
+A complete example is given here:
+
+``
+ #include <boost/range.hpp>
+ #include <iterator> // for std::iterator_traits, std::distance()
+
+ namespace Foo
+ {
+ //
+ // Our sample UDT. A 'Pair'
+ // will work as a range when the stored
+ // elements are iterators.
+ //
+ template< class T >
+ struct Pair
+ {
+ T first, last;
+ };
+
+ } // namespace 'Foo'
+
+ namespace boost
+ {
+ //
+ // Specialize metafunctions. We must include the range.hpp header.
+ // We must open the 'boost' namespace.
+ //
+
+ template< class T >
+ struct range_mutable_iterator< Foo::Pair<T> >
+ {
+ typedef T type;
+ };
+
+ template< class T >
+ struct range_const_iterator< Foo::Pair<T> >
+ {
+ //
+ // Remark: this is defined similar to 'range_iterator'
+ // because the 'Pair' type does not distinguish
+ // between an iterator and a const_iterator.
+ //
+ typedef T type;
+ };
+
+ } // namespace 'boost'
+
+ namespace Foo
+ {
+ //
+ // The required functions. These should be defined in
+ // the same namespace as 'Pair', in this case
+ // in namespace 'Foo'.
+ //
+
+ template< class T >
+ inline T range_begin( Pair<T>& x )
+ {
+ return x.first;
+ }
+
+ template< class T >
+ inline T range_begin( const Pair<T>& x )
+ {
+ return x.first;
+ }
+
+ template< class T >
+ inline T range_end( Pair<T>& x )
+ {
+ return x.last;
+ }
+
+ template< class T >
+ inline T range_end( const Pair<T>& x )
+ {
+ return x.last;
+ }
+
+ } // namespace 'Foo'
+
+ #include <vector>
+
+ int main()
+ {
+ typedef std::vector<int>::iterator iter;
+ std::vector<int> vec;
+ Foo::Pair<iter> pair = { vec.begin(), vec.end() };
+ const Foo::Pair<iter>& cpair = pair;
+ //
+ // Notice that we call 'begin' etc with qualification.
+ //
+ iter i = boost::begin( pair );
+ iter e = boost::end( pair );
+ i = boost::begin( cpair );
+ e = boost::end( cpair );
+ boost::range_difference< Foo::Pair<iter> >::type s = boost::size( pair );
+ s = boost::size( cpair );
+ boost::range_reverse_iterator< const Foo::Pair<iter> >::type
+ ri = boost::rbegin( cpair ),
+ re = boost::rend( cpair );
+ }
+``
+
+[endsect]
+
+[section:method_3 Method 3: provide range adaptor implementations]
+
+[section:method_3_1 Method 3.1: Implement a Range Adaptor without arguments]
+
+To implement a Range Adaptor without arguments (e.g. reversed) you need to:
+
+# Provide a range for your return type, for example:
+``
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+
+template< typename R >
+struct reverse_range :
+ boost::iterator_range<
+ boost::reverse_iterator<
+ typename boost::range_iterator<R>::type> >
+{
+private:
+ typedef boost::iterator_range<
+ boost::reverse_iterator<
+ typename boost::range_iterator<R>::type> > base;
+
+public:
+ typedef boost::reverse_iterator<
+ typename boost::range_iterator<R>::type > iterator;
+
+ reverse_range(R& r)
+ : base(iterator(boost::end(r)), iterator(boost::begin(r)))
+ { }
+};
+``
+
+# Provide a tag to uniquely identify your adaptor in the `operator|` function overload set
+``
+namespace detail {
+ struct reverse_forwarder {};
+}
+``
+
+# Implement `operator|`
+``
+template< class BidirectionalRng >
+inline reverse_range<BidirectionalRng>
+operator|( BidirectionalRng& r, detail::reverse_forwarder )
+{
+ return reverse_range<BidirectionalRng>( r );
+}
+
+template< class BidirectionalRng >
+inline reverse_range<const BidirectionalRng>
+operator|( const BidirectionalRng& r, detail::reverse_forwarder )
+{
+ return reverse_range<const BidirectionalRng>( r );
+}
+``
+
+[endsect]
+
+[section:method_3_2 Method 3.2: Implement a Range Adaptor with arguments]
+
+# Provide a range for your return type, for example:
+``
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+template<typename Value>
+class replace_value
+{
+public:
+ typedef const Value& result_type;
+ typedef const Value& argument_type;
+
+ replace_value(const Value& from, const Value& to)
+ : m_from(from), m_to(to)
+ {
+ }
+
+ const Value& operator()(const Value& x) const
+ {
+ return (x == m_from) ? m_to : x;
+ }
+private:
+ Value m_from;
+ Value m_to;
+};
+
+template<typename Range>
+class replace_range
+: public boost::iterator_range<
+ boost::transform_iterator<
+ replace_value<typename boost::range_value<Range>::type>,
+ typename boost::range_iterator<Range>::type> >
+{
+private:
+ typedef typename boost::range_value<Range>::type value_type;
+ typedef typename boost::range_iterator<Range>::type iterator_base;
+ typedef replace_value<value_type> Fn;
+ typedef boost::transform_iterator<Fn, iterator_base> replaced_iterator;
+ typedef boost::iterator_range<replaced_iterator> base_t;
+
+public:
+ replace_range(Range& rng, value_type from, value_type to)
+ : base_t(replaced_iterator(boost::begin(rng), Fn(from,to)),
+ replaced_iterator(boost::end(rng), Fn(from,to)))
+ {
+ }
+ };
+``
+
+# Implement a holder class to hold the arguments required to construct the RangeAdaptor.
+
+The holder combines multiple parameters into one that can be passed as the right operand of `operator|()`.
+
+``
+template<typename T>
+class replace_holder : public boost::range_detail::holder2<T>
+{
+public:
+ replace_holder(const T& from, const T& to)
+ : boost::range_detail::holder2<T>(from, to)
+ { }
+private:
+ void operator=(const replace_holder&);
+};
+``
+
+# Define an instance of the holder with the name of the adaptor
+
+``
+static boost::range_detail::forwarder2<replace_holder>
+replaced = boost::range_detail::forwarder2<replace_holder>();
+``
+
+# Define `operator|`
+
+``
+template<typename SinglePassRange>
+inline replace_range<SinglePassRange>
+operator|(SinglePassRange& rng,
+ const replace_holder<typename boost::range_value<SinglePassRange>::type>& f)
+{
+ return replace_range<SinglePassRange>(rng, f.val1, f.val2);
+}
+
+template<typename SinglePassRange>
+inline replace_range<const SinglePassRange>
+operator|(const SinglePassRange& rng,
+ const replace_holder<typename boost::range_value<SinglePassRange>::type>& f)
+{
+ return replace_range<const SinglePassRange>(rng, f.val1, f.val2);
+}
+``
+
+[endsect]
+
+[endsect]
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/numeric/accumulate.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/numeric/accumulate.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,56 @@
+[section:accumulate accumulate]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange,
+ class Value
+ >
+Value accumulate(const SinglePassRange& source_rng,
+ Value init);
+
+template<
+ class SinglePassRange,
+ class Value,
+ class BinaryOperation
+ >
+Value accumulate(const SinglePassRange& source_rng,
+ Value init,
+ BinaryOperation op);
+``
+
+[heading Description]
+
+`accumulate` is a generalisation of summation. It computes a binary operation (`operator+`
+in the non-predicate version) of `init` and all of the elements in `rng`.
+
+The return value is the resultant value of the above algorithm.
+
+[heading Definition]
+
+Defined in the header file `boost/range/numeric.hpp`
+
+[heading Requirements]
+
+[heading For the first version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `Value` is a model of the `AssignableConcept`.
+# An `operator+` is defined for a left-hand operand of type `Value` and a right-hand operance of the `SinglePassRange` value type.
+# The return type of the above operator is convertible to `Value`.
+
+[heading For the second version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `Value` is a model of the `AssignableConcept`.
+# `BinaryOperation` is a model of the `BinaryFunctionConcept`.
+# `Value` is convertible to `BinaryOperation`'s first argument type.
+# `SinglePassRange`'s value type is convertible to `BinaryOperation`'s second argument type.
+# The return type of `BinaryOperation` is convertible to `Value`.
+
+[heading Complexity]
+
+Linear. Exactly `distance(source_rng)`.
+
+[endsect]

Added: trunk/libs/range/doc/reference/numeric/adjacent_difference.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/numeric/adjacent_difference.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,63 @@
+[section:adjacent_difference adjacent_difference]
+
+[heading Prototype]
+
+``
+template<
+ class SinglePassRange,
+ class OutputIterator
+ >
+OutputIterator adjacent_difference(
+ const SinglePassRange& source_rng,
+ OutputIterator out_it);
+
+template<
+ class SinglePassRange,
+ class OutputIterator,
+ class BinaryOperation
+ >
+OutputIterator adjacent_difference(
+ const SinglePassRange& source_rng,
+ OutputIterator out_it,
+ BinaryOperation op);
+``
+
+[heading Description]
+
+`adjacent_difference` calculates the differences of adjacent_elements in `rng`.
+
+The first version of `adjacent_difference` uses `operator-()` to calculate the differences.
+The second version uses `BinaryOperation` instead of `operator-()`.
+
+[heading Definition]
+
+Defined in the header file `boost/range/numeric.hpp`
+
+[heading Requirements]
+
+[heading For the first version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `OutputIterator` is a model of the `OutputIteratorConcept`.
+# If `x` and `y` are objects of `SinglePassRange`'s value type, then `x - y` is defined.
+# The value type of `SinglePassRange` is convertible to a type in `OutputIterator`'s set of value types.
+# The return type of `x - y` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading For the second version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `OutputIterator` is a model of the `OutputIteratorConcept`.
+# `BinaryOperation` is a model of the `BinaryFunctionConcept`.
+# The value type of `SinglePassRange` is convertible to `BinaryOperation`'s first and second argument types.
+# The value type of `SinglePassRange` is convertible to a type in `OutputIterator`'s set of value types.
+# The result type of `BinaryOperation` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+`[result, result + distance(rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. If `empty(rng)` then zero applications, otherwise `distance(rng) - 1` applications are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/numeric/inner_product.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/numeric/inner_product.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,67 @@
+[section:inner_product inner_product]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange1,
+ class SinglePassRange2,
+ class Value>
+ Value inner_product( const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ Value init);
+
+template<class SinglePassRange1,
+ class SinglePassRange2,
+ class Value,
+ class BinaryOperation1,
+ class BinaryOperation2>
+ Value inner_product( const SinglePassRange1& rng1,
+ const SinglePassRange2& rng2,
+ Value init,
+ BinaryOperation1 op1,
+``
+
+[heading Description]
+
+`inner_product` calculates a generalised inner product of the range `rng1` and `rng2`.
+
+For further information on the `inner_product` algorithm please see __sgi_inner_product__.
+
+[heading Definition]
+
+Defined in the header file `boost/range/numeric.hpp`
+
+[heading Requirements]
+
+[heading For the first version]
+
+# `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+# `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+# `Value` is a model of the `AssignableConcept`.
+# If `x` is an object of type `Value`, `y` is an object of `SinglePassRange1`'s value
+type, and `z` is an object of `SinglePassRange2`'s value type, then `x + y * z`
+is defined.
+# The result type of the expression `x + y * z` is convertible to `Value`.
+
+[heading For the second version]
+
+# `SinglePassRange1` is a model of the __single_pass_range__ Concept.
+# `SinglePassRange2` is a model of the __single_pass_range__ Concept.
+# `Value` is a model of the `AssignableConcept`.
+# `BinaryOperation1` is a model of the `BinaryFunctionConcept`.
+# `BinaryOperation2` is a model of the `BinaryFunctionConcept`.
+# The value type of `SinglePassRange1` is convertible to the first argument type of `BinaryOperation2`.
+# The value type of `SinglePassRange2` is convertible to the second argument type of `BinaryOperation2`.
+# `Value` is convertible to the value type of `BinaryOperation1`.
+# The return type of `BinaryOperation2` is convertible to the second argument type of `BinaryOperation1`.
+# The return type of `BinaryOperation1` is convertible to `Value`.
+
+[heading Precondition:]
+
+`distance(rng2) >= distance(rng1)` is a valid range.
+
+[heading Complexity]
+
+Linear. Exactly `distance(rng)`.
+
+[endsect]

Added: trunk/libs/range/doc/reference/numeric/partial_sum.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/numeric/partial_sum.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+[section:partial_sum partial_sum]
+
+[heading Prototype]
+
+``
+template<class SinglePassRange,
+ class OutputIterator>
+OutputIterator partial_sum(const SinglePassRange& rng,
+ OutputIterator out_it);
+
+template<class SinglePassRange,
+ class OutputIterator,
+ class BinaryOperation>
+OutputIterator partial_sum(const SinglePassRange& rng,
+ OutputIterator out_it,
+ BinaryOperation op);
+``
+
+[heading 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 __sgi_partial_sum__.
+
+
+[heading Definition]
+
+Defined in the header file `boost/range/numeric.hpp`
+
+[heading Requirements]
+
+[heading For the first version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `OutputIterator` is a model of the `OutputIteratorConcept`.
+# If `x` and `y` are objects of `SinglePassRange`'s value type, then `x + y` is defined.
+# The return type of `x + y` is convertible to the value type of `SinglePassRange`.
+# The value type of `SinglePassRange` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading For the second version]
+
+# `SinglePassRange` is a model of the __single_pass_range__ Concept.
+# `OutputIterator` is a model of the `OutputIteratorConcept`.
+# `BinaryOperation` is a model of the `BinaryFunctionConcept`.
+# The result type of `BinaryOperation` is convertible to the value type of `SinglePassRange`.
+# The value type of `SinglePassRange` is convertible to a type in `OutputIterator`'s set of value types.
+
+[heading Precondition:]
+
+`[result, result + distance(rng))` is a valid range.
+
+[heading Complexity]
+
+Linear. If `empty(rng)` then zero applications, otherwise `distance(rng) - 1` applications are performed.
+
+[endsect]

Added: trunk/libs/range/doc/reference/overview.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/overview.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,14 @@
+[section Overview]
+
+Four 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.
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/ranges.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/ranges.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,8 @@
+[section:ranges Provided Ranges]
+
+[include ranges/counting_range.qbk]
+[include ranges/istream_range.qbk]
+[include ranges/irange.qbk]
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/ranges/counting_range.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/ranges/counting_range.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,31 @@
+[section:counting_range counting_range]
+
+[heading Prototype]
+
+``
+template< class Incrementable > inline
+iterator_range< counting_iterator<Incrementable> >
+counting_range(Incrementable first, Incrementable last);
+
+template< class SinglePassRange > inline
+iterator_range< counting_iterator<typename range_iterator<SinglePassRange>::type >
+counting_range(const SinglePassRange& rng);
+
+template< class SinglePassRange > inline
+iterator_range< counting_iterator<typename range_iterator<SinglePassRange>::type >
+counting_range(SinglePassRange& rng);
+``
+
+[heading Description]
+
+`counting_range` is a function to generator that generates an `iterator_range` wrapping a `counting_iterator` (from Boost.Iterator).
+
+[heading Definition]
+
+Defined in header file `boost/range/counting_range.hpp`
+
+[heading Requirements]
+
+# `Incrementable` is a model of the `Incrementable` Concept.
+
+[endsect]

Added: trunk/libs/range/doc/reference/ranges/irange.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/ranges/irange.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,35 @@
+[section:irange irange]
+
+[heading 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);
+``
+
+[heading 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.
+
+[heading Definition]
+
+Defined in the header file `boost/range/irange.hpp`
+
+[heading Requirements]
+
+# `Integer` is a model of the `Integer` Concept.
+# `StepSize` is a model of the `SignedInteger` Concept.
+
+[heading Complexity]
+
+Constant. Since this function generates a new range the most significant performance cost is incurred through the iteration of the generated range.
+
+[endsect]
+

Added: trunk/libs/range/doc/reference/ranges/istream_range.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/ranges/istream_range.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,19 @@
+[section:istream_range istream_range]
+
+[heading Prototype]
+
+``
+template< class Type, class Elem, class Traits > inline
+iterator_range< std::istream_iterator<Type, Elem, Traits> >
+istream_range(std::basic_istream<Elem, Traits>& in);
+``
+
+[heading Description]
+
+`istream_range` is a function to generator that generates an `iterator_range` wrapping a `std::istream_iterator`.
+
+[heading Definition]
+
+Defined in header file `boost/range/istream_range.hpp`
+
+[endsect]

Added: trunk/libs/range/doc/reference/semantics.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/semantics.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,185 @@
+[section Semantics]
+
+[heading notation]
+
+[table
+ [[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*` ]]
+]
+
+[section Metafunctions]
+
+[table
+ [[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]
+ ]
+]
+
+[endsect]
+
+[section Functions]
+
+[table
+ [[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).
+
+[endsect]
+
+[endsect]
+
+

Added: trunk/libs/range/doc/reference/synopsis.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/reference/synopsis.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,143 @@
+[section Synopsis]
+
+``
+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'
+``
+
+[endsect]
+

Added: trunk/libs/range/doc/style.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/style.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,45 @@
+[section:style_guide Terminology and style guidelines]
+
+The use of a consistent terminology is as important for __ranges__ and range-based algorithms as it is for iterators and iterator-based algorithms. If a conventional set of names are adopted, we can avoid misunderstandings and write generic function prototypes that are [*/self-documenting/].
+
+Since ranges are characterized by a specific underlying iterator type, we get a type of range for each type of iterator. Hence we can speak of the following types of ranges:
+
+* [*/Value access/] category:
+ * Readable Range
+ * Writeable Range
+ * Swappable Range
+ * Lvalue Range
+* [*/Traversal/] category:
+ * __single_pass_range__
+ * __forward_range__
+ * __bidirectional_range__
+ * __random_access_range__
+
+Notice how we have used the categories from the __new_style_iterators__.
+
+Notice that an iterator (and therefore an range) has one [*/traversal/] property and one or more properties from the [*/value access/] category. So in reality we will mostly talk about mixtures such as
+
+* Random Access Readable Writeable Range
+* Forward Lvalue Range
+
+By convention, we should always specify the [*/traversal/] property first as done above. This seems reasonable since there will only be one [*/traversal/] property, but perhaps many [*/value access/] properties.
+
+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 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/] property (Single Pass).
+
+As another example, consider how we specify the interface of `std::sort()`. Algorithms are usually more cumbersome to specify the interface of since both [*/traversal/] and [*/value access/] properties must be exactly defined. The iterator-based version looks like this:
+
+``
+ template< class RandomAccessTraversalReadableWritableIterator >
+ void sort( RandomAccessTraversalReadableWritableIterator first,
+ RandomAccessTraversalReadableWritableIterator last );
+``
+
+For ranges the interface becomes
+
+``
+ template< class RandomAccessReadableWritableRange >
+ void sort( RandomAccessReadableWritableRange& r );
+``
+
+[endsect]
+

Added: trunk/libs/range/doc/upgrade.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/upgrade.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,30 @@
+[section:upgrade Upgrade version of Boost.Range]
+
+[section:upgrade_from_1_42 Upgrade from version 1.42]
+
+New features:
+
+# __range_adaptors__
+# __range_algorithms__
+
+Removed:
+
+# `iterator_range` no longer has a `is_singular` member function. The singularity restrictions have been removed from the `iterator_range` class since this added restrictions to ranges of iterators whose default constructors were not singular. Previously the `is_singular` member function always returned `false` in release build configurations, hence it is not anticipated that this interface change will produce difficulty in upgrading.
+
+
+[endsect]
+
+[section:upgrade_from_1_34 Upgrade from version 1.34]
+
+Boost version 1.35 introduced some larger refactorings of the library:
+
+# 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__`()`.
+# __size__ now requires a __random_access_range__. The old behavior is provided as __distance__`()`.
+# `range_size<T>::type` has been completely removed in favor of `range_difference<T>::type`
+# `boost_range_begin()` and `boost_range_end()` have been renamed `range_begin()` and `range_end()` respectively.
+# `range_result_iterator<T>::type` and `range_reverse_result_iterator<T>::type` have been renamed `range_iterator<T>::type` and `range_reverse_iterator<T>::type`.
+# The procedure that makes a custom type work with the library has been greatly simplified. See __extending_for_udts__ for details.
+
+[endsect]
+
+[endsect]

Added: trunk/libs/range/doc/utilities.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/range/doc/utilities.qbk 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,296 @@
+[section:utilities Utilities]
+
+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.
+
+[section:iterator_range Class `iterator_range`]
+
+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.
+
+
+[h4 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.
+
+[h4 Details member functions]
+
+`operator unspecified_bool_type() const;`
+
+[:['[*Returns]] `!empty();`]
+
+`bool equal( iterator_range& r ) const;`
+
+[:['[*Returns]] `begin() == r.begin() && end() == r.end();`]
+
+[h4 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) );`]
+
+[endsect]
+
+[section:sub_range Class `sub_range`]
+
+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.
+
+[h4 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" );
+``
+
+[endsect]
+
+[section:join Function join]
+
+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.
+
+[h4 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);
+``
+
+[h4 Example]
+
+The expression `join(irange(0,5), irange(5,10))` would evaluate to a range representing an integer range `[0,10)`
+
+
+[endsect]
+
+[endsect]
+

Modified: trunk/libs/range/index.html
==============================================================================
--- trunk/libs/range/index.html (original)
+++ trunk/libs/range/index.html 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,84 +1,13 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Range Documentation </title>
-<link rel="stylesheet" href="doc/style.css" type="text/css">
+ <title>Boost.Range Documentation</title>
+ <meta http-equiv="Content-Type" content="test/html; charset=us-ascii" />
+ <meta http-equiv="refresh" content="0; URL=doc/html/index.html" />
 </head>
 
 <body>
- <table border="0" >
- <tr>
- <td ><img src="../../boost.png" border="0" ></td>
- <td >
- <h1 align="center">Range Library</h1>
- </td>
- </tr>
- </table>
-
- <p>
- Copyright © 2003-2007 Thorsten Ottosen
- </p>
- <p>
- Use, modification and distribution is subject to the Boost Software License, Version 1.0
- (see <a href="http://www.boost.org/LICENSE_1_0.txt">
- http://www.boost.org/LICENSE_1_0.txt>).
- </p>
-
- <h1>Overview</h1>
- <p>
- Boost.Range is a collection of concepts and utilities that are particularly
- useful for specifying and implementing generic algorithms. The documentation
- consists of the following sections:
- </p>
-
- <ul>
- <li>
Introduction
-
- <li>Range concepts:
- <ul>
- <li> SinglePassRange
- <li> ForwardRange
- <li> BidirectionalRange
- <li> RandomAccessRange </ul>
-
- <li> Reference
- <li> Utilities:
- <ul>
- <li> Class iterator_range
- <li> Class sub_range </ul>
-
- <li> Terminology and style guidelines
- <li>Headers </li>
- <li>Examples
- <li><a href="doc/mfc_atl.html">MFC/ATL mapping (courtesy of Shunsuke
- Sogame)</a></li>
- <li>Portability
- <li><a href="doc/upgrading.html">Upgrading from Boost v.
- 1.34.*</a></li>
- <li>FAQ
- <li>History and acknowledgment
-
- </ul>
-
-
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
-
+ Automatic redirection failed, please go to doc/html/index.html
 </body>
 </html>
-
-
-
-

Modified: trunk/libs/range/test/Jamfile.v2
==============================================================================
--- trunk/libs/range/test/Jamfile.v2 (original)
+++ trunk/libs/range/test/Jamfile.v2 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -1,5 +1,6 @@
 # Boost.Range library
 #
+# Copyright Neil Groves 2009
 # Copyright Thorsten Ottosen 2003-2004. Use, modification and
 # distribution is subject to the Boost Software License, Version
 # 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -8,28 +9,124 @@
 # For more information, see http://www.boost.org/libs/range/
 #
 
+# bring in rules for testing
+import testing ;
+
+project
+ : requirements
+ <library>/boost/test//boost_unit_test_framework/
+ <library>/boost/regex//boost_regex/
+ <link>static
+ <threading>multi
+ ;
+
 rule range-test ( name : includes * )
 {
     return [
- run $(name).cpp /boost/test//boost_unit_test_framework/<link>static
+ run $(name).cpp /boost/test//boost_unit_test_framework /boost/regex//boost_regex/<link>static
+ :
         :
- :
         : <toolset>gcc:<cxxflags>"-Wall -Wunused "
         ] ;
 }
 
 test-suite range :
- [ range-test array ]
- [ range-test iterator_pair ]
- [ range-test std_container ]
- [ range-test string ]
- [ range-test iterator_range ]
- [ range-test sub_range ]
- [ range-test partial_workaround ]
- [ range-test algorithm_example ]
- [ range-test reversible_range ]
- [ range-test const_ranges ]
- [ range-test extension_mechanism ]
-# [ range-test mfc : <include>$(VC71_ROOT)/atlmfc/include ]
+ [ range-test adaptor_test/adjacent_filtered ]
+ [ range-test adaptor_test/copied ]
+ [ range-test adaptor_test/filtered ]
+ [ range-test adaptor_test/indexed ]
+ [ range-test adaptor_test/indirected ]
+ [ range-test adaptor_test/map ]
+ [ range-test adaptor_test/replaced ]
+ [ range-test adaptor_test/replaced_if ]
+ [ range-test adaptor_test/reversed ]
+ [ range-test adaptor_test/sliced ]
+ [ range-test adaptor_test/strided ]
+ [ range-test adaptor_test/tokenized ]
+ [ range-test adaptor_test/transformed ]
+ [ range-test adaptor_test/uniqued ]
+ [ range-test adaptor_test/adjacent_filtered_example ]
+ [ range-test adaptor_test/copied_example ]
+ [ range-test adaptor_test/filtered_example ]
+ [ range-test adaptor_test/indexed_example ]
+ [ range-test adaptor_test/indirected_example ]
+ [ range-test adaptor_test/map_keys_example ]
+ [ range-test adaptor_test/map_values_example ]
+ [ range-test adaptor_test/replaced_example ]
+ [ range-test adaptor_test/replaced_if_example ]
+ [ range-test adaptor_test/reversed_example ]
+ [ range-test adaptor_test/sliced_example ]
+ [ range-test adaptor_test/strided_example ]
+ [ range-test adaptor_test/transformed_example ]
+ [ range-test adaptor_test/uniqued_example ]
+ [ range-test algorithm_test/adjacent_find ]
+ [ range-test algorithm_test/binary_search ]
+ [ range-test algorithm_test/copy ]
+ [ range-test algorithm_test/copy_backward ]
+ [ range-test algorithm_test/count ]
+ [ range-test algorithm_test/count_if ]
+ [ range-test algorithm_test/equal ]
+ [ range-test algorithm_test/equal_range ]
+ [ range-test algorithm_test/fill ]
+ [ range-test algorithm_test/find ]
+ [ range-test algorithm_test/find_if ]
+ [ range-test algorithm_test/find_end ]
+ [ range-test algorithm_test/find_first_of ]
+ [ range-test algorithm_test/for_each ]
+ [ range-test algorithm_test/generate ]
+ [ range-test algorithm_test/heap ]
+ [ range-test algorithm_test/includes ]
+ [ range-test algorithm_test/inplace_merge ]
+ [ range-test algorithm_test/lexicographical_compare ]
+ [ range-test algorithm_test/lower_bound ]
+ [ range-test algorithm_test/max_element ]
+ [ range-test algorithm_test/merge ]
+ [ range-test algorithm_test/min_element ]
+ [ range-test algorithm_test/mismatch ]
+ [ range-test algorithm_test/next_permutation ]
+ [ range-test algorithm_test/nth_element ]
+ [ range-test algorithm_test/partial_sort ]
+ [ range-test algorithm_test/partition ]
+ [ range-test algorithm_test/prev_permutation ]
+ [ range-test algorithm_test/random_shuffle ]
+ [ range-test algorithm_test/remove ]
+ [ range-test algorithm_test/remove_if ]
+ [ range-test algorithm_test/replace ]
+ [ range-test algorithm_test/replace_if ]
+ [ range-test algorithm_test/reverse ]
+ [ range-test algorithm_test/rotate ]
+ [ range-test algorithm_test/search ]
+ [ range-test algorithm_test/set_difference ]
+ [ range-test algorithm_test/set_intersection ]
+ [ range-test algorithm_test/set_symmetric_difference ]
+ [ range-test algorithm_test/set_union ]
+ [ range-test algorithm_test/sort ]
+ [ range-test algorithm_test/stable_partition ]
+ [ range-test algorithm_test/stable_sort ]
+ [ range-test algorithm_test/transform ]
+ [ range-test algorithm_test/unique ]
+ [ range-test algorithm_test/upper_bound ]
+ [ range-test adl_conformance ]
+ [ range-test adl_conformance_no_using ]
+ [ range-test algorithm ]
+ [ range-test algorithm_example ]
+ [ range-test array ]
+# [ range-test atl : <include>$(VC71_ROOT)/atlmfc/include ]
+ [ range-test combine ]
+ [ range-test compat2 ]
+ [ range-test compat3 ]
+ [ range-test const_ranges ]
+ [ range-test counting_range ]
+ [ range-test extension_mechanism ]
+ [ range-test irange ]
+ [ range-test iterator_pair ]
+ [ range-test iterator_range ]
+# [ range-test mfc : <include>$(VC71_ROOT)/atlmfc/include ]
+ [ range-test join ]
+ [ range-test partial_workaround ]
+ [ range-test reversible_range ]
+ [ range-test std_container ]
+ [ range-test string ]
+ [ range-test sub_range ]
     ;
 

Added: trunk/libs/range/test/adaptor_test/adjacent_filtered.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/adjacent_filtered.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,110 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <string>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void adjacent_filtered_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ // This is my preferred syntax using the | operator.
+ std::vector< value_t > test_result1
+ = boost::copy_range< std::vector< value_t > >(
+ c | adjacent_filtered(std::not_equal_to< value_t >()));
+
+ // This is an alternative syntax preferred by some.
+ std::vector< value_t > test_result2
+ = boost::copy_range< std::vector< value_t > >(
+ adaptors::adjacent_filter(c, std::not_equal_to< value_t >()));
+
+ // Calculate the reference result.
+ std::vector< value_t > reference_result;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iter_t;
+ value_t prev_v = value_t();
+ for (iter_t it = c.begin(); it != c.end(); ++it)
+ {
+ if (it == c.begin())
+ {
+ reference_result.push_back(*it);
+ }
+ else if (*it != prev_v)
+ {
+ reference_result.push_back(*it);
+ }
+ prev_v = *it;
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result1.begin(),
+ test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result2.begin(),
+ test_result2.end() );
+ }
+
+ template< class Collection >
+ void adjacent_filtered_test_impl()
+ {
+ using namespace boost::assign;
+
+ Collection c;
+
+ // test empty collection
+ adjacent_filtered_test_impl(c);
+
+ // test one element;
+ c += 1;
+ adjacent_filtered_test_impl(c);
+
+ // test many elements;
+ c += 1,2,2,2,3,4,4,4,4,5,6,7,8,9,9;
+ adjacent_filtered_test_impl(c);
+ }
+
+ void adjacent_filtered_test()
+ {
+ adjacent_filtered_test_impl< std::vector< int > >();
+ adjacent_filtered_test_impl< std::list< int > >();
+ adjacent_filtered_test_impl< std::set< int > >();
+ adjacent_filtered_test_impl< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.adjacent_filtered" );
+
+ test->add( BOOST_TEST_CASE( &boost::adjacent_filtered_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/adjacent_filtered_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/adjacent_filtered_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <functional>
+#include <iostream>
+#include <vector>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+namespace
+{
+ void adjacent_filtered_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | adjacent_filtered(std::not_equal_to<int>()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ std::vector<int> reference;
+ reference += 1,2,3,4,5,6;
+
+ std::vector<int> test;
+ boost::push_back(test, input | adjacent_filtered(std::not_equal_to<int>()));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.adjacent_filtered_example" );
+
+ test->add( BOOST_TEST_CASE( &adjacent_filtered_example_test ) );
+
+ return test;
+}
\ No newline at end of file

Added: trunk/libs/range/test/adaptor_test/copied.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/copied.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,84 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/copied.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+
+#include <algorithm>
+#include <deque>
+#include <string>
+#include <vector>
+#include <boost/range/algorithm_ext.hpp>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void copied_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ // This is my preferred syntax using the | operator.
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | copied(0u, c.size()));
+
+ // This is the alternative syntax preferred by some.
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::copy(c, 0u, c.size()));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_result1.begin(), test_result1.end(),
+ c.begin(), c.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_result2.begin(), test_result2.end(),
+ c.begin(), c.end() );
+ }
+
+ template< class Container >
+ void copied_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // test empty collection
+ copied_test_impl(c);
+
+ // test one element
+ c += 1;
+ copied_test_impl(c);
+
+ // test many elements
+ c += 1,2,2,2,3,4,4,4,4,5,6,7,8,9,9;
+ copied_test_impl(c);
+ }
+
+ void copied_test()
+ {
+ copied_test_impl< std::vector< int > >();
+ copied_test_impl< std::deque< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.copied" );
+
+ test->add( BOOST_TEST_CASE( &boost::copied_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/copied_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/copied_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/copied.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+namespace
+{
+ void copied_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | copied(1, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 2,3,4,5;
+
+ std::vector<int> test;
+ boost::push_back(test, input | copied(1, 5));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.copied_example" );
+
+ test->add( BOOST_TEST_CASE( &copied_example_test ) );
+
+ return test;
+}
\ No newline at end of file

Added: trunk/libs/range/test/adaptor_test/filtered.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/filtered.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,135 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/filtered.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <string>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct always_false_pred
+ {
+ template< class T1 >
+ bool operator()(T1) const { return false; }
+ };
+
+ struct always_true_pred
+ {
+ template< class T1 >
+ bool operator()(T1) const { return true; }
+ };
+
+ struct is_even
+ {
+ template< class IntegerT >
+ bool operator()( IntegerT x ) const { return x % 2 == 0; }
+ };
+
+ struct is_odd
+ {
+ template< class IntegerT >
+ bool operator()( IntegerT x ) const { return x % 2 != 0; }
+ };
+
+ template< class Container, class Pred >
+ void filtered_test_impl( Container& c, Pred pred )
+ {
+ using namespace boost::adaptors;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ // This is my preferred syntax using the | operator.
+ std::vector< value_t > test_result1;
+ boost::push_back(test_result1, c | filtered(pred));
+
+ // This is an alternative syntax preferred by some.
+ std::vector< value_t > test_result2;
+ boost::push_back(test_result2, adaptors::filter(c, pred));
+
+ // Calculate the reference result.
+ std::vector< value_t > reference_result;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iter_t;
+ for (iter_t it = c.begin(); it != c.end(); ++it)
+ {
+ if (pred(*it))
+ reference_result.push_back(*it);
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result1.begin(),
+ test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result2.begin(),
+ test_result2.end() );
+ }
+
+ template< class Container, class Pred >
+ void filtered_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // test empty container
+ filtered_test_impl(c, Pred());
+
+ // test one element
+ c += 1;
+ filtered_test_impl(c, Pred());
+
+ // test many elements
+ c += 1,2,2,2,3,4,4,4,4,5,6,7,8,9,9;
+ filtered_test_impl(c, Pred());
+ }
+
+ template< class Container >
+ void filtered_test_all_predicates()
+ {
+ filtered_test_impl< Container, always_false_pred >();
+ filtered_test_impl< Container, always_true_pred >();
+ filtered_test_impl< Container, is_odd >();
+ filtered_test_impl< Container, is_even >();
+ }
+
+ void filtered_test()
+ {
+ filtered_test_all_predicates< std::vector< int > >();
+ filtered_test_all_predicates< std::list< int > >();
+ filtered_test_all_predicates< std::set< int > >();
+ filtered_test_all_predicates< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.filtered" );
+
+ test->add( BOOST_TEST_CASE( &boost::filtered_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/filtered_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/filtered_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ struct is_even
+ {
+ bool operator()( int x ) const { return x % 2 == 0; }
+ };
+
+ void filtered_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | filtered(is_even()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ std::vector<int> reference;
+ reference += 2,4,6,8;
+
+ std::vector<int> test;
+ boost::push_back(test, input | filtered(is_even()));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.filtered_example" );
+
+ test->add( BOOST_TEST_CASE( &filtered_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/indexed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/indexed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/indexed.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void indexed_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ // This is my preferred syntax using the | operator.
+ std::vector< value_t > test_result1;
+ boost::push_back(test_result1, c | indexed(0));
+
+ // This is an alternative syntax preferred by some.
+ std::vector< value_t > test_result2;
+ boost::push_back(test_result2, adaptors::index(c, 0));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( c.begin(), c.end(),
+ test_result1.begin(), test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( c.begin(), c.end(),
+ test_result2.begin(), test_result2.end() );
+
+ boost::indexed_range< Container > test_result3
+ = c | indexed(0);
+
+ typedef BOOST_DEDUCED_TYPENAME boost::range_const_iterator<
+ boost::indexed_range< Container > >::type iter_t;
+
+ iter_t it = test_result3.begin();
+ for (std::size_t i = 0, count = c.size(); i < count; ++i)
+ {
+ BOOST_CHECK_EQUAL( i, static_cast<std::size_t>(it.index()) );
+ ++it;
+ }
+
+ }
+
+ template< class Container >
+ void indexed_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // test empty container
+ indexed_test_impl(c);
+
+ // test one element
+ c += 1;
+ indexed_test_impl(c);
+
+ // test many elements
+ c += 1,2,2,2,3,4,4,4,4,5,6,7,8,9,9;
+ indexed_test_impl(c);
+ }
+
+ void indexed_test()
+ {
+ indexed_test_impl< std::vector< int > >();
+ indexed_test_impl< std::list< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.indexed" );
+
+ test->add( BOOST_TEST_CASE( &boost::indexed_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/indexed_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/indexed_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,95 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/indexed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ template<class Iterator>
+ void display_element_and_index(Iterator first, Iterator last)
+ {
+ for (Iterator it = first; it != last; ++it)
+ {
+ std::cout << "Element = " << *it << " Index = " << it.index() << std::endl;
+ }
+ }
+
+ template<class SinglePassRange>
+ void display_element_and_index(const SinglePassRange& rng)
+ {
+ display_element_and_index(boost::begin(rng), boost::end(rng));
+ }
+
+ template<class Iterator1, class Iterator2>
+ void check_element_and_index(
+ Iterator1 test_first,
+ Iterator1 test_last,
+ Iterator2 reference_first,
+ Iterator2 reference_last)
+ {
+ BOOST_CHECK_EQUAL( std::distance(test_first, test_last),
+ std::distance(reference_first, reference_last) );
+
+ int reference_index = 0;
+
+ Iterator1 test_it = test_first;
+ Iterator2 reference_it = reference_first;
+ for (; test_it != test_last; ++test_it, ++reference_it, ++reference_index)
+ {
+ BOOST_CHECK_EQUAL( *test_it, *reference_it );
+ BOOST_CHECK_EQUAL( test_it.index(), reference_index );
+ }
+ }
+
+ template<class SinglePassRange1, class SinglePassRange2>
+ void check_element_and_index(
+ const SinglePassRange1& test_rng,
+ const SinglePassRange2& reference_rng)
+ {
+ check_element_and_index(boost::begin(test_rng), boost::end(test_rng),
+ boost::begin(reference_rng), boost::end(reference_rng));
+ }
+
+ void indexed_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 10,20,30,40,50,60,70,80,90;
+
+ display_element_and_index( input | indexed(0) );
+
+ check_element_and_index(
+ input | indexed(0),
+ input);
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.indexed_example" );
+
+ test->add( BOOST_TEST_CASE( &indexed_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/indirected.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/indirected.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/indirected.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+
+ template< class Container >
+ void indirected_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ // This is my preferred syntax using the | operator.
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | indirected);
+
+ // This is an alternative syntax preferred by some.
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::indirect(c));
+
+ // Calculate the reference result.
+ std::vector< int > reference_result;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iter_t;
+ for (iter_t it = c.begin(); it != c.end(); ++it)
+ {
+ reference_result.push_back(**it);
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result1.begin(),
+ test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_result.begin(),
+ reference_result.end(),
+ test_result2.begin(),
+ test_result2.end() );
+ }
+
+ template< class Container >
+ void indirected_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ indirected_test_impl(c);
+
+ c += boost::shared_ptr<int>(new int(1));
+ indirected_test_impl(c);
+
+ std::vector<int> v;
+ v += 1,1,2,2,2,3,4,4,4,4,5,6,7,8,9,9;
+ for (std::vector<int>::const_iterator it = v.begin(); it != v.end(); ++it)
+ {
+ c += boost::shared_ptr<int>(new int(*it));
+ }
+ indirected_test_impl(c);
+ }
+
+ void indirected_test()
+ {
+ indirected_test_impl< std::vector< boost::shared_ptr< int > > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.indirected" );
+
+ test->add( BOOST_TEST_CASE( &boost::indirected_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/indirected_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/indirected_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,60 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/indirected.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/shared_ptr.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void indirected_example_test()
+ {
+ using namespace boost::adaptors;
+
+ std::vector<boost::shared_ptr<int> > input;
+
+ for (int i = 0; i < 10; ++i)
+ input.push_back(boost::shared_ptr<int>(new int(i)));
+
+ boost::copy(
+ input | indirected,
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ for (int i = 0; i < 10; ++i)
+ reference.push_back(i);
+
+ std::vector<int> test;
+ boost::push_back(test, input | indirected);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.indirected_example" );
+
+ test->add( BOOST_TEST_CASE( &indirected_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/map.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/map.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,127 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/map.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <map>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void map_test_keys( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ std::vector<int> keys;
+ boost::push_back(keys, c | map_keys);
+
+ std::vector<int> keys2;
+ boost::push_back(keys2, adaptors::keys(c));
+
+ std::vector<int> reference_keys;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iter_t;
+ for (iter_t it = c.begin(); it != c.end(); ++it)
+ {
+ reference_keys.push_back(it->first);
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_keys.begin(),
+ reference_keys.end(),
+ keys.begin(),
+ keys.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_keys.begin(),
+ reference_keys.end(),
+ keys2.begin(),
+ keys2.end() );
+ }
+
+ template< class Container >
+ void map_test_values( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ std::vector<int> values;
+ boost::push_back(values, c | map_values);
+
+ std::vector<int> values2;
+ boost::push_back(values2, adaptors::values(c));
+
+ std::vector<int> reference_values;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iter_t;
+ for (iter_t it = c.begin(); it != c.end(); ++it)
+ {
+ reference_values.push_back(it->second);
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_values.begin(),
+ reference_values.end(),
+ values.begin(),
+ values.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference_values.begin(),
+ reference_values.end(),
+ values2.begin(),
+ values2.end() );
+ }
+
+ template< class Container >
+ void map_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ map_test_keys(c);
+ map_test_values(c);
+
+ // Test one element
+ c.insert(std::make_pair(1,2));
+ map_test_keys(c);
+ map_test_values(c);
+
+ // Test many elements
+ for (int x = 2; x < 10; ++x)
+ {
+ c.insert(std::make_pair(x, x * 2));
+ }
+ map_test_keys(c);
+ map_test_values(c);
+ }
+
+ void map_test()
+ {
+ map_test_impl< std::map<int,int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.map" );
+
+ test->add( BOOST_TEST_CASE( &boost::map_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/map_keys_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/map_keys_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,60 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void map_keys_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int,int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_keys,
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 0,1,2,3,4,5,6,7,8,9;
+
+ std::vector<int> test;
+ boost::push_back(test, input | map_keys);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.map_keys_example" );
+
+ test->add( BOOST_TEST_CASE( &map_keys_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/map_values_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/map_values_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,60 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <map>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void map_values_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::map<int,int> input;
+ for (int i = 0; i < 10; ++i)
+ input.insert(std::make_pair(i, i * 10));
+
+ boost::copy(
+ input | map_values,
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 0,10,20,30,40,50,60,70,80,90;
+
+ std::vector<int> test;
+ boost::push_back(test, input | map_values);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.map_values_example" );
+
+ test->add( BOOST_TEST_CASE( &map_values_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/replaced.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/replaced.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,87 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/replaced.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void replaced_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ const int value_to_replace = 1;
+ const int replacement_value = 0;
+
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | replaced(value_to_replace, replacement_value));
+
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::replace(c, value_to_replace, replacement_value));
+
+ std::vector< int > reference( c.begin(), c.end() );
+ std::replace(reference.begin(), reference.end(), value_to_replace, replacement_value);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result1.begin(), test_result1.end() );
+ }
+
+ template< class Container >
+ void replaced_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ replaced_test_impl(c);
+
+ // Test one
+ c += 1;
+ replaced_test_impl(c);
+
+ // Test many
+ c += 1,1,1,2,2,2,3,3,3,3,3,4,5,6,6,6,7,8,9;
+ replaced_test_impl(c);
+ }
+
+ void replaced_test()
+ {
+ replaced_test_impl< std::vector< int > >();
+ replaced_test_impl< std::list< int > >();
+ replaced_test_impl< std::set< int > >();
+ replaced_test_impl< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.replaced" );
+
+ test->add( BOOST_TEST_CASE( &boost::replaced_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/replaced_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/replaced_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/replaced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void replaced_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,2,5,2,7,2,9;
+
+ boost::copy(
+ input | replaced(2, 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 1,10,3,10,5,10,7,10,9;
+
+ std::vector<int> test;
+ boost::push_back(test, input | replaced(2, 10));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.replaced_example" );
+
+ test->add( BOOST_TEST_CASE( &replaced_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/replaced_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/replaced_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,96 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/replaced_if.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct if_value_is_one
+ {
+ bool operator()(int x) const { return x == 1; }
+ };
+
+ template< class Container >
+ void replaced_if_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ if_value_is_one pred;
+
+ const int replacement_value = 0;
+
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | replaced_if(pred, replacement_value));
+
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, boost::adaptors::replace_if(c, pred, replacement_value));
+
+ std::vector< int > reference( c.begin(), c.end() );
+ std::replace_if(reference.begin(), reference.end(), pred, replacement_value);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result1.begin(), test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result2.begin(), test_result2.end() );
+ }
+
+ template< class Container >
+ void replaced_if_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ replaced_if_test_impl(c);
+
+ // Test one
+ c += 1;
+ replaced_if_test_impl(c);
+
+ // Test many
+ c += 1,1,1,2,2,2,3,3,3,3,3,4,5,6,6,6,7,8,9;
+ replaced_if_test_impl(c);
+ }
+
+ void replaced_if_test()
+ {
+ replaced_if_test_impl< std::vector< int > >();
+ replaced_if_test_impl< std::list< int > >();
+ replaced_if_test_impl< std::set< int > >();
+ replaced_if_test_impl< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.replaced_if" );
+
+ test->add( BOOST_TEST_CASE( &boost::replaced_if_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/replaced_if_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/replaced_if_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,62 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/replaced_if.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ struct is_even
+ {
+ bool operator()(int x) const { return x % 2 == 0; }
+ };
+
+ void replaced_if_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | replaced_if(is_even(), 10),
+ std::ostream_iterator<int>(std::cout, ","));
+
+ std::vector<int> reference;
+ reference += 1,10,3,10,5,10,7,10,9;
+
+ std::vector<int> test;
+ boost::push_back(test, input | replaced_if(is_even(), 10));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.replaced_if_example" );
+
+ test->add( BOOST_TEST_CASE( &replaced_if_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/reversed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/reversed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,84 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/reversed.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ template< class Container >
+ void reversed_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | reversed);
+
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::reverse(c));
+
+ std::vector< int > reference( c.rbegin(), c.rend() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result1.begin(), test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result2.begin(), test_result2.end() );
+ }
+
+ template< class Container >
+ void reversed_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ reversed_test_impl(c);
+
+ // Test one
+ c += 1;
+ reversed_test_impl(c);
+
+ // Test many
+ c += 1,1,1,2,2,2,2,2,3,3,3,3,3,3,4,5,6,7,8,9;
+ reversed_test_impl(c);
+ }
+
+ void reversed_test()
+ {
+ reversed_test_impl< std::vector< int > >();
+ reversed_test_impl< std::list< int > >();
+ reversed_test_impl< std::set< int > >();
+ reversed_test_impl< std::multiset< int > >();
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.reversed" );
+
+ test->add( BOOST_TEST_CASE( &boost::reversed_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/reversed_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/reversed_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,55 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void reversed_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | reversed,
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> test;
+ boost::push_back(test, input | reversed);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( input.rbegin(), input.rend(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.reversed_example" );
+
+ test->add( BOOST_TEST_CASE( &reversed_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/sliced.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/sliced.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/sliced.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void sliced_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector< value_t > test_result1;
+ boost::push_back(test_result1, c | sliced(0u,c.size()));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_result1.begin(), test_result1.end(),
+ c.begin(), c.end() );
+
+ std::vector< value_t > test_alt_result1;
+ boost::push_back(test_alt_result1, adaptors::slice(c, 0u, c.size()));
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_alt_result1.begin(), test_alt_result1.end(),
+ c.begin(), c.end() );
+
+ BOOST_CHECK( boost::empty(c | sliced(0u, 0u)) );
+
+ const std::size_t half_count = c.size() / 2u;
+ if (half_count > 0u)
+ {
+ std::vector< value_t > test_result2;
+ boost::push_back(test_result2, c | sliced(0u, half_count));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_result2.begin(), test_result2.end(),
+ c.begin(), c.begin() + half_count );
+
+ std::vector< value_t > test_alt_result2;
+ boost::push_back(test_alt_result2, adaptors::slice(c, 0u, half_count));
+ BOOST_CHECK_EQUAL_COLLECTIONS( test_alt_result2.begin(), test_alt_result2.end(),
+ c.begin(), c.begin() + half_count );
+ }
+ }
+
+ template< class Container >
+ void sliced_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ sliced_test_impl(c);
+
+ // Test one element
+ c += 1;
+ sliced_test_impl(c);
+
+ // Test many elements
+ c += 1,1,1,2,2,3,4,5,6,6,6,7,8,9;
+ sliced_test_impl(c);
+ }
+
+ void sliced_test()
+ {
+ sliced_test_impl< std::vector< int > >();
+ sliced_test_impl< std::deque< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.sliced" );
+
+ test->add( BOOST_TEST_CASE( &boost::sliced_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/sliced_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/sliced_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void sliced_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9;
+
+ boost::copy(
+ input | sliced(2, 5),
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 3,4,5;
+
+ std::vector<int> test;
+ boost::push_back(test, input | sliced(2, 5));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.sliced_example" );
+
+ test->add( BOOST_TEST_CASE( &sliced_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/strided.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/strided.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,111 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/strided.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ const int STRIDE_SIZE = 2;
+
+ template< class Container >
+ void strided_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ BOOST_ASSERT( c.size() % STRIDE_SIZE == 0 );
+
+ Container reference;
+
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iterator_t;
+ iterator_t it = c.begin();
+ for (iterator_t last = c.end();
+ it != last; it += STRIDE_SIZE)
+ {
+ reference.push_back(*it);
+ }
+ }
+
+ Container test;
+ boost::push_back( test, c | strided(2) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test.begin(), test.end(),
+ reference.begin(), reference.end() );
+
+ Container test2;
+ boost::push_back( test2, adaptors::stride(c, 2) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test2.begin(), test2.end(),
+ reference.begin(), reference.end() );
+
+ // Test the const versions:
+ const Container& cc = c;
+ Container test3;
+ boost::push_back( test3, cc | strided(2) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test3.begin(), test3.end(),
+ reference.begin(), reference.end() );
+
+ Container test4;
+ boost::push_back( test4, adaptors::stride(cc, 2) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test4.begin(), test4.end(),
+ reference.begin(), reference.end() );
+ }
+
+ template< class Container >
+ void strided_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ strided_test_impl(c);
+
+ // Test two elements
+ c += 1,2;
+ strided_test_impl(c);
+
+ // Test many elements
+ c += 1,1,1,2,2,3,4,5,6,6,6,7,8,9;
+ strided_test_impl(c);
+ }
+
+ void strided_test()
+ {
+ strided_test_impl< std::vector< int > >();
+ strided_test_impl< std::deque< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.strided" );
+
+ test->add( BOOST_TEST_CASE( &boost::strided_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/strided_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/strided_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/strided.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ void strided_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | strided(2),
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 1,3,5,7,9;
+
+ std::vector<int> test;
+ boost::push_back(test, input | strided(2));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.strided_example" );
+
+ test->add( BOOST_TEST_CASE( &strided_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/tokenized.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/tokenized.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,79 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/tokenized.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Iterator, class Container >
+ void tokenized_test_impl( Container& c, std::size_t expected_result )
+ {
+ using namespace boost::adaptors;
+
+ std::vector< boost::sub_match< Iterator > > test_result1;
+ boost::push_back(test_result1, c | tokenized(boost::regex("\\b")));
+
+ BOOST_CHECK_EQUAL( test_result1.size(), expected_result );
+
+// std::vector< boost::sub_match< Iterator > > test_result2;
+// boost::push_back(test_result2, adaptors::tokenize(c, boost::regex("\\b")));
+
+// BOOST_CHECK_EQUAL( test_result2.size(), expected_result );
+ }
+
+ template< class Container1, class Container2 >
+ void tokenized_test_impl()
+ {
+ Container1 c;
+ Container2& r = c;
+
+ typedef typename boost::range_iterator<Container2>::type It;
+
+ // Test empty
+ tokenized_test_impl<It, Container2>(r, 0u);
+
+ // Test one element
+ c = "a";
+ tokenized_test_impl<It, Container2>(r, 2u);
+
+ // Test many elements
+ c = "a b c d e f g hijlmnopqrstuvwxyz";
+ tokenized_test_impl<It, Container2>(r, 16u);
+ }
+
+ void tokenized_test()
+ {
+// tokenized_test_impl<std::string, const std::string>();
+ tokenized_test_impl<std::string, std::string>();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.tokenized" );
+
+ test->add( BOOST_TEST_CASE( &boost::tokenized_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/transformed.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/transformed.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,107 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/transformed.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct double_x
+ {
+ typedef int result_type;
+ int operator()(int x) const { return x * 2; }
+ };
+
+ struct halve_x
+ {
+ typedef int result_type;
+ int operator()(int x) const { return x / 2; }
+ };
+
+ template< class Container, class TransformFn >
+ void transformed_test_impl_core( Container& c, TransformFn fn )
+ {
+ using namespace boost::adaptors;
+
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | transformed(fn));
+
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::transform(c, fn));
+
+ std::vector< int > reference;
+ std::transform(c.begin(), c.end(), std::back_inserter(reference), fn);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result1.begin(), test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result2.begin(), test_result2.end() );
+ }
+
+ template< class Container, class TransformFn >
+ void transformed_test_fn_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+ TransformFn fn;
+
+ // Test empty
+ transformed_test_impl_core(c, fn);
+
+ // Test one element
+ c += 1;
+ transformed_test_impl_core(c, fn);
+
+ // Test many elements
+ c += 1,1,1,2,2,2,2,2,3,4,5,6,7,8,9;
+ transformed_test_impl_core(c, fn);
+ }
+
+ template< class Container >
+ void transformed_test_impl()
+ {
+ transformed_test_fn_impl< Container, double_x >();
+ transformed_test_fn_impl< Container, halve_x >();
+ }
+
+ void transformed_test()
+ {
+ transformed_test_impl< std::vector< int > >();
+ transformed_test_impl< std::list< int > >();
+ transformed_test_impl< std::set< int > >();
+ transformed_test_impl< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.transformed" );
+
+ test->add( BOOST_TEST_CASE( &boost::transformed_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/transformed_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/transformed_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+namespace
+{
+ struct double_int
+ {
+ typedef int result_type;
+ int operator()(int x) const { return x * 2; }
+ };
+
+ void transformed_example_test()
+ {
+ using namespace boost::adaptors;
+ using namespace boost::assign;
+
+ std::vector<int> input;
+ input += 1,2,3,4,5,6,7,8,9,10;
+
+ boost::copy(
+ input | transformed(double_int()),
+ std::ostream_iterator<int>(std::cout, ","));
+
+
+ std::vector<int> reference;
+ reference += 2,4,6,8,10,12,14,16,18,20;
+
+ std::vector<int> test;
+ boost::push_back(test, input | transformed(double_int()));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.transformed_example" );
+
+ test->add( BOOST_TEST_CASE( &transformed_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/uniqued.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/uniqued.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,89 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/uniqued.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void uniqued_test_impl( Container& c )
+ {
+ using namespace boost::adaptors;
+
+ std::vector< int > test_result1;
+ boost::push_back(test_result1, c | uniqued);
+
+ std::vector< int > test_result2;
+ boost::push_back(test_result2, adaptors::unique(c));
+
+ std::vector< int > reference(c.begin(), c.end());
+ reference.erase(
+ std::unique(reference.begin(), reference.end()),
+ reference.end());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result1.begin(), test_result1.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result2.begin(), test_result2.end() );
+ }
+
+ template< class Container >
+ void uniqued_test_impl()
+ {
+ using namespace boost::assign;
+
+ Container c;
+
+ // Test empty
+ uniqued_test_impl(c);
+
+ // Test one
+ c += 1;
+ uniqued_test_impl(c);
+
+ // Test many
+ c += 1,1,1,2,2,2,2,2,3,3,3,3,4,5,6,6,6,7,7,7,8,8,9,9,9,9,9,10;
+ uniqued_test_impl(c);
+ }
+
+ void uniqued_test()
+ {
+ uniqued_test_impl< std::vector< int > >();
+ uniqued_test_impl< std::list< int > >();
+ uniqued_test_impl< std::set< int > >();
+ uniqued_test_impl< std::multiset< int > >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.uniqued" );
+
+ test->add( BOOST_TEST_CASE( &boost::uniqued_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptor_test/uniqued_example.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptor_test/uniqued_example.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,57 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/adaptor/uniqued.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+#include <boost/range/algorithm_ext/push_back.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+namespace
+{
+ void uniqued_example_test()
+ {
+ using namespace boost::assign;
+ using namespace boost::adaptors;
+
+ std::vector<int> input;
+ input += 1,1,2,2,2,3,4,5,6;
+
+ boost::copy(
+ input | uniqued,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ std::vector<int> reference;
+ reference += 1,2,3,4,5,6;
+
+ std::vector<int> test;
+ boost::push_back( test, input | uniqued );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.uniqued_example" );
+
+ test->add( BOOST_TEST_CASE( &uniqued_example_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/adaptors.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/adaptors.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,238 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#include <boost/range/adaptors.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/foreach.hpp>
+#include <boost/assign/list_of.hpp>
+#include <vector>
+#include <list>
+#include <string>
+#include <map>
+
+template< class T >
+struct less_than
+{
+ T val;
+
+ less_than() : val(0)
+ {}
+
+ less_than( T t ) : val(t)
+ {}
+
+ bool operator()( const T& r ) const
+ {
+ return r < val;
+ }
+};
+
+
+
+template< class T >
+struct multiply
+{
+ T val;
+
+ typedef T& result_type;
+
+ multiply( T t ) : val(t)
+ { }
+
+ T& operator()( T& r ) const
+ {
+ return r *= 2;
+ }
+};
+
+
+
+template< class Rng >
+void check_copy( Rng r )
+{
+ //
+ // Make sure the generated iterators
+ // can actually be copied
+ //
+ Rng r2 = r;
+ r2 = r;
+}
+
+
+
+template< class Rng >
+void check()
+{
+ using namespace boost::adaptors;
+
+ Rng rng = boost::assign::list_of(1)(2)(3)(4)(5).to_container( rng );
+ Rng out;
+
+ //
+ // test each alphabetically
+ //
+ BOOST_FOREACH( int i, rng | filtered( less_than<int>(4) )
+ /*| reversed*/
+ | transformed( multiply<int>(2) ) )
+ {
+ out.push_back( i );
+ }
+
+ BOOST_CHECK_EQUAL( out.size(), 3u );
+ BOOST_CHECK_EQUAL( *out.begin(), 2 );
+ BOOST_CHECK_EQUAL( *boost::next(out.begin()), 4 );
+ BOOST_CHECK_EQUAL( *boost::next(out.begin(),2), 6 );
+
+ rng = boost::assign::list_of(1)(1)(2)(2)(3)(3)(4)(5).to_container( rng );
+ out.clear();
+ /*
+ BOOST_FOREACH( int i, rng | adjacent_filtered( std::equal_to<int>() )
+ | uniqued )
+ {
+
+ out.push_back( i );
+ }*/
+
+}
+
+
+
+template< class IndirectRng >
+void check_indirect()
+{
+ using namespace boost::adaptors;
+
+ IndirectRng rng;
+
+ std::vector< boost::shared_ptr< int > > holder;
+
+ for( unsigned i = 0u; i != 20u; ++i )
+ {
+ boost::shared_ptr<int> v(new int(i));
+ rng.push_back( v.get() );
+ }
+
+ BOOST_FOREACH( int& i, rng | indirected | reversed
+ | transformed( multiply<int>(2) ) )
+ {
+ i += 1;
+ }
+
+
+
+}
+
+
+
+template< class RandomAccessRng >
+void check_random_access()
+{
+ using namespace boost::adaptors;
+
+ RandomAccessRng rng(1, 20u);
+ RandomAccessRng out;
+
+ BOOST_FOREACH( int i, rng | reversed
+ | transformed( multiply<int>(2) )
+ /* | sliced(0,15) */ )
+ {
+ out.push_back( i );
+ }
+
+
+ BOOST_FOREACH( int i, rng | copied(3u,13u) )
+ {
+ out.push_back( i );
+ }
+}
+
+
+
+template< class Map >
+void check_map()
+{
+ using namespace boost::adaptors;
+
+ Map m;
+ m.insert( std::make_pair(1,2) );
+ m.insert( std::make_pair(2,2) );
+ m.insert( std::make_pair(3,2) );
+ m.insert( std::make_pair(4,2) );
+ m.insert( std::make_pair(5,2) );
+ m.insert( std::make_pair(6,2) );
+ m.insert( std::make_pair(7,2) );
+
+ std::vector<int> keys
+ = boost::copy_range< std::vector<int> >( m | map_keys );
+ std::vector<int> values
+ = boost::copy_range< std::vector<int> >( m | map_values );
+}
+
+
+
+void check_regex()
+{
+ using namespace boost::adaptors;
+ std::string s("This is a string of tokens");
+ std::vector<std::string> tokens =
+ boost::copy_range< std::vector<std::string> >( s | tokenized( "\\s+", -1 ) );
+}
+
+
+void check_adaptors()
+{
+ check< std::vector<int> >();
+ check< std::list<int> >();
+ check_indirect< std::vector<int*> >();
+ check_indirect< std::list<int*> >();
+
+ check_map< std::map<int,int> >();
+// check_random_access< std::vector<int> >();
+ check_regex();
+
+ using namespace boost::adaptors;
+ std::vector<int> vec(10u,20);
+ std::vector<int*> pvec;
+ std::map<int,int> map;
+
+ check_copy( vec | adjacent_filtered( std::equal_to<int>() ) );
+ // check_copy( vec | indexed );
+ check_copy( vec | reversed );
+ check_copy( vec | uniqued );
+ check_copy( pvec | indirected );
+
+// check_copy( vec | sliced(1,5) );
+ //
+ // This does not return an iterator_range<>, so
+ // won't pass this test of implicit conversion
+ // check_copy( vec | copied(1,5) );
+ //
+ check_copy( map | map_values );
+ check_copy( map | map_keys );
+ check_copy( std::string( "a string" ) | tokenized( "\\s+", -1 ) );
+ check_copy( vec | filtered( less_than<int>(2) ) );
+ check_copy( vec | transformed( multiply<int>(2) ) );
+}
+
+using boost::unit_test::test_suite;
+
+test_suite* init_unit_test_suite( int argc, char* argv[] )
+{
+ using namespace boost;
+
+ test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - Adaptors" );
+
+ test->add( BOOST_TEST_CASE( &check_adaptors ) );
+
+ return test;
+}
+
+

Modified: trunk/libs/range/test/adl_conformance.cpp
==============================================================================
--- trunk/libs/range/test/adl_conformance.cpp (original)
+++ trunk/libs/range/test/adl_conformance.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -27,38 +27,41 @@
     global_namespace
 };
 
-namespace boost
+// Use boost_test rather than boost as the namespace for this test
+// to allow the test framework to use boost::begin() etc. without
+// violating the One Defintion Rule.
+namespace boost_test
 {
     namespace range_detail
     {
         template< class Range >
         inline typename Range::iterator begin( Range& r )
         {
- return boost_namespace;
+ return boost_namespace;
         }
-
+
         template< class Range >
         inline typename Range::iterator begin( const Range& r )
         {
- return boost_namespace;
+ return boost_namespace;
         }
 
     }
-
+
     template< class Range >
     inline typename Range::iterator begin( Range& r )
     {
         using range_detail::begin; // create ADL hook
         return begin( r );
     }
-
+
     template< class Range >
     inline typename Range::iterator begin( const Range& r )
     {
         using range_detail::begin; // create ADL hook
         return begin( r );
     }
-}
+} // 'boost_test'
 
 
 namespace find_templated
@@ -74,7 +77,7 @@
         iterator end() { return unused; }
         iterator end() const { return unused; }
     };
-
+
     //
     // A fully generic version here will create
     // ambiguity.
@@ -84,7 +87,7 @@
     {
         return templated_namespace;
     }
-
+
     template< class T >
     inline typename range<T>::iterator begin( const range<T>& r )
     {
@@ -98,20 +101,20 @@
     struct range
     {
         typedef adl_types iterator;
-
+
         range() { /* allow const objects */ }
         iterator begin() { return unused; }
         iterator begin() const { return unused; }
         iterator end() { return unused; }
         iterator end() const { return unused; }
     };
-
+
     inline range::iterator begin( range& r )
     {
         return non_templated_namespace;
     }
-
-
+
+
     inline range::iterator begin( const range& r )
     {
         return non_templated_namespace;
@@ -132,12 +135,12 @@
 inline range::iterator begin( range& r )
 {
     return global_namespace;
-}
+}
 
 inline range::iterator begin( const range& r )
 {
     return global_namespace;
-}
+}
 
 void check_adl_conformance()
 {
@@ -147,29 +150,29 @@
     const find_non_templated::range r4;
     range r5;
     const range r6;
-
+
     //
- // Notice how ADL kicks in even when we have qualified
+ // Notice how ADL kicks in even when we have qualified
     // notation!
     //
-
 
- BOOST_CHECK( boost::begin( r ) != boost_namespace );
- BOOST_CHECK( boost::begin( r2 ) != boost_namespace );
- BOOST_CHECK( boost::begin( r3 ) != boost_namespace );
- BOOST_CHECK( boost::begin( r4 ) != boost_namespace );
- BOOST_CHECK( boost::begin( r5 ) != boost_namespace );
- BOOST_CHECK( boost::begin( r6 ) != boost_namespace );
-
- BOOST_CHECK_EQUAL( boost::begin( r ), templated_namespace ) ;
- BOOST_CHECK_EQUAL( boost::begin( r2 ), templated_namespace );
- BOOST_CHECK_EQUAL( boost::begin( r3 ), non_templated_namespace );
- BOOST_CHECK_EQUAL( boost::begin( r4 ), non_templated_namespace );
- BOOST_CHECK_EQUAL( boost::begin( r5 ), global_namespace );
- BOOST_CHECK_EQUAL( boost::begin( r6 ), global_namespace );
+
+ BOOST_CHECK( boost_test::begin( r ) != boost_namespace );
+ BOOST_CHECK( boost_test::begin( r2 ) != boost_namespace );
+ BOOST_CHECK( boost_test::begin( r3 ) != boost_namespace );
+ BOOST_CHECK( boost_test::begin( r4 ) != boost_namespace );
+ BOOST_CHECK( boost_test::begin( r5 ) != boost_namespace );
+ BOOST_CHECK( boost_test::begin( r6 ) != boost_namespace );
+
+ BOOST_CHECK_EQUAL( boost_test::begin( r ), templated_namespace ) ;
+ BOOST_CHECK_EQUAL( boost_test::begin( r2 ), templated_namespace );
+ BOOST_CHECK_EQUAL( boost_test::begin( r3 ), non_templated_namespace );
+ BOOST_CHECK_EQUAL( boost_test::begin( r4 ), non_templated_namespace );
+ BOOST_CHECK_EQUAL( boost_test::begin( r5 ), global_namespace );
+ BOOST_CHECK_EQUAL( boost_test::begin( r6 ), global_namespace );
 }
 
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test_framework.hpp>
 
 using boost::unit_test_framework::test_suite;
 

Added: trunk/libs/range/test/algorithm.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,471 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+// (C) Copyright Eric Niebler 2004.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+ Revision history:
+ 13 December 2004 : Initial version.
+*/
+
+#ifdef _MSC_VER
+// The 'secure' library warnings produce so much noise that it makes it
+// impossible to see more useful warnings.
+ #define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#ifdef _MSC_VER
+ // counting_iterator generates a warning about truncating an integer
+ #pragma warning(push)
+ #pragma warning(disable : 4244)
+#endif
+#include <boost/iterator/counting_iterator.hpp>
+#ifdef _MSC_VER
+ template ::boost::counting_iterator<int>;
+ #pragma warning(pop)
+#endif
+
+#include <boost/assign.hpp>
+#include <boost/array.hpp>
+#include <boost/bind.hpp>
+#include <boost/range/numeric.hpp>
+#include <boost/range/algorithm.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/range/size.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/iterator/iterator_traits.hpp>
+
+#include <algorithm>
+#include <cstdlib>
+#include <set>
+#include <list>
+#include <vector>
+#include <iterator>
+#include <functional>
+///////////////////////////////////////////////////////////////////////////////
+// dummy function object, used with algorithms
+//
+struct null_fun
+{
+ template<typename T>
+ void operator()(T const &t) const
+ {
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// dummy predicate, used with algorithms
+//
+struct null_pred
+{
+ template<typename T>
+ bool operator()(T const &t) const
+ {
+ return t == T();
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// dummy unary op, used with algorithms
+//
+struct null_op1
+{
+ template<typename T>
+ T const & operator()(T const & t) const
+ {
+ return t;
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// dummy binary op, used with algorithms
+//
+struct null_op2
+{
+ template<typename T,typename U>
+ T const & operator()(T const & t, U const & u) const
+ {
+ return t;
+ }
+};
+
+template<typename Rng>
+void test_random_algorithms(Rng & rng, std::random_access_iterator_tag)
+{
+ typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<Rng>::type iterator;
+ typedef BOOST_DEDUCED_TYPENAME boost::range_value<Rng>::type value_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::range_size<Rng>::type size_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::iterator_category<iterator>::type iterator_category;
+
+ // just make sure these compile (for now)
+ if(0)
+ {
+ boost::random_shuffle(rng);
+
+ // Must be a value since random_shuffle must take the generator by
+ // reference to match the standard.
+ null_op1 rng_generator;
+ boost::random_shuffle(rng, rng_generator);
+
+ boost::sort(rng);
+ boost::sort(rng, std::less<value_type>());
+
+ boost::stable_sort(rng);
+ boost::stable_sort(rng, std::less<value_type>());
+
+ boost::partial_sort(rng, boost::begin(rng));
+ boost::partial_sort(rng, boost::begin(rng), std::less<value_type>());
+
+ boost::nth_element(rng, boost::begin(rng));
+ boost::nth_element(rng, boost::begin(rng), std::less<value_type>());
+
+ boost::push_heap(rng);
+ boost::push_heap(rng, std::less<value_type>());
+
+ boost::pop_heap(rng);
+ boost::pop_heap(rng, std::less<value_type>());
+
+ boost::make_heap(rng);
+ boost::make_heap(rng, std::less<value_type>());
+
+ boost::sort_heap(rng);
+ boost::sort_heap(rng, std::less<value_type>());
+ }
+}
+
+template<typename Rng>
+void test_random_algorithms(Rng & rng, std::input_iterator_tag)
+{
+ // no-op
+}
+
+template<typename Rng>
+void test_algorithms(Rng & rng)
+{
+ typedef BOOST_DEDUCED_TYPENAME boost::range_iterator<Rng>::type iterator;
+ typedef BOOST_DEDUCED_TYPENAME boost::range_value<Rng>::type value_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::range_size<Rng>::type size_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::iterator_category<iterator>::type iterator_category;
+
+ // just make sure these compile (for now)
+ if(0)
+ {
+ value_type val = value_type();
+
+ value_type rng2[] = {value_type(),value_type(),value_type()};
+ typedef value_type* iterator2;
+
+ value_type out[100] = {};
+ typedef value_type* out_iterator;
+
+ null_fun f = null_fun();
+ iterator i = iterator();
+ bool b = bool();
+ out_iterator o = out_iterator();
+ size_type s = size_type();
+
+ f = boost::for_each(rng, null_fun());
+
+ i = boost::find(rng, val);
+ i = boost::find_if(rng, null_pred());
+
+ i = boost::find_end(rng, rng2);
+ i = boost::find_end(rng, rng2, std::equal_to<value_type>());
+
+ i = boost::find_first_of(rng, rng2);
+ i = boost::find_first_of(rng, rng2, std::equal_to<value_type>());
+
+ i = boost::adjacent_find(rng);
+ i = boost::adjacent_find(rng, std::equal_to<value_type>());
+
+ s = boost::count(rng, val);
+ s = boost::count_if(rng, null_pred());
+
+ std::pair<iterator,iterator2> p1;
+ p1 = boost::mismatch(rng, rng2);
+ p1 = boost::mismatch(rng, rng2, std::equal_to<value_type>());
+
+ b = boost::equal(rng, rng2);
+ b = boost::equal(rng, rng2, std::equal_to<value_type>());
+
+ i = boost::search(rng, rng2);
+ i = boost::search(rng, rng2, std::equal_to<value_type>());
+
+ o = boost::copy(rng, boost::begin(out));
+ o = boost::copy_backward(rng, boost::end(out));
+
+ o = boost::transform(rng, boost::begin(out), null_op1());
+ o = boost::transform(rng, rng2, boost::begin(out), null_op2());
+
+ boost::replace(rng, val, val);
+ boost::replace_if(rng, null_pred(), val);
+
+/*
+ o = boost::replace_copy(rng, boost::begin(out), val, val);
+ o = boost::replace_copy_if(rng, boost::begin(out), null_pred(), val);
+*/
+
+ boost::fill(rng, val);
+ //
+ // size requires RandomAccess
+ //
+ //boost::fill_n(rng, boost::size(rng), val);
+ //boost::fill_n(rng, std::distance(boost::begin(rng),boost::end(rng)),val);
+
+ boost::generate(rng, &std::rand);
+ //
+ // size requires RandomAccess
+ //
+ //boost::generate_n(rng, boost::size(rng), &std::rand);
+ //boost::generate_n(rng,std::distance(boost::begin(rng),boost::end(rng)), &std::rand);
+
+ i = boost::remove(rng, val);
+ i = boost::remove_if(rng, null_pred());
+
+/*
+ o = boost::remove_copy(rng, boost::begin(out), val);
+ o = boost::remove_copy_if(rng, boost::begin(out), null_pred());
+*/
+
+ typename boost::range_return<Rng, boost::return_begin_found>::type rrng = boost::unique(rng);
+ rrng = boost::unique(rng, std::equal_to<value_type>());
+
+/*
+ o = boost::unique_copy(rng, boost::begin(out));
+ o = boost::unique_copy(rng, boost::begin(out), std::equal_to<value_type>());
+*/
+
+ boost::reverse(rng);
+
+/*
+ o = boost::reverse_copy(rng, boost::begin(out));
+*/
+
+ boost::rotate(rng, boost::begin(rng));
+
+/*
+ o = boost::rotate_copy(rng, boost::begin(rng), boost::begin(out));
+*/
+
+ i = boost::partition(rng, null_pred());
+ i = boost::stable_partition(rng, null_pred());
+
+/*
+ o = boost::partial_sort_copy(rng, out);
+ o = boost::partial_sort_copy(rng, out, std::less<value_type>());
+*/
+
+ i = boost::lower_bound(rng, val);
+ i = boost::lower_bound(rng, val, std::less<value_type>());
+
+ i = boost::upper_bound(rng, val);
+ i = boost::upper_bound(rng, val, std::less<value_type>());
+
+ std::pair<iterator,iterator> p2;
+ p2 = boost::equal_range(rng, val);
+ p2 = boost::equal_range(rng, val, std::less<value_type>());
+
+ b = boost::binary_search(rng, val);
+ b = boost::binary_search(rng, val, std::less<value_type>());
+
+ boost::inplace_merge(rng, boost::begin(rng));
+ boost::inplace_merge(rng, boost::begin(rng), std::less<value_type>());
+
+ b = boost::includes(rng, rng2);
+ b = boost::includes(rng, rng2, std::equal_to<value_type>());
+
+ o = boost::set_union(rng, rng2, boost::begin(out));
+ o = boost::set_union(rng, rng2, boost::begin(out), std::equal_to<value_type>());
+
+ o = boost::set_intersection(rng, rng2, boost::begin(out));
+ o = boost::set_intersection(rng, rng2, boost::begin(out), std::equal_to<value_type>());
+
+ o = boost::set_difference(rng, rng2, boost::begin(out));
+ o = boost::set_difference(rng, rng2, boost::begin(out), std::equal_to<value_type>());
+
+ o = boost::set_symmetric_difference(rng, rng2, boost::begin(out));
+ o = boost::set_symmetric_difference(rng, rng2, boost::begin(out), std::equal_to<value_type>());
+
+ i = boost::min_element(rng);
+ i = boost::min_element(rng, std::less<value_type>());
+
+ i = boost::max_element(rng);
+ i = boost::max_element(rng, std::less<value_type>());
+
+ b = boost::lexicographical_compare(rng, rng);
+ b = boost::lexicographical_compare(rng, rng, std::equal_to<value_type>());
+
+ b = boost::next_permutation(rng);
+ b = boost::next_permutation(rng, std::less<value_type>());
+
+ b = boost::prev_permutation(rng);
+ b = boost::prev_permutation(rng, std::less<value_type>());
+
+ /////////////////////////////////////////////////////////////////////
+ // numeric algorithms
+ /////////////////////////////////////////////////////////////////////
+
+ val = boost::accumulate( rng, val );
+ val = boost::accumulate( rng, val, null_op2() );
+ val = boost::inner_product( rng, rng, val );
+ val = boost::inner_product( rng, rng, val,
+ null_op2(), null_op2() );
+ o = boost::partial_sum( rng, boost::begin(out) );
+ o = boost::partial_sum( rng, boost::begin(out), null_op2() );
+ o = boost::adjacent_difference( rng, boost::begin(out) );
+ o = boost::adjacent_difference( rng, boost::begin(out),
+ null_op2() );
+
+ }
+
+ // test the algorithms that require a random-access range
+ test_random_algorithms(rng, iterator_category());
+}
+
+int* addr(int &i) { return &i; }
+bool true_(int) { return true; }
+
+///////////////////////////////////////////////////////////////////////////////
+// test_main
+//
+void simple_compile_test()
+{
+ // int_iterator
+ typedef ::boost::counting_iterator<int> int_iterator;
+
+ // define come containers
+ std::list<int> my_list(int_iterator(1),int_iterator(6));
+
+
+ std::vector<int> my_vector(int_iterator(1),int_iterator(6));
+
+ std::pair<std::vector<int>::iterator,std::vector<int>::iterator> my_pair(my_vector.begin(),my_vector.end());
+
+ // test the algorithms with list and const list
+ test_algorithms(my_list);
+ test_algorithms(my_vector);
+ test_algorithms(my_pair);
+
+
+ std::vector<int> v;
+ std::vector<int>& cv = v;
+
+ using namespace boost;
+
+#define BOOST_RANGE_RETURNS_TEST( function_name, cont ) \
+ function_name (cont); \
+ function_name <return_found> (cont); \
+ function_name <return_next> (cont); \
+ function_name <return_prior> (cont); \
+ function_name <return_begin_found> (cont); \
+ function_name <return_begin_next> (cont); \
+ function_name <return_begin_prior> (cont); \
+ function_name <return_found_end> (cont); \
+ function_name <return_next_end>(cont); \
+ function_name <return_prior_end>(cont);
+
+ BOOST_RANGE_RETURNS_TEST( adjacent_find, cv );
+ BOOST_RANGE_RETURNS_TEST( adjacent_find, v );
+ BOOST_RANGE_RETURNS_TEST( max_element, cv );
+ BOOST_RANGE_RETURNS_TEST( max_element, v );
+ BOOST_RANGE_RETURNS_TEST( min_element, cv );
+ BOOST_RANGE_RETURNS_TEST( min_element, v );
+ BOOST_RANGE_RETURNS_TEST( unique, v );
+#undef BOOST_RANGE_RETURNS_TEST
+
+#define BOOST_RANGE_RETURNS_TEST1( function_name, cont, arg1 ) \
+ function_name (cont, arg1); \
+ function_name <return_found> (cont, arg1); \
+ function_name <return_next> (cont, arg1); \
+ function_name <return_prior> (cont, arg1); \
+ function_name <return_begin_found> (cont, arg1); \
+ function_name <return_begin_next> (cont, arg1); \
+ function_name <return_begin_prior> (cont, arg1); \
+ function_name <return_found_end> (cont, arg1); \
+ function_name <return_next_end>(cont, arg1); \
+ function_name <return_prior_end>(cont, arg1);
+
+ BOOST_RANGE_RETURNS_TEST1( adjacent_find, cv, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( adjacent_find, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( find, cv, 0 );
+ BOOST_RANGE_RETURNS_TEST1( find, v, 0 );
+ BOOST_RANGE_RETURNS_TEST1( find_end, cv, cv );
+ BOOST_RANGE_RETURNS_TEST1( find_end, cv, v );
+ BOOST_RANGE_RETURNS_TEST1( find_end, v, cv );
+ BOOST_RANGE_RETURNS_TEST1( find_end, v, v );
+ BOOST_RANGE_RETURNS_TEST1( find_first_of, cv, cv );
+ BOOST_RANGE_RETURNS_TEST1( find_first_of, cv, v );
+ BOOST_RANGE_RETURNS_TEST1( find_first_of, v, cv );
+ BOOST_RANGE_RETURNS_TEST1( find_first_of, v, v );
+ BOOST_RANGE_RETURNS_TEST1( find_if, cv, std::negate<int>() );
+ BOOST_RANGE_RETURNS_TEST1( find_if, v, std::negate<int>() );
+ BOOST_RANGE_RETURNS_TEST1( search, cv, cv );
+ BOOST_RANGE_RETURNS_TEST1( search, cv, v );
+ BOOST_RANGE_RETURNS_TEST1( search, v, cv );
+ BOOST_RANGE_RETURNS_TEST1( search, v, v );
+
+ BOOST_RANGE_RETURNS_TEST1( remove, v, 0 );
+ BOOST_RANGE_RETURNS_TEST1( remove_if, v, std::negate<int>() );
+
+ BOOST_RANGE_RETURNS_TEST1( lower_bound, cv, 0 );
+ BOOST_RANGE_RETURNS_TEST1( lower_bound, v, 0 );
+ BOOST_RANGE_RETURNS_TEST1( max_element, cv, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( max_element, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( min_element, cv, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( min_element, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST1( upper_bound, cv, 0 );
+ BOOST_RANGE_RETURNS_TEST1( upper_bound, v, 0 );
+ BOOST_RANGE_RETURNS_TEST1( partition, cv, std::negate<int>() );
+ BOOST_RANGE_RETURNS_TEST1( partition, v, std::negate<int>() );
+ BOOST_RANGE_RETURNS_TEST1( stable_partition, cv, std::negate<int>() );
+ BOOST_RANGE_RETURNS_TEST1( stable_partition, v, std::negate<int>() );
+
+#undef BOOST_RANGE_RETURNS_TEST1
+
+#define BOOST_RANGE_RETURNS_TEST2( function_name, arg1, arg2 ) \
+ function_name (v, arg1, arg2); \
+ function_name <return_found> (v, arg1, arg2); \
+ function_name <return_next> (v, arg1, arg2); \
+ function_name <return_prior> (v, arg1, arg2); \
+ function_name <return_begin_found> (v, arg1, arg2); \
+ function_name <return_begin_next> (v, arg1, arg2); \
+ function_name <return_begin_prior> (v, arg1, arg2); \
+ function_name <return_found_end> (v, arg1, arg2); \
+ function_name <return_next_end>(v, arg1, arg2); \
+ function_name <return_prior_end>(v, arg1, arg2);
+
+ BOOST_RANGE_RETURNS_TEST2( find_end, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST2( find_first_of, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST2( search, v, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST2( lower_bound, 0, std::less<int>() );
+ BOOST_RANGE_RETURNS_TEST2( upper_bound, 0, std::less<int>() );
+
+#undef BOOST_RANGE_RETURNS_TEST2
+}
+
+using boost::unit_test::test_suite;
+
+test_suite* init_unit_test_suite( int argc, char* argv[] )
+{
+ using namespace boost;
+
+ test_suite* test = BOOST_TEST_SUITE( "Range Test Suite - Algorithm" );
+
+ test->add( BOOST_TEST_CASE( &simple_compile_test ) );
+
+ return test;
+}
+

Added: trunk/libs/range/test/algorithm_test/adjacent_find.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/adjacent_find.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,89 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/adjacent_find.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_adjacent_find_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::iterator iterator_t;
+ typedef BOOST_DEDUCED_TYPENAME Container::const_iterator const_iterator_t;
+
+ Container cont;
+ const Container& cref_cont = cont;
+
+ std::equal_to<int> pred;
+
+ BOOST_CHECK( boost::adjacent_find(cont) == cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cref_cont) == cref_cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cont, pred) == cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cref_cont, pred) == cref_cont.end() );
+
+ cont += 1;
+ BOOST_CHECK( boost::adjacent_find(cont) == cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cref_cont) == cref_cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cont, pred) == cont.end() );
+ BOOST_CHECK( boost::adjacent_find(cref_cont, pred) == cref_cont.end() );
+
+ cont += 2,3,4,5,5,5,6,7,8,9;
+ iterator_t it = boost::adjacent_find(cont);
+ iterator_t it_pred = boost::adjacent_find(cont, pred);
+ BOOST_CHECK( it == it_pred );
+ BOOST_CHECK( it != cont.end() );
+ BOOST_CHECK( it == std::adjacent_find(cont.begin(), cont.end()) );
+ if (it != cont.end())
+ {
+ BOOST_CHECK( *it == 5 );
+ }
+ const_iterator_t cit = boost::adjacent_find(cref_cont);
+ const_iterator_t cit_pred = boost::adjacent_find(cref_cont, pred);
+ BOOST_CHECK( cit == cit_pred );
+ BOOST_CHECK( cit != cref_cont.end() );
+ BOOST_CHECK( cit == std::adjacent_find(cref_cont.begin(), cref_cont.end()) );
+ if (cit != cref_cont.end())
+ {
+ BOOST_CHECK( *cit == 5 );
+ }
+ }
+
+ void test_adjacent_find()
+ {
+ test_adjacent_find_impl< std::vector<int> >();
+ test_adjacent_find_impl< std::list<int> >();
+ test_adjacent_find_impl< std::multiset<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.adjacent_find" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_adjacent_find ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/binary_search.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/binary_search.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,122 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/binary_search.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test(Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ bool reference_result
+ = std::binary_search(reference.begin(), reference.end(), 5);
+
+ bool test_result = boost::binary_search(test, 5);
+
+ BOOST_CHECK( reference_result == test_result );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_pred(Container& cont, BinaryPredicate pred)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ sort_container(reference, pred);
+ sort_container(test, pred);
+
+ bool reference_result
+ = std::binary_search(reference.begin(), reference.end(), 5,
+ pred);
+
+ bool test_result = boost::binary_search(test, 5, pred);
+
+ BOOST_CHECK( reference_result == test_result );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_binary_search_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+
+ test(cont);
+ test_pred(cont, std::less<int>());
+ test_pred(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1;
+ test(cont);
+ test_pred(cont, std::less<int>());
+ test_pred(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test(cont);
+ test_pred(cont, std::less<int>());
+ test_pred(cont, std::greater<int>());
+ }
+
+ void test_binary_search()
+ {
+ test_binary_search_impl< std::vector<int> >();
+ test_binary_search_impl< std::list<int> >();
+ test_binary_search_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.binary_search" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_binary_search ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/copy.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/copy.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,67 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/copy.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_copy_impl()
+ {
+ Container source;
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> target;
+ target.resize(source.size());
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator< std::vector<value_t> >::type iterator_t;
+ iterator_t it = boost::copy(source, target.begin());
+
+ BOOST_CHECK( it == target.end() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ target.begin(), target.end(),
+ source.begin(), source.end()
+ );
+ }
+
+ void test_copy()
+ {
+ test_copy_impl< std::vector<int> >();
+ test_copy_impl< std::list<int> >();
+ test_copy_impl< std::set<int> >();
+ test_copy_impl< std::multiset<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.copy" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_copy ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/copy_backward.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/copy_backward.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,64 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/copy_backward.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_copy_backward_impl()
+ {
+ Container source;
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> target;
+ target.resize(source.size());
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator< std::vector<value_t> >::type iterator_t;
+ iterator_t it = boost::copy_backward(source, target.begin());
+
+ BOOST_CHECK( it == target.end() );
+ BOOST_CHECK_EQUAL_COLLECTIONS( target.begin(), target.end(),
+ source.rbegin(), source.rend() );
+ }
+
+ void test_copy_backward()
+ {
+ test_copy_backward_impl< std::vector<int> >();
+ test_copy_backward_impl< std::list<int> >();
+ test_copy_backward_impl< std::set<int> >();
+ test_copy_backward_impl< std::multiset<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.copy_backward" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_copy_backward ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/count.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/count.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,77 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/count.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_count_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ const Container& cref_cont = cont;
+
+ BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0) );
+ BOOST_CHECK_EQUAL( 0u, boost::count(cref_cont, 0) );
+
+ cont += 1;
+ BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0) );
+ BOOST_CHECK_EQUAL( 0u, boost::count(cref_cont, 0) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cont, 1) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cref_cont, 1) );
+
+ cont += 2,3,4,5,6,7,8,9;
+ BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0) );
+ BOOST_CHECK_EQUAL( 0u, boost::count(cref_cont, 0) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cont, 1) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cref_cont, 1) );
+
+ cont += 2;
+ BOOST_CHECK_EQUAL( 0u, boost::count(cont, 0) );
+ BOOST_CHECK_EQUAL( 0u, boost::count(cref_cont, 0) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cont, 1) );
+ BOOST_CHECK_EQUAL( 1u, boost::count(cref_cont, 1) );
+ BOOST_CHECK_EQUAL( 2u, boost::count(cont, 2) );
+ BOOST_CHECK_EQUAL( 2u, boost::count(cref_cont, 2) );
+ }
+
+ void test_count()
+ {
+ test_count_impl< std::vector<int> >();
+ test_count_impl< std::list<int> >();
+ test_count_impl< std::multiset<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.count" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_count ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/count_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/count_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,85 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/count_if.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_function/false_predicate.hpp"
+#include "../test_function/equal_to_x.hpp"
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_count_if_impl()
+ {
+ using namespace boost::range_test_function;
+ using namespace boost::assign;
+
+ typedef equal_to_x<int> pred_t;
+
+ Container cont;
+ const Container& cref_cont = cont;
+
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, pred_t(0)) );
+
+ cont += 1;
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cont, pred_t(1)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cref_cont, pred_t(1)) );
+
+ cont += 2,3,4,5,6,7,8,9;
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cont, pred_t(1)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cref_cont, pred_t(1)) );
+
+ cont += 2;
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, pred_t(0)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cont, pred_t(1)) );
+ BOOST_CHECK_EQUAL( 1u, boost::count_if(cref_cont, pred_t(1)) );
+ BOOST_CHECK_EQUAL( 2u, boost::count_if(cont, pred_t(2)) );
+ BOOST_CHECK_EQUAL( 2u, boost::count_if(cref_cont, pred_t(2)) );
+
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cont, false_predicate()) );
+ BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, false_predicate()) );
+ }
+
+ void test_count_if()
+ {
+ test_count_if_impl< std::vector<int> >();
+ test_count_if_impl< std::list<int> >();
+ test_count_if_impl< std::multiset<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.count_if" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_count_if ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/equal.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/equal.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,103 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/equal.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container1, class Container2 >
+ void test_equal_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container1>::type container1_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container2>::type container2_t;
+
+ container1_t mcont1;
+ container2_t mcont2;
+
+ Container1& cont1 = mcont1;
+ Container2& cont2 = mcont2;
+
+ BOOST_CHECK( boost::equal(cont1, cont2) );
+ BOOST_CHECK( boost::equal(cont1, cont2, std::equal_to<int>()) );
+ BOOST_CHECK( boost::equal(cont1, cont2, std::not_equal_to<int>()) );
+
+ mcont1 += 1;
+ BOOST_CHECK( !boost::equal(cont1, cont2) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::equal_to<int>()) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::not_equal_to<int>()) );
+
+ mcont1.clear();
+ mcont2 += 1;
+ BOOST_CHECK( !boost::equal(cont1, cont2) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::equal_to<int>()) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::not_equal_to<int>()) );
+
+ mcont1 += 1;
+ BOOST_CHECK( boost::equal(cont1, cont2) );
+ BOOST_CHECK( boost::equal(cont1, cont2, std::equal_to<int>()) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::not_equal_to<int>()) );
+
+ mcont1 += 2,3,4,5,6,7,8,9;
+ mcont2 += 2,3,4,5,6,7,8,9;
+ BOOST_CHECK( boost::equal(cont1, cont2) );
+ BOOST_CHECK( boost::equal(cont1, cont2, std::equal_to<int>()) );
+ BOOST_CHECK( !boost::equal(cont1, cont2, std::not_equal_to<int>()) );
+ }
+
+ template< class Container1, class Container2 >
+ void test_driver()
+ {
+ typedef Container1 container1_t;
+ typedef Container2 container2_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::add_const<Container1>::type const_container1_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::add_const<Container2>::type const_container2_t;
+
+ test_equal_impl< const_container1_t, const_container2_t >();
+ test_equal_impl< const_container1_t, container2_t >();
+ test_equal_impl< container1_t, const_container2_t >();
+ test_equal_impl< container1_t, container2_t >();
+ }
+
+ void test_equal()
+ {
+ test_driver< std::list<int>, std::list<int> >();
+ test_driver< std::vector<int>, std::vector<int> >();
+ test_driver< std::set<int>, std::set<int> >();
+ test_driver< std::multiset<int>, std::multiset<int> >();
+ test_driver< std::list<int>, std::vector<int> >();
+ test_driver< std::vector<int>, std::list<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.equal" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_equal ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/equal_range.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/equal_range.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,175 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/equal_range.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container, class Pair>
+ void check_result(
+ const Container& reference,
+ Pair reference_pair,
+ const Container& test,
+ Pair test_pair
+ )
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<const Container>::type
+ const_iterator_t;
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK_EQUAL(
+ std::distance<const_iterator_t>(reference.begin(), reference_pair.first),
+ std::distance<const_iterator_t>(test.begin(), test_pair.first)
+ );
+
+ BOOST_CHECK_EQUAL(
+ std::distance<const_iterator_t>(reference.begin(), reference_pair.second),
+ std::distance<const_iterator_t>(test.begin(), test_pair.second)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference_pair.first, reference_pair.second,
+ test_pair.first, test_pair.second
+ );
+ }
+
+ template<class Container>
+ void test(Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+ typedef std::pair<iterator_t, iterator_t> pair_t;
+
+ pair_t reference_result
+ = std::equal_range(reference.begin(), reference.end(), 5);
+
+ pair_t test_result = boost::equal_range(test, 5);
+
+ check_result(reference, reference_result,
+ test, test_result);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_pred(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container>::type container_t;
+
+ container_t reference_temp(cont);
+ container_t test_temp(cont);
+
+ sort_container(reference_temp, pred);
+ sort_container(test_temp, pred);
+
+ Container reference(reference_temp);
+ Container test(test_temp);
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+ typedef std::pair<iterator_t, iterator_t> pair_t;
+
+ pair_t reference_result
+ = std::equal_range(reference.begin(), reference.end(), 5,
+ BinaryPredicate());
+
+ pair_t test_result = boost::equal_range(test, 5, BinaryPredicate());
+
+ check_result(reference, reference_result,
+ test, test_result);
+ }
+
+ template<class Container>
+ void test_driver(const Container& cont)
+ {
+ Container mutable_cont(cont);
+ test(mutable_cont);
+
+ test(cont);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_pred_driver(const Container& cont, BinaryPredicate pred)
+ {
+ Container mutable_cont(cont);
+ test_pred(mutable_cont, pred);
+
+ test_pred(cont, pred);
+ }
+
+ template<class Container>
+ void test_equal_range_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+
+ test_driver(cont);
+ test_pred_driver(cont, std::less<int>());
+ test_pred_driver(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1;
+ test_driver(cont);
+ test_pred_driver(cont, std::less<int>());
+ test_pred_driver(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_driver(cont);
+ test_pred_driver(cont, std::less<int>());
+ test_pred_driver(cont, std::greater<int>());
+ }
+
+ void test_equal_range()
+ {
+ test_equal_range_impl< std::vector<int> >();
+ test_equal_range_impl< std::list<int> >();
+ test_equal_range_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.equal_range" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_equal_range ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/fill.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/fill.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,80 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/fill.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_fill_impl(Container& cont)
+ {
+ Container reference(cont);
+ std::fill(reference.begin(), reference.end(), 1);
+
+ Container target(cont);
+ boost::fill(target, 1);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+ }
+
+ template< class Container >
+ void test_fill_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_fill_impl(cont);
+
+ cont.clear();
+ cont += 2;
+ test_fill_impl(cont);
+
+ cont.clear();
+ cont += 1,2;
+ test_fill_impl(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_fill_impl(cont);
+ }
+
+ void test_fill()
+ {
+ test_fill_impl< std::vector<int> >();
+ test_fill_impl< std::list<int> >();
+ test_fill_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.fill" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_fill ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/find.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/find.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,102 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/find.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class find_test_policy
+ {
+ public:
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find(cont, 3);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::find<return_type>(cont, 3);
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find(cont.begin(), cont.end(), 3);
+ }
+ };
+
+ template<class Container>
+ void test_find_container()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t mcont;
+ Container& cont = mcont;
+ test_driver(cont, find_test_policy());
+
+ mcont.clear();
+ mcont += 1;
+ test_driver(cont, find_test_policy());
+
+ mcont.clear();
+ mcont += 1,2,3,4,5,6,7,8,9;
+ test_driver(cont, find_test_policy());
+ }
+
+ void test_find()
+ {
+ test_find_container< std::vector<int> >();
+ test_find_container< std::list<int> >();
+ test_find_container< std::deque<int> >();
+
+ test_find_container< const std::vector<int> >();
+ test_find_container< const std::list<int> >();
+ test_find_container< const std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.find" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_find ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/find_end.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/find_end.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,181 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/find_end.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <set>
+#include <list>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container2>
+ class find_end_test_policy
+ {
+ typedef Container2 container2_t;
+ public:
+ explicit find_end_test_policy(const Container2& cont)
+ : m_cont(cont)
+ {
+ }
+
+ container2_t cont() { return m_cont; }
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find_end(cont, m_cont);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::find_end<return_type>(cont, policy.cont());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find_end(cont.begin(), cont.end(),
+ m_cont.begin(), m_cont.end());
+ }
+
+ private:
+ Container2 m_cont;
+ };
+
+ template<class Container2, class BinaryPredicate>
+ class find_end_pred_test_policy
+ {
+ typedef Container2 container2_t;
+ public:
+ explicit find_end_pred_test_policy(const Container2& cont)
+ : m_cont(cont)
+ {
+ }
+
+ container2_t& cont() { return m_cont; }
+ BinaryPredicate& pred() { return m_pred; }
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find_end(cont, m_cont, m_pred);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::find_end<return_type>(cont, policy.cont(), policy.pred());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find_end(cont.begin(), cont.end(),
+ m_cont.begin(), m_cont.end(),
+ m_pred);
+ }
+
+ private:
+ Container2 m_cont;
+ BinaryPredicate m_pred;
+ };
+
+ template<class Container1, class Container2>
+ void run_tests(Container1& cont1, Container2& cont2)
+ {
+ range_test::range_return_test_driver test_driver;
+ test_driver(cont1, find_end_test_policy<Container2>(cont2));
+ test_driver(cont1, find_end_pred_test_policy<Container2, std::less<int> >(cont2));
+ test_driver(cont2, find_end_pred_test_policy<Container2, std::greater<int> >(cont2));
+ }
+
+ template<class Container1, class Container2>
+ void test_find_end_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container1>::type container1_t;
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container2>::type container2_t;
+
+ container1_t mcont1;
+ Container1& cont1 = mcont1;
+ container2_t mcont2;
+ Container2& cont2 = mcont2;
+
+ run_tests(cont1, cont2);
+
+ mcont1 += 1;
+ run_tests(cont1, cont2);
+
+ mcont2 += 1;
+ run_tests(cont1, cont2);
+
+ mcont1 += 2,3,4,5,6,7,8,9;
+ mcont2 += 2,3,4;
+ run_tests(cont1, cont2);
+
+ mcont2.clear();
+ mcont2 += 7,8,9;
+ run_tests(cont1, cont2);
+ }
+
+ void test_find_end()
+ {
+ test_find_end_impl< std::vector<int>, std::vector<int> >();
+ test_find_end_impl< std::list<int>, std::list<int> >();
+ test_find_end_impl< std::deque<int>, std::deque<int> >();
+ test_find_end_impl< const std::vector<int>, const std::vector<int> >();
+ test_find_end_impl< const std::list<int>, const std::list<int> >();
+ test_find_end_impl< const std::deque<int>, const std::deque<int> >();
+ test_find_end_impl< const std::vector<int>, const std::list<int> >();
+ test_find_end_impl< const std::list<int>, const std::vector<int> >();
+ test_find_end_impl< const std::vector<int>, std::list<int> >();
+ test_find_end_impl< const std::list<int>, std::vector<int> >();
+ test_find_end_impl< std::vector<int>, std::list<int> >();
+ test_find_end_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.find_end" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_find_end ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/find_first_of.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/find_first_of.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,181 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/find_first_of.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <set>
+#include <list>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container2>
+ class find_first_of_test_policy
+ {
+ typedef Container2 container2_t;
+ public:
+ explicit find_first_of_test_policy(const Container2& cont)
+ : m_cont(cont)
+ {
+ }
+
+ container2_t& cont() { return m_cont; }
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find_first_of(cont, m_cont);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::find_first_of<return_type>(cont, policy.cont());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find_first_of(cont.begin(), cont.end(),
+ m_cont.begin(), m_cont.end());
+ }
+
+ private:
+ Container2 m_cont;
+ };
+
+ template<class Container2, class BinaryPredicate>
+ class find_first_of_pred_test_policy
+ {
+ typedef Container2 container2_t;
+ public:
+ explicit find_first_of_pred_test_policy(const Container2& cont)
+ : m_cont(cont)
+ {
+ }
+
+ container2_t& cont() { return m_cont; }
+ BinaryPredicate& pred() { return m_pred; }
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find_first_of(cont, m_cont, m_pred);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::find_first_of<return_type>(cont, policy.cont(), policy.pred());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find_first_of(cont.begin(), cont.end(),
+ m_cont.begin(), m_cont.end(),
+ m_pred);
+ }
+
+ private:
+ Container2 m_cont;
+ BinaryPredicate m_pred;
+ };
+
+ template<class Container1, class Container2>
+ void run_tests(Container1& cont1, Container2& cont2)
+ {
+ range_test::range_return_test_driver test_driver;
+ test_driver(cont1, find_first_of_test_policy<Container2>(cont2));
+ test_driver(cont1, find_first_of_pred_test_policy<Container2, std::less<int> >(cont2));
+ test_driver(cont2, find_first_of_pred_test_policy<Container2, std::greater<int> >(cont2));
+ }
+
+ template<class Container1, class Container2>
+ void test_find_first_of_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container1>::type container1_t;
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container2>::type container2_t;
+
+ container1_t mcont1;
+ Container1& cont1 = mcont1;
+ container2_t mcont2;
+ Container2& cont2 = mcont2;
+
+ run_tests(cont1, cont2);
+
+ mcont1 += 1;
+ run_tests(cont1, cont2);
+
+ mcont2 += 1;
+ run_tests(cont1, cont2);
+
+ mcont1 += 2,3,4,5,6,7,8,9;
+ mcont2 += 2,3,4;
+ run_tests(cont1, cont2);
+
+ mcont2.clear();
+ mcont2 += 7,8,9;
+ run_tests(cont1, cont2);
+ }
+
+ void test_find_first_of()
+ {
+ test_find_first_of_impl< std::vector<int>, std::vector<int> >();
+ test_find_first_of_impl< std::list<int>, std::list<int> >();
+ test_find_first_of_impl< std::deque<int>, std::deque<int> >();
+ test_find_first_of_impl< const std::vector<int>, const std::vector<int> >();
+ test_find_first_of_impl< const std::list<int>, const std::list<int> >();
+ test_find_first_of_impl< const std::deque<int>, const std::deque<int> >();
+ test_find_first_of_impl< const std::vector<int>, const std::list<int> >();
+ test_find_first_of_impl< const std::list<int>, const std::vector<int> >();
+ test_find_first_of_impl< const std::vector<int>, std::list<int> >();
+ test_find_first_of_impl< const std::list<int>, std::vector<int> >();
+ test_find_first_of_impl< std::vector<int>, std::list<int> >();
+ test_find_first_of_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.find_first_of" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_find_first_of ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/find_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/find_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,123 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/find_if.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include "../test_function/greater_than_x.hpp"
+#include "../test_function/false_predicate.hpp"
+#include <algorithm>
+#include <functional>
+#include <deque>
+#include <list>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class UnaryPredicate>
+ class find_if_test_policy
+ {
+ public:
+ explicit find_if_test_policy(UnaryPredicate pred)
+ : m_pred(pred) {}
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::find_if(cont, m_pred);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(find_if_test_policy& policy, Container& cont)
+ {
+ return boost::find_if<return_type>(cont, policy.pred());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::find_if(cont.begin(), cont.end(), m_pred);
+ }
+
+ UnaryPredicate& pred() { return m_pred; }
+
+ private:
+ UnaryPredicate m_pred;
+ };
+
+ template<class UnaryPredicate>
+ find_if_test_policy<UnaryPredicate>
+ make_policy(UnaryPredicate pred)
+ {
+ return find_if_test_policy<UnaryPredicate>(pred);
+ }
+
+ template<class Container>
+ void test_find_if_container()
+ {
+ using namespace boost::assign;
+ using namespace boost::range_test_function;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t mcont;
+ Container& cont = mcont;
+ test_driver(cont, make_policy(greater_than_x<int>(5)));
+ test_driver(cont, make_policy(false_predicate()));
+
+ mcont.clear();
+ mcont += 1;
+ test_driver(cont, make_policy(greater_than_x<int>(5)));
+ test_driver(cont, make_policy(false_predicate()));
+
+ mcont.clear();
+ mcont += 1,2,3,4,5,6,7,8,9;
+ test_driver(cont, make_policy(greater_than_x<int>(5)));
+ test_driver(cont, make_policy(false_predicate()));
+ }
+
+ void test_find_if()
+ {
+ test_find_if_container< std::vector<int> >();
+ test_find_if_container< std::list<int> >();
+ test_find_if_container< std::deque<int> >();
+
+ test_find_if_container< const std::vector<int> >();
+ test_find_if_container< const std::list<int> >();
+ test_find_if_container< const std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.find_if" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_find_if ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/for_each.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/for_each.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,86 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/for_each.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/array.hpp>
+#include <boost/assign.hpp>
+#include <boost/range/algorithm.hpp>
+
+#include <list>
+#include <set>
+#include <vector>
+#include "../test_function/check_equal_fn.hpp"
+
+namespace boost
+{
+ namespace
+ {
+ template< class SinglePassRange >
+ void test_for_each_impl( SinglePassRange rng )
+ {
+ using namespace boost::range_test_function;
+
+ typedef check_equal_fn< SinglePassRange > fn_t;
+
+ // Test the mutable version
+ fn_t result_fn = boost::for_each(rng, fn_t(rng));
+ BOOST_CHECK_EQUAL( boost::distance(rng), result_fn.invocation_count() );
+
+ // Test the constant version
+ const SinglePassRange& cref_rng = rng;
+ result_fn = boost::for_each(cref_rng, fn_t(cref_rng));
+ BOOST_CHECK_EQUAL( boost::distance(cref_rng), result_fn.invocation_count() );
+ }
+
+ template< class Container >
+ void test_for_each_t()
+ {
+ using namespace boost::assign;
+
+ // Test empty
+ Container cont;
+ test_for_each_impl(cont);
+
+ // Test one element
+ cont += 0;
+ test_for_each_impl(cont);
+
+ // Test many elements
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_for_each_impl(cont);
+ }
+
+ void test_for_each()
+ {
+ boost::array<int, 10> a = { 0,1,2,3,4,5,6,7,8,9 };
+ test_for_each_impl(a);
+
+ test_for_each_t< std::vector<int> >();
+ test_for_each_t< std::list<int> >();
+ test_for_each_t< std::set<int> >();
+ test_for_each_t< std::multiset<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.for_each" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_for_each ) );
+
+ return test;
+}
\ No newline at end of file

Added: trunk/libs/range/test/algorithm_test/generate.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/generate.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/generate.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class generator_fn
+ {
+ public:
+ typedef int result_type;
+
+ generator_fn() : m_count(0) {}
+ int operator()() { return ++m_count; }
+
+ private:
+ int m_count;
+ };
+
+ template< class Container >
+ void test_generate_impl(Container& cont)
+ {
+ Container reference(cont);
+ std::generate(reference.begin(), reference.end(), generator_fn());
+
+ Container test(cont);
+ boost::generate(test, generator_fn());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+
+ template< class Container >
+ void test_generate_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_generate_impl(cont);
+
+ cont.clear();
+ cont += 9;
+ test_generate_impl(cont);
+
+ cont.clear();
+ cont += 9,8,7,6,5,4,3,2,1;
+ test_generate_impl(cont);
+ }
+
+ void test_generate()
+ {
+ test_generate_impl< std::vector<int> >();
+ test_generate_impl< std::list<int> >();
+ test_generate_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.generate" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_generate ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/heap.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/heap.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,122 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/heap_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Container2>
+ void check_equal(const Container1& cont1, const Container2& cont2)
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end()
+ );
+ }
+
+ void test()
+ {
+ using namespace boost::assign;
+
+ std::vector<int> reference;
+ reference += 1,2,3,4,5,6,7,8,9;
+
+ std::vector<int> test_cont(reference);
+
+ std::make_heap(reference.begin(), reference.end());
+ boost::make_heap(test_cont);
+ check_equal(reference, test_cont);
+
+ std::push_heap(reference.begin(), reference.end());
+ boost::push_heap(test_cont);
+ check_equal(reference, test_cont);
+
+ std::make_heap(reference.begin(), reference.end());
+ boost::make_heap(test_cont);
+
+ std::sort_heap(reference.begin(), reference.end());
+ boost::sort_heap(test_cont);
+ check_equal(reference, test_cont);
+
+ std::make_heap(reference.begin(), reference.end());
+ boost::make_heap(test_cont);
+
+ std::pop_heap(reference.begin(), reference.end());
+ boost::pop_heap(test_cont);
+ check_equal(reference, test_cont);
+ }
+
+ template<class BinaryPredicate>
+ void test_pred(BinaryPredicate pred)
+ {
+ using namespace boost::assign;
+
+ std::vector<int> reference;
+ reference += 1,2,3,4,5,6,7,8,9;
+ std::sort(reference.begin(), reference.end(), pred);
+
+ std::vector<int> test_cont(reference);
+
+ std::make_heap(reference.begin(), reference.end(), pred);
+ boost::make_heap(test_cont, pred);
+ check_equal(reference, test_cont);
+
+ reference.push_back(5);
+ test_cont.push_back(5);
+ std::push_heap(reference.begin(), reference.end(), pred);
+ boost::push_heap(test_cont, pred);
+ check_equal(reference, test_cont);
+
+ std::make_heap(reference.begin(), reference.end(), pred);
+ boost::make_heap(test_cont, pred);
+
+ std::sort_heap(reference.begin(), reference.end(), pred);
+ boost::sort_heap(test_cont, pred);
+ check_equal(reference, test_cont);
+
+ std::make_heap(reference.begin(), reference.end(), pred);
+ boost::make_heap(test_cont, pred);
+
+ std::pop_heap(reference.begin(), reference.end(), pred);
+ boost::pop_heap(test_cont, pred);
+ check_equal(reference, test_cont);
+ }
+
+ void test_heap()
+ {
+ test();
+ test_pred(std::less<int>());
+ test_pred(std::greater<int>());
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.heap" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_heap ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/includes.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/includes.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,157 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ Container1 old_cont1(cont1);
+ Container2 old_cont2(cont2);
+
+ bool reference_result
+ = std::includes(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end());
+
+ bool test_result = boost::includes(cont1, cont2);
+
+ BOOST_CHECK( reference_result == test_result );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ old_cont1.begin(), old_cont1.end(),
+ cont1.begin(), cont1.end()
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ old_cont2.begin(), old_cont2.end(),
+ cont2.begin(), cont2.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2,
+ BinaryPredicate pred)
+ {
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ Container1 old_cont1(cont1);
+ Container2 old_cont2(cont2);
+
+ bool reference_result
+ = std::includes(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ pred);
+
+ bool test_result = boost::includes(cont1, cont2, pred);
+
+ BOOST_CHECK( reference_result == test_result );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ old_cont1.begin(), old_cont1.end(),
+ cont1.begin(), cont1.end()
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ old_cont2.begin(), old_cont2.end(),
+ cont2.begin(), cont2.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test_includes_impl(
+ Container1& cont1,
+ Container2& cont2
+ )
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_includes_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_includes_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_includes_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_includes_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 2,3,4;
+ test_includes_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2,3,4;
+ cont2 += 1,2,3,4,5,6,7,8,9;
+ test_includes_impl(cont1, cont2);
+ }
+
+ void test_includes()
+ {
+ test_includes_impl< std::vector<int>, std::vector<int> >();
+ test_includes_impl< std::list<int>, std::list<int> >();
+ test_includes_impl< std::deque<int>, std::deque<int> >();
+ test_includes_impl< std::vector<int>, std::list<int> >();
+ test_includes_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.includes" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_includes ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/inplace_merge.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/inplace_merge.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,145 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/inplace_merge.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference_target(cont1.begin(), cont1.end());
+ reference_target.insert(reference_target.end(),
+ cont2.begin(), cont2.end());
+
+ std::vector<value_t> test_target(reference_target);
+
+ std::inplace_merge(reference_target.begin(),
+ reference_target.begin() + cont1.size(),
+ reference_target.end());
+
+ boost::inplace_merge(test_target,
+ test_target.begin() + cont1.size());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference_target.begin(), reference_target.end(),
+ test_target.begin(), test_target.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference_target(cont1.begin(), cont1.end());
+ reference_target.insert(reference_target.end(),
+ cont2.begin(), cont2.end());
+
+ std::vector<value_t> test_target(reference_target);
+
+ std::inplace_merge(reference_target.begin(),
+ reference_target.begin() + cont1.size(),
+ reference_target.end(), pred);
+
+ boost::inplace_merge(test_target,
+ test_target.begin() + cont1.size(),
+ pred);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference_target.begin(), reference_target.end(),
+ test_target.begin(), test_target.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test_inplace_merge_impl(Container1& cont1, Container2& cont2)
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_inplace_merge_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_inplace_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_inplace_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_inplace_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,3,5,7,9,11,13,15,17,19;
+ cont2 += 2,4,6,8,10,12,14,16,18,20;
+ test_inplace_merge_impl(cont1, cont2);
+ }
+
+ void test_inplace_merge()
+ {
+ test_inplace_merge_impl< std::vector<int>, std::vector<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.inplace_merge" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_inplace_merge ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/lexicographical_compare.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/lexicographical_compare.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,151 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/lexicographical_compare.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class ForwardRange1, class ForwardRange2>
+ void test_lexicographical_compare_impl_nopred(ForwardRange1& rng1,
+ ForwardRange2& rng2)
+ {
+ bool reference = std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2));
+
+ bool test = boost::lexicographical_compare(rng1, rng2);
+
+ BOOST_CHECK( reference == test );
+ }
+
+ template<class ForwardRange1, class ForwardRange2,
+ class BinaryPredicate>
+ void test_lexicographical_compare_impl_pred(ForwardRange1& rng1,
+ ForwardRange2& rng2,
+ BinaryPredicate pred)
+ {
+ bool reference = std::lexicographical_compare(
+ boost::begin(rng1), boost::end(rng1),
+ boost::begin(rng2), boost::end(rng2),
+ pred);
+
+ bool test = boost::lexicographical_compare(rng1, rng2, pred);
+
+ BOOST_CHECK( reference == test );
+ }
+
+ template<class Container1, class Container2>
+ void test_lexicographical_compare_impl(Container1& cont1,
+ Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::range_value<Container1>::type value_t;
+
+ test_lexicographical_compare_impl_nopred(cont1, cont2);
+ test_lexicographical_compare_impl_pred(cont1, cont2, std::less<value_t>());
+ test_lexicographical_compare_impl_pred(cont1, cont2, std::greater<value_t>());
+ }
+
+ template<class Container1, class Container2>
+ void test_lexicographical_compare_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container1>::type container1_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container2>::type container2_t;
+
+ container1_t cont1;
+ container2_t cont2;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1.push_back(1);
+ cont2.push_back(1);
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2;
+ cont2 += 1;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ cont2 += 2;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7;
+ cont2 += 1,2,3,4,5,6,7;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7;
+ cont2 += 1,2,3,4,5,6;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6;
+ cont2 += 1,2,3,4,5,6,7;
+ test_lexicographical_compare_impl<Container1,Container2>(cont1, cont2);
+ }
+
+ template<class Container1>
+ void test_lexicographical_compare_rhs()
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_value<Container1>::type value_t;
+
+ test_lexicographical_compare_impl<Container1, const std::vector<value_t> >();
+ test_lexicographical_compare_impl<Container1, const std::deque<value_t> >();
+ test_lexicographical_compare_impl<Container1, const std::list<value_t> >();
+ test_lexicographical_compare_impl<Container1, std::vector<value_t> >();
+ test_lexicographical_compare_impl<Container1, std::deque<value_t> >();
+ test_lexicographical_compare_impl<Container1, std::list<value_t> >();
+ }
+
+ void test_lexicographical_compare()
+ {
+ test_lexicographical_compare_rhs< const std::vector<int> >();
+ test_lexicographical_compare_rhs< const std::deque<int> >();
+ test_lexicographical_compare_rhs< const std::list<int> >();
+ test_lexicographical_compare_rhs< std::vector<int> >();
+ test_lexicographical_compare_rhs< std::deque<int> >();
+ test_lexicographical_compare_rhs< std::list<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.lexicographical_compare" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_lexicographical_compare ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/lower_bound.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/lower_bound.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,172 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/lower_bound.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <boost/range/algorithm/lower_bound.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class lower_bound_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::lower_bound(cont, 5);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::lower_bound<return_type>(cont, 5);
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::lower_bound(cont.begin(), cont.end(), 5);
+ }
+ };
+
+ template< class BinaryPredicate >
+ struct lower_bound_pred_policy
+ {
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::lower_bound(cont, 5, m_pred);
+ }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::lower_bound<return_type>(
+ cont, 5, policy.pred());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::lower_bound(
+ cont.begin(), cont.end(), 5, m_pred);
+ }
+
+ BinaryPredicate& pred() { return m_pred; }
+
+ private:
+ BinaryPredicate m_pred;
+ };
+
+ template<class Container,
+ class TestPolicy,
+ class BinaryPredicate>
+ void test_lower_bound_impl(TestPolicy policy, BinaryPredicate pred)
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t mcont;
+ Container& cont = mcont;
+
+ test_driver(cont, policy);
+
+ mcont.clear();
+ mcont += 1;
+
+ std::vector<value_t> temp(mcont.begin(), mcont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ mcont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+
+ mcont.clear();
+ mcont += 1,2,3,4,5,6,7,8,9;
+
+ temp.assign(mcont.begin(), mcont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ mcont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+ }
+
+ template<class Container>
+ void test_lower_bound_impl()
+ {
+ test_lower_bound_impl<Container>(
+ lower_bound_policy(),
+ std::less<int>()
+ );
+
+ test_lower_bound_impl<Container>(
+ lower_bound_pred_policy<std::less<int> >(),
+ std::less<int>()
+ );
+
+ test_lower_bound_impl<Container>(
+ lower_bound_pred_policy<std::greater<int> >(),
+ std::greater<int>()
+ );
+ }
+
+ void test_lower_bound()
+ {
+ test_lower_bound_impl< std::vector<int> >();
+ test_lower_bound_impl< std::list<int> >();
+ test_lower_bound_impl< std::deque<int> >();
+
+ test_lower_bound_impl< const std::vector<int> >();
+ test_lower_bound_impl< const std::list<int> >();
+ test_lower_bound_impl< const std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.lower_bound" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_lower_bound ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/max_element.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/max_element.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/max_element.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <boost/range/iterator.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class max_element_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::max_element(cont);
+ }
+
+ template<range_return_value return_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::max_element<return_type>(cont);
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::max_element(cont.begin(), cont.end());
+ }
+ };
+
+ template<class Pred>
+ class max_element_pred_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::max_element(cont, Pred());
+ }
+
+ Pred pred() const { return Pred(); }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::max_element<return_type>(cont, policy.pred());
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::max_element(cont.begin(), cont.end(), Pred());
+ }
+ };
+
+ template<class Container, class TestPolicy>
+ void test_max_element_impl(TestPolicy policy)
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t cont;
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1;
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,3,4,5,6,7,8,9;
+
+ test_driver(cont, policy);
+ }
+
+ template<class Container>
+ void test_max_element_impl()
+ {
+ test_max_element_impl<Container>(max_element_test_policy());
+
+ test_max_element_impl<Container>(
+ max_element_pred_test_policy<std::less<int> >());
+
+ test_max_element_impl<Container>(
+ max_element_pred_test_policy<std::greater<int> >());
+ }
+
+ void test_max_element()
+ {
+ test_max_element_impl< const std::vector<int> >();
+ test_max_element_impl< const std::deque<int> >();
+ test_max_element_impl< const std::list<int> >();
+
+ test_max_element_impl< std::vector<int> >();
+ test_max_element_impl< std::deque<int> >();
+ test_max_element_impl< std::list<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.max_element" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_max_element ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/merge.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/merge.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,157 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/merge.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference_target( cont1.size() + cont2.size() );
+
+ iterator_t reference_it
+ = std::merge(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference_target.begin());
+
+ std::vector<value_t> test_target( cont1.size() + cont2.size() );
+
+ iterator_t test_it
+ = boost::merge(cont1, cont2, test_target.begin());
+
+ BOOST_CHECK_EQUAL(
+ std::distance<iterator_t>(reference_target.begin(), reference_it),
+ std::distance<iterator_t>(test_target.begin(), test_it)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference_target.begin(), reference_target.end(),
+ test_target.begin(), test_target.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference_target( cont1.size() + cont2.size() );
+
+ iterator_t reference_it
+ = std::merge(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference_target.begin(), pred);
+
+ std::vector<value_t> test_target( cont1.size() + cont2.size() );
+
+ iterator_t test_it
+ = boost::merge(cont1, cont2, test_target.begin(), pred);
+
+ BOOST_CHECK_EQUAL(
+ std::distance(reference_target.begin(), reference_it),
+ std::distance(test_target.begin(), test_it)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference_target.begin(), reference_target.end(),
+ test_target.begin(), test_target.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test_merge_impl(Container1& cont1, Container2& cont2)
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_merge_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_merge_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,3,5,7,9,11,13,15,17,19;
+ cont2 += 2,4,6,8,10,12,14,16,18,20;
+ test_merge_impl(cont1, cont2);
+ }
+
+ void test_merge()
+ {
+ test_merge_impl< std::vector<int>, std::vector<int> >();
+ test_merge_impl< std::list<int>, std::list<int> >();
+ test_merge_impl< std::deque<int>, std::deque<int> >();
+
+ test_merge_impl< std::list<int>, std::vector<int> >();
+ test_merge_impl< std::vector<int>, std::list<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.merge" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_merge ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/min_element.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/min_element.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/min_element.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <boost/range/iterator.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class min_element_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::min_element(cont);
+ }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::min_element<return_type>(cont);
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::min_element(cont.begin(), cont.end());
+ }
+ };
+
+ template<class Pred>
+ class min_element_pred_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::min_element(cont, Pred());
+ }
+
+ Pred pred() const { return Pred(); }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::min_element<return_type>(cont, policy.pred());
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::min_element(cont.begin(), cont.end(), Pred());
+ }
+ };
+
+ template<class Container, class TestPolicy>
+ void test_min_element_impl(TestPolicy policy)
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t cont;
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1;
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,3,4,5,6,7,8,9;
+
+ test_driver(cont, policy);
+ }
+
+ template<class Container>
+ void test_min_element_impl()
+ {
+ test_min_element_impl<Container>(min_element_test_policy());
+
+ test_min_element_impl<Container>(
+ min_element_pred_test_policy<std::less<int> >());
+
+ test_min_element_impl<Container>(
+ min_element_pred_test_policy<std::greater<int> >());
+ }
+
+ void test_min_element()
+ {
+ test_min_element_impl< const std::vector<int> >();
+ test_min_element_impl< const std::deque<int> >();
+ test_min_element_impl< const std::list<int> >();
+
+ test_min_element_impl< std::vector<int> >();
+ test_min_element_impl< std::deque<int> >();
+ test_min_element_impl< std::list<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.min_element" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_min_element ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/mismatch.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/mismatch.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,181 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/mismatch.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container1, class Container2 >
+ void test_mismatch_impl()
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container1>::type MutableContainer1;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Container2>::type MutableContainer2;
+
+ MutableContainer1 cont1;
+ const Container1& cref_cont1 = cont1;
+ MutableContainer2 cont2;
+ const Container2& cref_cont2 = cont2;
+
+ typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1_t;
+ typedef BOOST_DEDUCED_TYPENAME Container1::const_iterator const_iterator1_t;
+ typedef BOOST_DEDUCED_TYPENAME Container2::iterator iterator2_t;
+ typedef BOOST_DEDUCED_TYPENAME Container2::const_iterator const_iterator2_t;
+
+ typedef std::pair<iterator1_t, iterator2_t> pair_mmit_t;
+ typedef std::pair<const_iterator1_t, iterator2_t> pair_cmit_t;
+ typedef std::pair<iterator1_t, const_iterator2_t> pair_mcit_t;
+ typedef std::pair<const_iterator1_t, const_iterator2_t> pair_ccit_t;
+
+ pair_mmit_t pair_mmit = boost::mismatch(cont1, cont2);
+ BOOST_CHECK( pair_mmit.first == cont1.end() );
+ BOOST_CHECK( pair_mmit.second == cont2.end() );
+ pair_mmit = boost::mismatch(cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mmit.first == cont1.end() );
+ BOOST_CHECK( pair_mmit.second == cont2.end() );
+
+ pair_cmit_t pair_cmit = boost::mismatch(cref_cont1, cont2);
+ BOOST_CHECK( pair_cmit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_cmit.second == cont2.end() );
+ pair_cmit = boost::mismatch(cref_cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_cmit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_cmit.second == cont2.end() );
+
+ pair_mcit_t pair_mcit = boost::mismatch(cont1, cref_cont2);
+ BOOST_CHECK( pair_mcit.first == cont1.end() );
+ BOOST_CHECK( pair_mcit.second == cref_cont2.end() );
+ pair_mcit = boost::mismatch(cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mcit.first == cont1.end() );
+ BOOST_CHECK( pair_mcit.second == cref_cont2.end() );
+
+ pair_ccit_t pair_ccit = boost::mismatch(cref_cont1, cref_cont2);
+ BOOST_CHECK( pair_ccit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_ccit.second == cref_cont2.end() );
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_ccit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_ccit.second == cref_cont2.end() );
+
+ cont1 += 1,2,3,4;
+ cont2 += 1,2,3,4;
+ pair_mmit = boost::mismatch(cont1, cont2);
+ BOOST_CHECK( pair_mmit.first == cont1.end() );
+ BOOST_CHECK( pair_mmit.second == cont2.end() );
+ pair_mmit = boost::mismatch(cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mmit.first == cont1.end() );
+ BOOST_CHECK( pair_mmit.second == cont2.end() );
+
+ pair_cmit = boost::mismatch(cref_cont1, cont2);
+ BOOST_CHECK( pair_cmit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_cmit.second == cont2.end() );
+ pair_cmit = boost::mismatch(cref_cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_cmit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_cmit.second == cont2.end() );
+
+ pair_mcit = boost::mismatch(cont1, cref_cont2);
+ BOOST_CHECK( pair_mcit.first == cont1.end() );
+ BOOST_CHECK( pair_mcit.second == cref_cont2.end() );
+ pair_mcit = boost::mismatch(cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mcit.first == cont1.end() );
+ BOOST_CHECK( pair_mcit.second == cref_cont2.end() );
+
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2);
+ BOOST_CHECK( pair_ccit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_ccit.second == cref_cont2.end() );
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_ccit.first == cref_cont1.end() );
+ BOOST_CHECK( pair_ccit.second == cref_cont2.end() );
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4;
+ cont2 += 1,2,5,4;
+ pair_mmit = boost::mismatch(cont1, cont2);
+ BOOST_CHECK( pair_mmit.first != cont1.end() && *pair_mmit.first == 3 );
+ BOOST_CHECK( pair_mmit.second != cont2.end() && *pair_mmit.second == 5 );
+ pair_mmit = boost::mismatch(cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mmit.first != cont1.end() && *pair_mmit.first == 3 );
+ BOOST_CHECK( pair_mmit.second != cont2.end() && *pair_mmit.second == 5 );
+ pair_mmit = boost::mismatch(cont1, cont2, std::not_equal_to<int>());
+ BOOST_CHECK( pair_mmit.first == cont1.begin() );
+ BOOST_CHECK( pair_mmit.second == cont2.begin() );
+
+ pair_cmit = boost::mismatch(cref_cont1, cont2);
+ BOOST_CHECK( pair_cmit.first != cref_cont1.end() && *pair_cmit.first == 3 );
+ BOOST_CHECK( pair_cmit.second != cont2.end() && *pair_cmit.second == 5 );
+ pair_cmit = boost::mismatch(cref_cont1, cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_cmit.first != cref_cont1.end() && *pair_cmit.first == 3 );
+ BOOST_CHECK( pair_cmit.second != cont2.end() && *pair_cmit.second == 5 );
+ pair_cmit = boost::mismatch(cref_cont1, cont2, std::not_equal_to<int>());
+ BOOST_CHECK( pair_cmit.first == cref_cont1.begin() );
+ BOOST_CHECK( pair_cmit.second == cont2.begin() );
+
+ pair_mcit = boost::mismatch(cont1, cref_cont2);
+ BOOST_CHECK( pair_mcit.first != cont1.end() && *pair_mcit.first == 3 );
+ BOOST_CHECK( pair_mcit.second != cref_cont2.end() && *pair_mcit.second == 5 );
+ pair_mcit = boost::mismatch(cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_mcit.first != cont1.end() && *pair_mcit.first == 3 );
+ BOOST_CHECK( pair_mcit.second != cref_cont2.end() && *pair_mcit.second == 5 );
+ pair_mcit = boost::mismatch(cont1, cref_cont2, std::not_equal_to<int>());
+ BOOST_CHECK( pair_mcit.first == cont1.begin() );
+ BOOST_CHECK( pair_mcit.second == cref_cont2.begin() );
+
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2);
+ BOOST_CHECK( pair_ccit.first != cref_cont1.end() && *pair_ccit.first == 3 );
+ BOOST_CHECK( pair_ccit.second != cref_cont2.end() && *pair_ccit.second == 5 );
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2, std::equal_to<int>());
+ BOOST_CHECK( pair_ccit.first != cref_cont1.end() && *pair_ccit.first == 3 );
+ BOOST_CHECK( pair_ccit.second != cref_cont2.end() && *pair_ccit.second == 5 );
+ pair_ccit = boost::mismatch(cref_cont1, cref_cont2, std::not_equal_to<int>());
+ BOOST_CHECK( pair_ccit.first == cref_cont1.begin() );
+ BOOST_CHECK( pair_ccit.second == cref_cont2.begin() );
+ }
+
+ void test_mismatch()
+ {
+ test_mismatch_impl< std::list<int>, std::list<int> >();
+ test_mismatch_impl< const std::list<int>, std::list<int> >();
+ test_mismatch_impl< std::list<int>, const std::list<int> >();
+ test_mismatch_impl< const std::list<int>, const std::list<int> >();
+
+ test_mismatch_impl< std::vector<int>, std::list<int> >();
+ test_mismatch_impl< const std::vector<int>, std::list<int> >();
+ test_mismatch_impl< std::vector<int>, const std::list<int> >();
+ test_mismatch_impl< const std::vector<int>, const std::list<int> >();
+
+ test_mismatch_impl< std::list<int>, std::vector<int> >();
+ test_mismatch_impl< const std::list<int>, std::vector<int> >();
+ test_mismatch_impl< std::list<int>, const std::vector<int> >();
+ test_mismatch_impl< const std::list<int>, const std::vector<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.mismatch" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_mismatch ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/next_permutation.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/next_permutation.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,108 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/assign.hpp>
+#include <boost/range/algorithm/permutation.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <algorithm>
+#include <deque>
+#include <functional>
+#include <list>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test_next_permutation_impl(const Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ const bool reference_ret
+ = std::next_permutation(reference.begin(), reference.end());
+
+ const bool test_ret
+ = boost::next_permutation(test);
+
+ BOOST_CHECK( reference_ret == test_ret );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_next_permutation_pred_impl(const Container& cont,
+ BinaryPredicate pred)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ const bool reference_ret
+ = std::next_permutation(reference.begin(), reference.end(),
+ pred);
+
+ const bool test_ret
+ = boost::next_permutation(test, pred);
+
+ BOOST_CHECK( reference_ret == test_ret );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_next_permutation_(const Container& cont)
+ {
+ test_next_permutation_impl(cont);
+ test_next_permutation_pred_impl(cont, std::less<int>());
+ test_next_permutation_pred_impl(cont, std::greater<int>());
+ }
+
+ template<class Container>
+ void run_tests()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_next_permutation_(cont);
+
+ cont.clear();
+ cont += 1;
+ test_next_permutation_(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_next_permutation_(cont);
+ }
+
+ void test_next_permutation()
+ {
+ run_tests< std::vector<int> >();
+ run_tests< std::list<int> >();
+ run_tests< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.next_permutation" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_next_permutation ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/nth_element.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/nth_element.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/nth_element.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct nth_element_policy
+ {
+ template<class Container, class Iterator>
+ void test_nth_element(Container& cont, Iterator mid)
+ {
+ boost::nth_element(cont, mid);
+ }
+
+ template<class Container, class Iterator>
+ void reference_nth_element(Container& cont, Iterator mid)
+ {
+ std::nth_element(cont.begin(), mid, cont.end());
+ }
+ };
+
+ template<class BinaryPredicate>
+ struct nth_element_pred_policy
+ {
+ template<class Container, class Iterator>
+ void test_nth_element(Container& cont, Iterator mid)
+ {
+ boost::nth_element(cont, mid, BinaryPredicate());
+ }
+
+ template<class Container, class Iterator>
+ void reference_nth_element(Container& cont, Iterator mid)
+ {
+ std::nth_element(cont.begin(), mid, cont.end(), BinaryPredicate());
+ }
+ };
+
+ template<class Container, class TestPolicy>
+ void test_nth_element_tp_impl(Container& cont, TestPolicy policy)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+
+ BOOST_CHECK_EQUAL( reference.size(), test.size() );
+ if (reference.size() != test.size())
+ return;
+
+ iterator_t reference_mid = reference.begin();
+ iterator_t test_mid = test.begin();
+
+ bool complete = false;
+ while (!complete)
+ {
+ if (reference_mid == reference.end())
+ complete = true;
+
+ policy.test_nth_element(test, test_mid);
+ policy.reference_nth_element(reference, reference_mid);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ if (reference_mid != reference.end())
+ {
+ ++reference_mid;
+ ++test_mid;
+ }
+ }
+ }
+
+ template<class Container>
+ void test_nth_element_impl(Container& cont)
+ {
+ test_nth_element_tp_impl(cont, nth_element_policy());
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_nth_element_impl(Container& cont, BinaryPredicate pred)
+ {
+ test_nth_element_tp_impl(cont, nth_element_pred_policy<BinaryPredicate>());
+ }
+
+ template<class Container>
+ void run_tests(Container& cont)
+ {
+ test_nth_element_impl(cont);
+ test_nth_element_impl(cont, std::less<int>());
+ test_nth_element_impl(cont, std::greater<int>());
+ }
+
+ template<class Container>
+ void test_nth_element_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ run_tests(cont);
+
+ cont.clear();
+ cont += 1;
+ run_tests(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ run_tests(cont);
+ }
+
+ void test_nth_element()
+ {
+ test_nth_element_impl< std::vector<int> >();
+ test_nth_element_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.nth_element" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_nth_element ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/partial_sort.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/partial_sort.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,149 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/partial_sort.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct partial_sort_policy
+ {
+ template<class Container, class Iterator>
+ void test_partial_sort(Container& cont, Iterator mid)
+ {
+ boost::partial_sort(cont, mid);
+ }
+
+ template<class Container, class Iterator>
+ void reference_partial_sort(Container& cont, Iterator mid)
+ {
+ std::partial_sort(cont.begin(), mid, cont.end());
+ }
+ };
+
+ template<class BinaryPredicate>
+ struct partial_sort_pred_policy
+ {
+ template<class Container, class Iterator>
+ void test_partial_sort(Container& cont, Iterator mid)
+ {
+ boost::partial_sort(cont, mid, BinaryPredicate());
+ }
+
+ template<class Container, class Iterator>
+ void reference_partial_sort(Container& cont, Iterator mid)
+ {
+ std::partial_sort(cont.begin(), mid, cont.end(), BinaryPredicate());
+ }
+ };
+
+ template<class Container, class TestPolicy>
+ void test_partial_sort_tp_impl(Container& cont, TestPolicy policy)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+
+ BOOST_CHECK_EQUAL( reference.size(), test.size() );
+ if (reference.size() != test.size())
+ return;
+
+ iterator_t reference_mid = reference.begin();
+ iterator_t test_mid = test.begin();
+
+ bool complete = false;
+ while (!complete)
+ {
+ if (reference_mid == reference.end())
+ complete = true;
+
+ policy.test_partial_sort(test, test_mid);
+ policy.reference_partial_sort(reference, reference_mid);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ if (reference_mid != reference.end())
+ {
+ ++reference_mid;
+ ++test_mid;
+ }
+ }
+ }
+
+ template<class Container>
+ void test_partial_sort_impl(Container& cont)
+ {
+ test_partial_sort_tp_impl(cont, partial_sort_policy());
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_partial_sort_impl(Container& cont, BinaryPredicate pred)
+ {
+ test_partial_sort_tp_impl(cont, partial_sort_pred_policy<BinaryPredicate>());
+ }
+
+ template<class Container>
+ void test_partial_sort_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_partial_sort_impl(cont);
+ test_partial_sort_impl(cont, std::less<int>());
+ test_partial_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1;
+ test_partial_sort_impl(cont);
+ test_partial_sort_impl(cont, std::less<int>());
+ test_partial_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_partial_sort_impl(cont);
+ test_partial_sort_impl(cont, std::less<int>());
+ test_partial_sort_impl(cont, std::greater<int>());
+ }
+
+ void test_partial_sort()
+ {
+ test_partial_sort_impl< std::vector<int> >();
+ test_partial_sort_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.partial_sort" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_partial_sort ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/partition.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/partition.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,111 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/partition.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct equal_to_5
+ {
+ typedef bool result_type;
+ typedef int argument_type;
+ bool operator()(int x) const { return x == 5; }
+ };
+
+ // test the 'partition' algorithm
+ template<class UnaryPredicate>
+ class partition_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::partition(cont, UnaryPredicate());
+ }
+
+ UnaryPredicate pred() const { return UnaryPredicate(); }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::partition<return_type>(cont, policy.pred());
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::partition(cont.begin(), cont.end(), UnaryPredicate());
+ }
+ };
+
+ template<class Container>
+ void test_partition_impl()
+ {
+ using namespace boost::assign;
+
+ range_test::range_return_test_driver test_driver;
+
+ partition_test_policy< equal_to_5 > policy;
+
+ Container cont;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,2,2,3,4,5,6,7,8,9;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,2,2,3,3,3,3,4,4,4,4,4,4,4,5,6,7,8,9;
+ test_driver(cont, policy);
+ }
+
+ void test_partition()
+ {
+ test_partition_impl< std::vector<int> >();
+ test_partition_impl< std::list<int> >();
+ test_partition_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.partition" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_partition ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/prev_permutation.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/prev_permutation.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,108 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/assign.hpp>
+#include <boost/range/algorithm/permutation.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <algorithm>
+#include <deque>
+#include <functional>
+#include <list>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test_prev_permutation_impl(const Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ const bool reference_ret
+ = std::prev_permutation(reference.begin(), reference.end());
+
+ const bool test_ret
+ = boost::prev_permutation(test);
+
+ BOOST_CHECK( reference_ret == test_ret );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_prev_permutation_pred_impl(const Container& cont,
+ BinaryPredicate pred)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ const bool reference_ret
+ = std::prev_permutation(reference.begin(), reference.end(),
+ pred);
+
+ const bool test_ret
+ = boost::prev_permutation(test, pred);
+
+ BOOST_CHECK( reference_ret == test_ret );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_prev_permutation_(const Container& cont)
+ {
+ test_prev_permutation_impl(cont);
+ test_prev_permutation_pred_impl(cont, std::less<int>());
+ test_prev_permutation_pred_impl(cont, std::greater<int>());
+ }
+
+ template<class Container>
+ void run_tests()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_prev_permutation_(cont);
+
+ cont.clear();
+ cont += 1;
+ test_prev_permutation_(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_prev_permutation_(cont);
+ }
+
+ void test_prev_permutation()
+ {
+ run_tests< std::vector<int> >();
+ run_tests< std::list<int> >();
+ run_tests< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.prev_permutation" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_prev_permutation ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/random_shuffle.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/random_shuffle.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,178 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/random_shuffle.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include "../test_function/counted_function.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Int>
+ class counted_generator
+ : private range_test_function::counted_function
+ {
+ public:
+ typedef Int result_type;
+ typedef Int argument_type;
+
+ using range_test_function::counted_function::invocation_count;
+
+ result_type operator()(argument_type modulo_value)
+ {
+ invoked();
+ return static_cast<result_type>(std::rand() % modulo_value);
+ }
+ };
+
+ template<class Container>
+ bool test_shuffle_result(
+ const Container& old_cont,
+ const Container& new_cont
+ )
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<const Container>::type iterator_t;
+
+ // The size must remain equal
+ BOOST_CHECK_EQUAL( old_cont.size(), new_cont.size() );
+ if (old_cont.size() != new_cont.size())
+ return false;
+
+ if (new_cont.size() < 2)
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ old_cont.begin(), old_cont.end(),
+ new_cont.begin(), new_cont.end()
+ );
+
+ return std::equal(old_cont.begin(), old_cont.end(),
+ new_cont.begin());
+ }
+
+ // Elements must only be moved around. This is tested by
+ // ensuring the count of each element remains the
+ // same.
+ bool failed = false;
+ iterator_t last = old_cont.end();
+ for (iterator_t it = old_cont.begin(); !failed && (it != last); ++it)
+ {
+ const std::size_t old_count
+ = std::count(old_cont.begin(), old_cont.end(), *it);
+
+ const std::size_t new_count
+ = std::count(new_cont.begin(), new_cont.end(), *it);
+
+ BOOST_CHECK_EQUAL( old_count, new_count );
+
+ failed = (old_count != new_count);
+ }
+
+ return !failed;
+ }
+
+ template<class Container>
+ void test_random_shuffle_nogen_impl(Container& cont)
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+
+ const int MAX_RETRIES = 10000;
+
+ bool shuffled = false;
+ for (int attempt = 0; !shuffled && (attempt < MAX_RETRIES); ++attempt)
+ {
+ Container test(cont);
+ boost::random_shuffle(test);
+ bool ok = test_shuffle_result(cont, test);
+ if (!ok)
+ break;
+
+ // Since the counts are equal, then if they are
+ // not equal the contents must have been shuffled
+ if (cont.size() == test.size()
+ && !std::equal(cont.begin(), cont.end(), test.begin()))
+ {
+ shuffled = true;
+ }
+ }
+ }
+
+ template<class RandomGenerator, class Container>
+ void test_random_shuffle_gen_impl(Container& cont)
+ {
+ RandomGenerator gen;
+ Container old_cont(cont);
+ boost::random_shuffle(cont, gen);
+ test_shuffle_result(cont, old_cont);
+ if (cont.size() > 2)
+ {
+ BOOST_CHECK( gen.invocation_count() > 0 );
+ }
+ }
+
+ template<class Container>
+ void test_random_shuffle_impl(Container& cont)
+ {
+ Container old_cont(cont);
+ boost::random_shuffle(cont);
+ test_shuffle_result(cont, old_cont);
+ }
+
+ template<class Container>
+ void test_random_shuffle_impl()
+ {
+ using namespace boost::assign;
+
+ typedef counted_generator<
+ BOOST_DEDUCED_TYPENAME range_difference<Container>::type > generator_t;
+
+ Container cont;
+ test_random_shuffle_nogen_impl(cont);
+ test_random_shuffle_gen_impl<generator_t>(cont);
+
+ cont.clear();
+ cont += 1;
+ test_random_shuffle_nogen_impl(cont);
+ test_random_shuffle_gen_impl<generator_t>(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_random_shuffle_nogen_impl(cont);
+ test_random_shuffle_gen_impl<generator_t>(cont);
+ }
+
+ void test_random_shuffle()
+ {
+ test_random_shuffle_impl< std::vector<int> >();
+ test_random_shuffle_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.random_shuffle" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_random_shuffle ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/remove.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/remove.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,92 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/remove.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container, class Value >
+ void test_remove_impl( const Container& c, Value to_remove )
+ {
+ Container reference(c);
+
+ typedef BOOST_DEDUCED_TYPENAME Container::iterator iterator_t;
+
+ iterator_t reference_it
+ = std::remove(reference.begin(), reference.end(), to_remove);
+
+ Container test(c);
+ iterator_t test_it = boost::remove(test, to_remove);
+
+ BOOST_CHECK_EQUAL( std::distance(test.begin(), test_it),
+ std::distance(reference.begin(), reference_it) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+
+ template< class Container >
+ void test_remove_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_remove_impl(cont, 0);
+
+ cont.clear();
+ cont += 1;
+ test_remove_impl(cont, 0);
+ test_remove_impl(cont, 1);
+
+ cont.clear();
+ cont += 1,1,1,1,1;
+ test_remove_impl(cont, 0);
+ test_remove_impl(cont, 1);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_remove_impl(cont, 1);
+ test_remove_impl(cont, 9);
+ test_remove_impl(cont, 4);
+ }
+
+ void test_remove()
+ {
+ test_remove_impl< std::vector<int> >();
+ test_remove_impl< std::list<int> >();
+ test_remove_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.remove" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_remove ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/remove_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/remove_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/remove_if.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container, class UnaryPredicate >
+ void test_remove_if_impl( const Container& c, UnaryPredicate pred )
+ {
+ Container reference(c);
+
+ typedef BOOST_DEDUCED_TYPENAME Container::iterator iterator_t;
+
+ iterator_t reference_it
+ = std::remove_if(reference.begin(), reference.end(), pred);
+
+ Container test(c);
+ iterator_t test_it = boost::remove_if(test, pred);
+
+ BOOST_CHECK_EQUAL( std::distance(test.begin(), test_it),
+ std::distance(reference.begin(), reference_it) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+ }
+
+ template< class Container >
+ void test_remove_if_( const Container& c, int to_remove )
+ {
+ test_remove_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_remove));
+ test_remove_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_remove));
+ }
+
+ template< class Container >
+ void test_remove_if_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_remove_if_(cont, 0);
+
+ cont.clear();
+ cont += 1;
+ test_remove_if_(cont, 0);
+ test_remove_if_(cont, 1);
+
+ cont.clear();
+ cont += 1,1,1,1,1;
+ test_remove_if_(cont, 0);
+ test_remove_if_(cont, 1);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_remove_if_(cont, 1);
+ test_remove_if_(cont, 9);
+ test_remove_if_(cont, 4);
+ }
+
+ inline void test_remove_if()
+ {
+ test_remove_if_impl< std::vector<int> >();
+ test_remove_if_impl< std::list<int> >();
+ test_remove_if_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.remove_if" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_remove_if ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/replace.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/replace.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,79 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/replace.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_replace_impl(Container& cont)
+ {
+ const int what = 2;
+ const int with_what = 5;
+
+ std::vector<int> reference(cont.begin(), cont.end());
+ std::replace(reference.begin(), reference.end(), what, with_what);
+
+ std::vector<int> target(cont.begin(), cont.end());
+ boost::replace(target, what, with_what);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+
+ }
+
+ template< class Container >
+ void test_replace_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_replace_impl(cont);
+
+ cont.clear();
+ cont += 1;
+ test_replace_impl(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_replace_impl(cont);
+ }
+
+ void test_replace()
+ {
+ test_replace_impl< std::vector<int> >();
+ test_replace_impl< std::list<int> >();
+ test_replace_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.replace" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_replace ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/replace_if.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/replace_if.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/replace_if.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container, class UnaryPredicate >
+ void test_replace_if_impl(Container& cont, UnaryPredicate pred)
+ {
+ const int what = 2;
+ const int with_what = 5;
+
+ std::vector<int> reference(cont.begin(), cont.end());
+ std::replace_if(reference.begin(), reference.end(),
+ boost::bind(pred, _1, what), with_what);
+
+ std::vector<int> target(cont.begin(), cont.end());
+ boost::replace_if(target, boost::bind(pred, _1, what), with_what);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+
+ }
+
+ template< class Container >
+ void test_replace_if_impl(Container& cont)
+ {
+ test_replace_if_impl(cont, std::equal_to<int>());
+ test_replace_if_impl(cont, std::not_equal_to<int>());
+ }
+
+ template< class Container >
+ void test_replace_if_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_replace_if_impl(cont);
+
+ cont.clear();
+ cont += 1;
+ test_replace_if_impl(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_replace_if_impl(cont);
+ }
+
+ void test_replace_if()
+ {
+ test_replace_if_impl< std::vector<int> >();
+ test_replace_if_impl< std::list<int> >();
+ test_replace_if_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.replace_if" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_replace_if ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/reverse.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/reverse.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,78 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/reverse.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test_reverse_impl(Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ boost::reverse(test);
+ std::reverse(reference.begin(), reference.end());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_reverse_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_reverse_impl(cont);
+
+ cont.clear();
+ cont += 1;
+ test_reverse_impl(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_reverse_impl(cont);
+ }
+
+ void test_reverse()
+ {
+ test_reverse_impl< std::vector<int> >();
+ test_reverse_impl< std::list<int> >();
+ test_reverse_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.reverse" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_reverse ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/rotate.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/rotate.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,99 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/rotate.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container, class Iterator>
+ void test_rotate_impl(Container& cont, Iterator where_it)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ Iterator reference_where_it = reference.begin();
+ std::advance(reference_where_it,
+ std::distance(cont.begin(), where_it));
+
+ std::rotate(reference.begin(), reference_where_it, reference.end());
+
+ Iterator test_where_it = test.begin();
+ std::advance(test_where_it,
+ std::distance(cont.begin(), where_it));
+
+ boost::rotate(test, test_where_it);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_rotate_impl(Container& cont)
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+
+ iterator_t last = cont.end();
+ for (iterator_t it = cont.begin(); it != last; ++it)
+ {
+ test_rotate_impl(cont, it);
+ }
+ }
+
+ template<class Container>
+ void test_rotate_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_rotate_impl(cont);
+
+ cont.clear();
+ cont += 1;
+ test_rotate_impl(cont);
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_rotate_impl(cont);
+ }
+
+ void test_rotate()
+ {
+ test_rotate_impl< std::vector<int> >();
+ test_rotate_impl< std::list<int> >();
+ test_rotate_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.rotate" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_rotate ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/search.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/search.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,97 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/search.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container1, class Container2 >
+ void test_search_impl(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::const_iterator const_iterator1_t;
+ typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1_t;
+
+ const Container1& ccont1 = cont1;
+ const Container2& ccont2 = cont2;
+
+ iterator1_t it = boost::search(cont1, cont2);
+ iterator1_t it2 = boost::search(cont1, ccont2);
+ const_iterator1_t cit = boost::search(ccont1, cont2);
+ const_iterator1_t cit2 = boost::search(ccont1, ccont2);
+
+ BOOST_CHECK( it == std::search(cont1.begin(), cont1.end(), cont2.begin(), cont2.end()) );
+ BOOST_CHECK( it2 == std::search(cont1.begin(), cont1.end(), ccont2.begin(), ccont2.end()) );
+ BOOST_CHECK( cit == std::search(ccont1.begin(), ccont1.end(), cont2.begin(), cont2.end()) );
+ BOOST_CHECK( cit2 == std::search(ccont1.begin(), ccont1.end(), ccont2.begin(), ccont2.end()) );
+ }
+
+ template< class Container1, class Container2 >
+ void test_search_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_search_impl(cont1, cont2);
+
+ cont1 += 1;
+ test_search_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2 += 1;
+ test_search_impl(cont1, cont2);
+
+ cont1 += 1;
+ test_search_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 10,11,12;
+ test_search_impl(cont1, cont2);
+
+ cont2.clear();
+ cont2 += 4,5,6;
+ test_search_impl(cont1, cont2);
+ }
+
+ void test_search()
+ {
+ test_search_impl< std::list<int>, std::list<int> >();
+ test_search_impl< std::vector<int>, std::vector<int> >();
+ test_search_impl< std::set<int>, std::set<int> >();
+ test_search_impl< std::list<int>, std::vector<int> >();
+ test_search_impl< std::vector<int>, std::list<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.search" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_search ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/set_difference.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/set_difference.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,170 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Iterator, class Container2>
+ void check_result(
+ Container1& reference,
+ Iterator reference_result,
+ Container2& test_cont,
+ Iterator test_result
+ )
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance<Iterator>(reference.begin(), reference_result),
+ std::distance<Iterator>(test_cont.begin(), test_result)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test_cont.begin(), test_cont.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_difference(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin());
+
+ iterator_t test_result
+ = boost::set_difference(cont1, cont2, test_cont.begin());
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2,
+ BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_difference(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin(),
+ pred);
+
+ iterator_t test_result
+ = boost::set_difference(cont1, cont2, test_cont.begin(), pred);
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container1, class Container2>
+ void test_set_difference_impl(
+ Container1& cont1,
+ Container2& cont2
+ )
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_set_difference_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_set_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_set_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_set_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 2,3,4;
+ test_set_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2,3,4;
+ cont2 += 1,2,3,4,5,6,7,8,9;
+ test_set_difference_impl(cont1, cont2);
+ }
+
+ void test_set_difference()
+ {
+ test_set_difference_impl< std::vector<int>, std::vector<int> >();
+ test_set_difference_impl< std::list<int>, std::list<int> >();
+ test_set_difference_impl< std::deque<int>, std::deque<int> >();
+ test_set_difference_impl< std::vector<int>, std::list<int> >();
+ test_set_difference_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.set_difference" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_set_difference ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/set_intersection.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/set_intersection.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,170 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Iterator, class Container2>
+ void check_result(
+ Container1& reference,
+ Iterator reference_result,
+ Container2& test_cont,
+ Iterator test_result
+ )
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance<Iterator>(reference.begin(), reference_result),
+ std::distance<Iterator>(test_cont.begin(), test_result)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test_cont.begin(), test_cont.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_intersection(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin());
+
+ iterator_t test_result
+ = boost::set_intersection(cont1, cont2, test_cont.begin());
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2,
+ BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_intersection(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin(),
+ pred);
+
+ iterator_t test_result
+ = boost::set_intersection(cont1, cont2, test_cont.begin(), pred);
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container1, class Container2>
+ void test_set_intersection_impl(
+ Container1& cont1,
+ Container2& cont2
+ )
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_set_intersection_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_set_intersection_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_set_intersection_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_set_intersection_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 2,3,4;
+ test_set_intersection_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2,3,4;
+ cont2 += 1,2,3,4,5,6,7,8,9;
+ test_set_intersection_impl(cont1, cont2);
+ }
+
+ void test_set_intersection()
+ {
+ test_set_intersection_impl< std::vector<int>, std::vector<int> >();
+ test_set_intersection_impl< std::list<int>, std::list<int> >();
+ test_set_intersection_impl< std::deque<int>, std::deque<int> >();
+ test_set_intersection_impl< std::vector<int>, std::list<int> >();
+ test_set_intersection_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.set_intersection" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_set_intersection ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/set_symmetric_difference.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/set_symmetric_difference.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,172 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Iterator, class Container2>
+ void check_result(
+ Container1& reference,
+ Iterator reference_result,
+ Container2& test_cont,
+ Iterator test_result
+ )
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance<Iterator>(reference.begin(), reference_result),
+ std::distance<Iterator>(test_cont.begin(), test_result)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test_cont.begin(), test_cont.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_symmetric_difference(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin());
+
+ iterator_t test_result
+ = boost::set_symmetric_difference(cont1, cont2,
+ test_cont.begin());
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2,
+ BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_symmetric_difference(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin(),
+ pred);
+
+ iterator_t test_result
+ = boost::set_symmetric_difference(cont1, cont2,
+ test_cont.begin(), pred);
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container1, class Container2>
+ void test_set_symmetric_difference_impl(
+ Container1& cont1,
+ Container2& cont2
+ )
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_set_symmetric_difference_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_set_symmetric_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_set_symmetric_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_set_symmetric_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 2,3,4;
+ test_set_symmetric_difference_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2,3,4;
+ cont2 += 1,2,3,4,5,6,7,8,9;
+ test_set_symmetric_difference_impl(cont1, cont2);
+ }
+
+ void test_set_symmetric_difference()
+ {
+ test_set_symmetric_difference_impl< std::vector<int>, std::vector<int> >();
+ test_set_symmetric_difference_impl< std::list<int>, std::list<int> >();
+ test_set_symmetric_difference_impl< std::deque<int>, std::deque<int> >();
+ test_set_symmetric_difference_impl< std::vector<int>, std::list<int> >();
+ test_set_symmetric_difference_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.set_symmetric_difference" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_set_symmetric_difference ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/set_union.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/set_union.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,170 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container1, class Iterator, class Container2>
+ void check_result(
+ Container1& reference,
+ Iterator reference_result,
+ Container2& test_cont,
+ Iterator test_result
+ )
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance<Iterator>(reference.begin(), reference_result),
+ std::distance<Iterator>(test_cont.begin(), test_result)
+ );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test_cont.begin(), test_cont.end()
+ );
+ }
+
+ template<class Container1, class Container2>
+ void test(Container1& cont1, Container2& cont2)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_union(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin());
+
+ iterator_t test_result
+ = boost::set_union(cont1, cont2, test_cont.begin());
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container, class BinaryPredicate>
+ void sort_container(Container& cont, BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+ }
+
+ template<class Container1,
+ class Container2,
+ class BinaryPredicate>
+ void test_pred(Container1 cont1, Container2 cont2,
+ BinaryPredicate pred)
+ {
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ sort_container(cont1, pred);
+ sort_container(cont2, pred);
+
+ std::vector<value_t> reference(cont1.size() + cont2.size());
+ std::vector<value_t> test_cont(reference);
+
+ iterator_t reference_result
+ = std::set_union(cont1.begin(), cont1.end(),
+ cont2.begin(), cont2.end(),
+ reference.begin(),
+ pred);
+
+ iterator_t test_result
+ = boost::set_union(cont1, cont2, test_cont.begin(), pred);
+
+ check_result(reference, reference_result,
+ test_cont, test_result);
+ }
+
+ template<class Container1, class Container2>
+ void test_set_union_impl(
+ Container1& cont1,
+ Container2& cont2
+ )
+ {
+ test(cont1, cont2);
+ test_pred(cont1, cont2, std::less<int>());
+ test_pred(cont1, cont2, std::greater<int>());
+ }
+
+ template<class Container1, class Container2>
+ void test_set_union_impl()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_set_union_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1;
+ test_set_union_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont2 += 1;
+ test_set_union_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 1,2,3,4,5,6,7,8,9;
+ cont2 += 2,3,4;
+ test_set_union_impl(cont1, cont2);
+
+ cont1.clear();
+ cont2.clear();
+ cont1 += 2,3,4;
+ cont2 += 1,2,3,4,5,6,7,8,9;
+ test_set_union_impl(cont1, cont2);
+ }
+
+ void test_set_union()
+ {
+ test_set_union_impl< std::vector<int>, std::vector<int> >();
+ test_set_union_impl< std::list<int>, std::list<int> >();
+ test_set_union_impl< std::deque<int>, std::deque<int> >();
+ test_set_union_impl< std::vector<int>, std::list<int> >();
+ test_set_union_impl< std::list<int>, std::vector<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.set_union" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_set_union ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/sort.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/sort.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,97 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/sort.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test_sort_impl(Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ boost::sort(test);
+ std::sort(reference.begin(), reference.end());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_sort_impl(Container& cont, BinaryPredicate pred)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ boost::sort(test, pred);
+ std::sort(reference.begin(), reference.end(), pred);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_sort_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_sort_impl(cont);
+ test_sort_impl(cont, std::less<int>());
+ test_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1;
+ test_sort_impl(cont);
+ test_sort_impl(cont, std::less<int>());
+ test_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_sort_impl(cont);
+ test_sort_impl(cont, std::less<int>());
+ test_sort_impl(cont, std::greater<int>());
+ }
+
+ void test_sort()
+ {
+ test_sort_impl< std::vector<int> >();
+ test_sort_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.sort" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_sort ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/stable_partition.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/stable_partition.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,112 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/stable_partition.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ struct equal_to_5
+ {
+ typedef bool result_type;
+ typedef int argument_type;
+ bool operator()(int x) const { return x == 5; }
+ };
+
+ // test the 'partition' algorithm
+ template<class UnaryPredicate>
+ class stable_partition_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::stable_partition(cont, UnaryPredicate());
+ }
+
+ UnaryPredicate pred() const { return UnaryPredicate(); }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::stable_partition<return_type>(cont, policy.pred());
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::stable_partition(cont.begin(), cont.end(), UnaryPredicate());
+ }
+ };
+
+ template<class Container>
+ void test_stable_partition_impl()
+ {
+ using namespace boost::assign;
+
+ range_test::range_return_test_driver test_driver;
+
+ stable_partition_test_policy< equal_to_5 > policy;
+
+ Container cont;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,2,2,3,4,5,6,7,8,9;
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,2,2,3,3,3,3,4,4,4,4,4,4,4,5,6,7,8,9;
+ test_driver(cont, policy);
+ }
+
+ void test_stable_partition()
+ {
+ test_stable_partition_impl< std::vector<int> >();
+ test_stable_partition_impl< std::list<int> >();
+ test_stable_partition_impl< std::deque<int> >();
+ }
+ }
+}
+
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.stable_partition" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_stable_partition ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/stable_sort.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/stable_sort.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,97 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/stable_sort.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void test_stable_sort_impl(Container& cont)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ boost::stable_sort(test);
+ std::stable_sort(reference.begin(), reference.end());
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container, class BinaryPredicate>
+ void test_stable_sort_impl(Container& cont, BinaryPredicate pred)
+ {
+ Container reference(cont);
+ Container test(cont);
+
+ boost::stable_sort(test, pred);
+ std::stable_sort(reference.begin(), reference.end(), pred);
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+ }
+
+ template<class Container>
+ void test_stable_sort_impl()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+ test_stable_sort_impl(cont);
+ test_stable_sort_impl(cont, std::less<int>());
+ test_stable_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1;
+ test_stable_sort_impl(cont);
+ test_stable_sort_impl(cont, std::less<int>());
+ test_stable_sort_impl(cont, std::greater<int>());
+
+ cont.clear();
+ cont += 1,2,3,4,5,6,7,8,9;
+ test_stable_sort_impl(cont);
+ test_stable_sort_impl(cont, std::less<int>());
+ test_stable_sort_impl(cont, std::greater<int>());
+ }
+
+ void test_stable_sort()
+ {
+ test_stable_sort_impl< std::vector<int> >();
+ test_stable_sort_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.stable_sort" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_stable_sort ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/transform.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/transform.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,158 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/transform.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include "../test_function/multiply_by_x.hpp"
+#include <algorithm>
+#include <list>
+#include <set>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ template< class Container >
+ void test_transform_impl1(Container& cont)
+ {
+ using namespace boost::range_test_function;
+
+ const Container& ccont = cont;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ std::vector<value_t> target(cont.size());
+ std::vector<value_t> reference(cont.size());
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ multiply_by_x<int> fn(2);
+
+ iterator_t reference_it
+ = std::transform(cont.begin(), cont.end(), reference.begin(), fn);
+
+ iterator_t test_it
+ = boost::transform(cont, target.begin(), fn);
+
+ BOOST_CHECK( test_it == target.end() );
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+
+ target.clear();
+ target.resize(ccont.size());
+
+ test_it = boost::transform(ccont, target.begin(), fn);
+
+ BOOST_CHECK( test_it == target.end() );
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+ }
+
+ template< class Container >
+ void test_transform_impl1()
+ {
+ using namespace boost::assign;
+
+ Container cont;
+
+ test_transform_impl1(cont);
+
+ cont += 1;
+ test_transform_impl1(cont);
+
+ cont += 2,3,4,5,6,7;
+ test_transform_impl1(cont);
+ }
+
+ template< class Container1, class Container2 >
+ void test_transform_impl2(Container1& cont1, Container2& cont2)
+ {
+ const Container1& ccont1 = cont1;
+ const Container2& ccont2 = cont2;
+
+ BOOST_CHECK_EQUAL( cont1.size(), cont2.size() );
+
+ typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_t;
+
+ std::vector<value_t> target(cont1.size());
+ std::vector<value_t> reference(cont1.size());
+ typedef BOOST_DEDUCED_TYPENAME std::vector<value_t>::iterator iterator_t;
+
+ std::multiplies<int> fn;
+
+ iterator_t reference_it
+ = std::transform(cont1.begin(), cont1.end(),
+ cont2.begin(), reference.begin(), fn);
+
+ iterator_t test_it
+ = boost::transform(cont1, cont2, target.begin(), fn);
+
+ BOOST_CHECK( test_it == target.end() );
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+
+ target.clear();
+ target.resize(ccont1.size());
+
+ test_it = boost::transform(ccont1, ccont2, target.begin(), fn);
+
+ BOOST_CHECK( test_it == target.end() );
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ target.begin(), target.end() );
+ }
+
+ template< class Container1, class Container2 >
+ void test_transform_impl2()
+ {
+ using namespace boost::assign;
+
+ Container1 cont1;
+ Container2 cont2;
+
+ test_transform_impl2(cont1, cont2);
+
+ cont1 += 1;
+ cont2 += 2;
+ test_transform_impl2(cont1, cont2);
+
+ cont1 += 2,3,4,5,6,7;
+ cont2 += 4,6,8,10,12,14;
+ test_transform_impl2(cont1, cont2);
+ }
+
+ void test_transform()
+ {
+ test_transform_impl1< std::vector<int> >();
+ test_transform_impl1< std::list<int> >();
+ test_transform_impl1< std::set<int> >();
+ test_transform_impl1< std::multiset<int> >();
+
+ test_transform_impl2< std::vector<int>, std::list<int> >();
+ test_transform_impl2< std::list<int>, std::vector<int> >();
+ test_transform_impl2< std::set<int>, std::set<int> >();
+ test_transform_impl2< std::multiset<int>, std::list<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.transform" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_transform ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/unique.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/unique.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,166 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/unique.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ // test the 'unique' algorithm without a predicate
+ class unique_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ // There isn't an iterator return version of boost::unique, so just
+ // perform the standard algorithm
+ return std::unique(cont.begin(), cont.end());
+ }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::unique<return_type>(cont);
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::unique(cont.begin(), cont.end());
+ }
+ };
+
+ // test the 'unique' algorithm with a predicate
+ template<class Pred>
+ class unique_pred_test_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ // There isn't an iterator return version of boost::unique, so just
+ // perform the standard algorithm
+ return std::unique(cont.begin(), cont.end(), Pred());
+ }
+
+ Pred pred() const { return Pred(); }
+
+ template< range_return_value return_type >
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::unique<return_type>(cont, policy.pred());
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::unique(cont.begin(), cont.end(), Pred());
+ }
+ };
+
+ template<class Container, class TestPolicy, class Pred>
+ void test_unique_impl(TestPolicy policy, Pred pred)
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ Container cont;
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1;
+
+ std::vector<value_t> temp(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+
+ cont.clear();
+ cont += 1,2,2,2,2,3,4,5,6,7,8,9;
+
+ temp.assign(cont.begin(), cont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ cont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+ }
+
+ template<class Container>
+ void test_unique_impl()
+ {
+ test_unique_impl<Container>(
+ unique_test_policy(),
+ std::less<int>()
+ );
+
+ test_unique_impl<Container>(
+ unique_pred_test_policy<std::less<int> >(),
+ std::less<int>()
+ );
+
+ test_unique_impl<Container>(
+ unique_pred_test_policy<std::greater<int> >(),
+ std::greater<int>()
+ );
+ }
+
+ void test_unique()
+ {
+ test_unique_impl< std::vector<int> >();
+ test_unique_impl< std::list<int> >();
+ test_unique_impl< std::deque<int> >();
+ }
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.unique" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_unique ) );
+
+ return test;
+}

Added: trunk/libs/range/test/algorithm_test/upper_bound.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/algorithm_test/upper_bound.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,170 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/algorithm/upper_bound.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/bind.hpp>
+#include "../test_driver/range_return_test_driver.hpp"
+#include <algorithm>
+#include <functional>
+#include <list>
+#include <numeric>
+#include <deque>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ class upper_bound_policy
+ {
+ public:
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::upper_bound(cont, 5);
+ }
+
+ template<range_return_value result_type>
+ struct test_range
+ {
+ template<class Container, class Policy>
+ BOOST_DEDUCED_TYPENAME range_return<Container,result_type>::type
+ operator()(Policy&, Container& cont)
+ {
+ return boost::upper_bound<result_type>(cont, 5);
+ }
+ };
+
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::upper_bound(cont.begin(), cont.end(), 5);
+ }
+ };
+
+ template< class BinaryPredicate >
+ struct upper_bound_pred_policy
+ {
+ template< class Container >
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ test_iter(Container& cont)
+ {
+ return boost::upper_bound(cont, 5, BinaryPredicate());
+ }
+
+ template< range_return_value result_type>
+ struct test_range
+ {
+ template< class Container, class Policy >
+ BOOST_DEDUCED_TYPENAME range_return<Container,result_type>::type
+ operator()(Policy& policy, Container& cont)
+ {
+ return boost::upper_bound<result_type>(
+ cont, 5, policy.pred());
+ }
+ };
+
+ template<class Container>
+ BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ reference(Container& cont)
+ {
+ return std::upper_bound(
+ cont.begin(), cont.end(), 5, BinaryPredicate());
+ }
+
+ BinaryPredicate& pred() { return m_pred; }
+
+ private:
+ BinaryPredicate m_pred;
+ };
+
+ template<class Container,
+ class TestPolicy,
+ class BinaryPredicate>
+ void test_upper_bound_impl(TestPolicy policy, BinaryPredicate pred)
+ {
+ using namespace boost::assign;
+
+ typedef BOOST_DEDUCED_TYPENAME remove_const<Container>::type container_t;
+ typedef BOOST_DEDUCED_TYPENAME Container::value_type value_t;
+
+ range_test::range_return_test_driver test_driver;
+
+ container_t mcont;
+ Container& cont = mcont;
+
+ test_driver(cont, policy);
+
+ mcont.clear();
+ mcont += 1;
+
+ std::vector<value_t> temp(mcont.begin(), mcont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ mcont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+
+ mcont.clear();
+ mcont += 1,2,3,4,5,6,7,8,9;
+
+ temp.assign(mcont.begin(), mcont.end());
+ std::sort(temp.begin(), temp.end(), pred);
+ mcont.assign(temp.begin(), temp.end());
+
+ test_driver(cont, policy);
+ }
+
+ template<class Container>
+ void test_upper_bound_impl()
+ {
+ test_upper_bound_impl<Container>(
+ upper_bound_policy(),
+ std::less<int>()
+ );
+
+ test_upper_bound_impl<Container>(
+ upper_bound_pred_policy<std::less<int> >(),
+ std::less<int>()
+ );
+
+ test_upper_bound_impl<Container>(
+ upper_bound_pred_policy<std::greater<int> >(),
+ std::greater<int>()
+ );
+ }
+ }
+
+ void test_upper_bound()
+ {
+ test_upper_bound_impl< std::vector<int> >();
+ test_upper_bound_impl< std::list<int> >();
+ test_upper_bound_impl< std::deque<int> >();
+
+ test_upper_bound_impl< const std::vector<int> >();
+ test_upper_bound_impl< const std::list<int> >();
+ test_upper_bound_impl< const std::deque<int> >();
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.algorithm.upper_bound" );
+
+ test->add( BOOST_TEST_CASE( &boost::test_upper_bound ) );
+
+ return test;
+}

Added: trunk/libs/range/test/combine.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/combine.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,69 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#include <boost/range/combine.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <boost/assign/list_of.hpp>
+#include <boost/foreach.hpp>
+#include <vector>
+
+
+struct add
+{
+ template< class T >
+ int operator()( const T& tuple ) const
+ {
+ return boost::get<0>(tuple) + boost::get<1>(tuple);
+ }
+};
+
+template< class CombinedRng >
+void apply( const CombinedRng& r )
+{
+ std::vector<int> v;
+ for( typename boost::range_iterator<const CombinedRng>::type
+ i = boost::begin(r),
+ e = boost::end(r);
+ i != e; ++i )
+ {
+
+ }
+}
+
+void test_combine()
+{
+ std::vector<int> v1, v2, v3;
+ v1 = boost::assign::list_of(1)(2)(3)(4);
+ v2 = boost::assign::list_of(1)(2)(3)(4);
+
+ int i1, i2;
+ BOOST_FOREACH( boost::tie( i1, i2 ), boost::combine(v1,v2) )
+ {
+ v3.push_back( i1 + i2 );
+ }
+
+ BOOST_CHECK_EQUAL( v3.size(), v1.size() );
+}
+
+
+
+using boost::unit_test::test_suite;
+
+test_suite* init_unit_test_suite( int argc, char* argv[] )
+{
+ test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
+
+ test->add( BOOST_TEST_CASE( &test_combine ) );
+
+ return test;
+}
+
+

Modified: trunk/libs/range/test/compat2.cpp
==============================================================================
--- trunk/libs/range/test/compat2.cpp (original)
+++ trunk/libs/range/test/compat2.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -42,7 +42,7 @@
 class iterator_of
 {
 public:
- typedef range_iterator<Container>::BOOST_NESTED_TEMPLATE pts<C>::type type;
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::BOOST_NESTED_TEMPLATE pts<C>::type type;
 };
 
 #include <vector>

Added: trunk/libs/range/test/counting_range.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/counting_range.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,73 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+// Disable a warning from <xutility> since this noise might
+// stop us detecting a problem in our code.
+#include <boost/range/counting_range.hpp>
+
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+
+#include <algorithm>
+#include <deque>
+#include <string>
+#include <vector>
+#include <boost/range/algorithm_ext.hpp>
+namespace boost
+{
+ namespace
+ {
+ template<class Container>
+ void counting_range_test_impl(int first, int last)
+ {
+ Container reference;
+ for (int i = first; i < last; ++i)
+ reference.push_back(i);
+
+ Container test;
+ push_back( test, counting_range(first, last) );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end());
+ }
+
+ template<class Container>
+ void counting_range_test_impl()
+ {
+ counting_range_test_impl<Container>(0, 0);
+ counting_range_test_impl<Container>(-1, -1);
+ counting_range_test_impl<Container>(-1, 0);
+ counting_range_test_impl<Container>(0, 1);
+ counting_range_test_impl<Container>(-100, 100);
+ counting_range_test_impl<Container>(50, 55);
+ }
+ }
+
+ void counting_range_test()
+ {
+ counting_range_test_impl<std::vector<int> >();
+ counting_range_test_impl<std::list<int> >();
+ counting_range_test_impl<std::deque<int> >();
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.counting_range" );
+
+ test->add( BOOST_TEST_CASE( &boost::counting_range_test ) );
+
+ return test;
+}
\ No newline at end of file

Added: trunk/libs/range/test/irange.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/irange.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,131 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2010. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/irange.hpp>
+#include <boost/range/algorithm_ext.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+#include <iostream>
+#include <vector>
+
+namespace boost
+{
+ // Test an integer range with a step size of 1.
+ template<typename Integer>
+ void test_irange_impl(Integer first, Integer last)
+ {
+ std::vector<Integer> reference;
+ for (Integer i = first; i < last; ++i)
+ {
+ reference.push_back(i);
+ }
+
+ std::vector<Integer> test;
+ boost::push_back(test, boost::irange(first, last));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test.begin(), test.end(),
+ reference.begin(), reference.end() );
+ }
+
+ // Test an integer range with a runtime specified step size.
+ template<typename Integer>
+ void test_irange_impl(Integer first, Integer last, int step)
+ {
+ BOOST_ASSERT( step != 0 );
+ std::vector<Integer> reference;
+ if (step > 0)
+ {
+ for (Integer i = first; i < last; i += step)
+ reference.push_back(i);
+ }
+ else
+ {
+ for (Integer i = first; i > last; i += step)
+ reference.push_back(i);
+ }
+
+ std::vector<Integer> test;
+ boost::push_back(test, boost::irange(first, last, step));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( test.begin(), test.end(),
+ reference.begin(), reference.end() );
+ }
+
+ // Test driver function that for an integer range [first, last)
+ // drives the test implementation through various integer
+ // types.
+ void test_irange(int first, int last)
+ {
+ test_irange_impl<signed char>(first,last);
+ test_irange_impl<unsigned char>(first, last);
+ test_irange_impl<signed short>(first, last);
+ test_irange_impl<unsigned short>(first, last);
+ test_irange_impl<signed int>(first, last);
+ test_irange_impl<unsigned int>(first, last);
+ test_irange_impl<signed long>(first, last);
+ test_irange_impl<unsigned long>(first, last);
+ }
+
+ // Test driver function that for an integer range [first, last)
+ // drives the test implementation through various integer
+ // types step_size items at a time.
+ void test_irange(int first, int last, int step_size)
+ {
+ BOOST_ASSERT( step_size != 0 );
+ BOOST_ASSERT( (last - first) % step_size == 0 );
+ test_irange_impl<signed char>(first, last, step_size);
+ test_irange_impl<unsigned char>(first, last, step_size);
+ test_irange_impl<signed short>(first, last, step_size);
+ test_irange_impl<unsigned short>(first, last, step_size);
+ test_irange_impl<signed int>(first, last, step_size);
+ test_irange_impl<unsigned int>(first, last, step_size);
+ test_irange_impl<signed long>(first, last, step_size);
+ test_irange_impl<unsigned long>(first, last, step_size);
+ }
+
+ // Implementation of the unit test for the integer range
+ // function.
+ // This starts the test drivers to drive a set of integer types
+ // for a combination of range values chosen to exercise a large
+ // number of implementation branches.
+ void irange_unit_test()
+ {
+ // Test the single-step version of irange(first, last)
+ test_irange(0, 0);
+ test_irange(0, 1);
+ test_irange(0, 10);
+ test_irange(1, 1);
+ test_irange(1, 2);
+ test_irange(1, 11);
+
+ // Test the n-step version of irange(first, last, step-size)
+ test_irange(0, 0, 1);
+ test_irange(0, 0, -1);
+ test_irange(0, 10, 1);
+ test_irange(10, 0, -1);
+ test_irange(0, 2, 2);
+ test_irange(2, 0, -2);
+ test_irange(10, 20, 5);
+ test_irange(20, 10, -5);
+ }
+} // namespace boost
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.irange" );
+
+ test->add(BOOST_TEST_CASE( &boost::irange_unit_test ));
+
+ return test;
+}

Added: trunk/libs/range/test/join.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/join.cpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,273 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2010. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#include <boost/range/join.hpp>
+
+#include <boost/foreach.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include <boost/assign.hpp>
+#include <boost/range/algorithm_ext.hpp>
+#include <boost/range/irange.hpp>
+
+#include <boost/iterator/iterator_facade.hpp>
+
+#include <algorithm>
+#include <deque>
+#include <list>
+#include <vector>
+
+namespace boost
+{
+ namespace
+ {
+ // This function is a helper function that writes integers
+ // of increasing value into a range. It is used to test
+ // that joined ranged may be written to.
+ //
+ // Requires:
+ // - Range uses shallow copy semantics.
+ template< typename Range >
+ void fill_with_ints(Range rng)
+ {
+ typedef typename range_iterator<Range>::type iterator;
+ iterator target = boost::begin(rng);
+ const int count = boost::distance(rng);
+ for (int i = 0; i < count; ++i)
+ {
+ *target = i;
+ ++target;
+ }
+ }
+
+ // The test_join_traversal function is used to provide additional
+ // tests based upon the underlying join iterator traversal.
+ // The join iterator takes care of the appropriate demotion, and
+ // this demotion.
+
+ // test_join_traversal - additional tests for input and forward
+ // traversal iterators. This is of course a no-op.
+ template< typename Range1, typename Range2, typename TraversalTag >
+ void test_join_traversal(Range1& rng1, Range2& rng2, TraversalTag)
+ {
+ }
+
+ // test_join_traversal - additional tests for bidirectional
+ // traversal iterators.
+ template< typename Range1, typename Range2 >
+ void test_join_traversal(Range1& rng1, Range2& rng2, boost::bidirectional_traversal_tag)
+ {
+ typedef typename range_value<Range1>::type value_type;
+ std::vector<value_type> reference(boost::begin(rng1), boost::end(rng1));
+ boost::push_back(reference, rng2);
+ std::reverse(reference.begin(), reference.end());
+
+ std::vector<value_type> test_result;
+ BOOST_REVERSE_FOREACH( value_type x, join(rng1, rng2) )
+ {
+ test_result.push_back(x);
+ }
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result.begin(), test_result.end() );
+ }
+
+ // Test helper function to implement the additional tests for random
+ // access traversal iterators. This is used by the test_join_traversal
+ // function for random access iterators. The reason that the test
+ // implementation is put into this function is to utilise
+ // template parameter type deduction for the joined range type.
+ template< typename Range1, typename Range2, typename JoinedRange >
+ void test_random_access_join(Range1& rng1, Range2& rng2, JoinedRange joined)
+ {
+ BOOST_CHECK_EQUAL( boost::end(joined) - boost::begin(joined), boost::distance(joined) );
+ BOOST_CHECK( boost::end(joined) <= boost::begin(joined) );
+ BOOST_CHECK( boost::begin(joined) >= boost::end(joined) );
+ if (boost::empty(joined))
+ {
+ BOOST_CHECK(!(boost::begin(joined) < boost::end(joined)));
+ BOOST_CHECK(!(boost::end(joined) > boost::begin(joined)));
+ }
+ else
+ {
+ BOOST_CHECK(boost::begin(joined) < boost::end(joined));
+ BOOST_CHECK(boost::end(joined) < boost::begin(joined));
+ }
+
+ typedef typename boost::range_difference<JoinedRange>::type difference_t;
+ const difference_t count = boost::distance(joined);
+ BOOST_CHECK( boost::begin(joined) + count == boost::end(joined) );
+ BOOST_CHECK( boost::end(joined) - count == boost::begin(joined) );
+
+ typedef typename boost::range_iterator<JoinedRange>::type iterator_t;
+ iterator_t it = boost::begin(joined);
+ it += count;
+ BOOST_CHECK( it == boost::end(joined) );
+
+ it = boost::end(joined);
+ it -= count;
+ BOOST_CHECK( it == boost::begin(joined) );
+ }
+
+ // test_join_traversal function for random access traversal joined
+ // ranges.
+ template< typename Range1, typename Range2 >
+ void test_join_traversal(Range1& rng1, Range2& rng2, boost::random_access_traversal_tag)
+ {
+ test_join_traversal(rng1, rng2, boost::bidirectional_traversal_tag());
+ test_random_access_join(rng1, rng2, join(rng1, rng2));
+ }
+
+ // Test the ability to write values into a joined range. This is
+ // achieved by copying the constant collections, altering them
+ // and then checking the result. Hence this relies upon both
+ // rng1 and rng2 having value copy semantics.
+ template< typename Collection1, typename Collection2 >
+ void test_write_to_joined_range(const Collection1& rng1, const Collection2& rng2)
+ {
+ Collection1 c1(rng1);
+ Collection2 c2(rng2);
+ typedef typename boost::range_value<Collection1>::type value_t;
+ fill_with_ints(boost::join(c1,c2));
+
+ // Ensure that the size of the written range has not been
+ // altered.
+ BOOST_CHECK_EQUAL( boost::distance(c1), boost::distance(rng1) );
+ BOOST_CHECK_EQUAL( boost::distance(c2), boost::distance(rng2) );
+
+ // For each element x, in c1 ensure that it has been written to
+ // with incrementing integers
+ int x = 0;
+ typedef typename range_iterator<Collection1>::type iterator1;
+ iterator1 it1 = boost::begin(c1);
+ for (; it1 != boost::end(c1); ++it1)
+ {
+ BOOST_CHECK_EQUAL( x, *it1 );
+ ++x;
+ }
+
+ // For each element y, in c2 ensure that it has been written to
+ // with incrementing integers
+ typedef typename range_iterator<Collection2>::type iterator2;
+ iterator2 it2 = boost::begin(c2);
+ for (; it2 != boost::end(c2); ++it2)
+ {
+ BOOST_CHECK_EQUAL( x, *it2 );
+ ++x;
+ }
+ }
+
+ // Perform a unit test of a Boost.Range join() comparing
+ // it to a reference that is populated by appending
+ // elements from both source ranges into a vector.
+ template< typename Collection1, typename Collection2 >
+ void test_join_impl(Collection1& rng1, Collection2& rng2)
+ {
+ typedef typename range_value<Collection1>::type value_type;
+ std::vector<value_type> reference(boost::begin(rng1), boost::end(rng1));
+ boost::push_back(reference, rng2);
+
+ std::vector<value_type> test_result;
+ boost::push_back(test_result, join(rng1, rng2));
+
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test_result.begin(), test_result.end() );
+
+ typedef boost::range_detail::join_iterator<
+ typename boost::range_iterator<Collection1>::type,
+ typename boost::range_iterator<Collection2>::type
+ > join_iterator_t;
+
+ typedef boost::iterator_traversal< join_iterator_t > tag_t;
+
+ test_join_traversal(rng1, rng2, tag_t());
+
+ test_write_to_joined_range(rng1, rng2);
+ }
+
+ // Make a collection filling it with items from the source
+ // range. This is used to build collections of various
+ // sizes populated with various values designed to optimize
+ // the code coverage exercised by the core test function
+ // test_join_impl.
+ template<typename Collection, typename Range>
+ boost::shared_ptr<Collection> makeCollection(const Range& source)
+ {
+ boost::shared_ptr<Collection> c(new Collection);
+ c->insert(c->end(), boost::begin(source), boost::end(source));
+ return c;
+ }
+
+ // This templatised version of the test_join_impl function
+ // generates and populates collections which are later
+ // used as input to the core test function.
+ // The caller of this function explicitly provides the
+ // template parameters. This supports the generation
+ // of testing a large combination of range types to be
+ // joined. It is of particular importance to remember
+ // to combine a random_access range with a bidirectional
+ // range to determine that the correct demotion of
+ // types occurs in the join_iterator.
+ template< typename Collection1, typename Collection2 >
+ void test_join_impl()
+ {
+ typedef boost::shared_ptr<Collection1> collection1_ptr;
+ typedef boost::shared_ptr<Collection2> collection2_ptr;
+ typedef boost::shared_ptr<const Collection1> collection1_cptr;
+ typedef boost::shared_ptr<const Collection2> collection2_cptr;
+ std::vector< collection1_cptr > left_containers;
+ std::vector< collection2_cptr > right_containers;
+
+ left_containers.push_back(collection1_ptr(new Collection1));
+ left_containers.push_back(makeCollection<Collection1>(irange(0,1)));
+ left_containers.push_back(makeCollection<Collection1>(irange(0,100)));
+
+ right_containers.push_back(collection2_ptr(new Collection2));
+ right_containers.push_back(makeCollection<Collection2>(irange(0,1)));
+ right_containers.push_back(makeCollection<Collection2>(irange(0,100)));
+
+ BOOST_FOREACH( collection1_cptr left_container, left_containers )
+ {
+ BOOST_FOREACH( collection2_cptr right_container, right_containers )
+ {
+ test_join_impl(*left_container, *right_container);
+ }
+ }
+ }
+
+ // entry-point into the unit test for the join() function
+ // this tests a representative sample of combinations of
+ // source range type.
+ void join_test()
+ {
+ test_join_impl< std::vector<int>, std::vector<int> >();
+ test_join_impl< std::list<int>, std::list<int> >();
+ test_join_impl< std::deque<int>, std::deque<int> >();
+
+ test_join_impl< std::vector<int>, std::list<int> >();
+ test_join_impl< std::list<int>, std::vector<int> >();
+ test_join_impl< std::vector<int>, std::deque<int> >();
+ test_join_impl< std::deque<int>, std::vector<int> >();
+ }
+
+ }
+}
+
+boost::unit_test::test_suite*
+init_unit_test_suite(int argc, char* argv[])
+{
+ boost::unit_test::test_suite* test
+ = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.joined" );
+
+ test->add( BOOST_TEST_CASE( &boost::join_test ) );
+
+ return test;
+}

Added: trunk/libs/range/test/test_driver/range_return_test_driver.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_driver/range_return_test_driver.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,405 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_TEST_DRIVER_RANGE_RETURN_TEST_DRIVER_HPP_INCLUDED
+#define BOOST_RANGE_TEST_TEST_DRIVER_RANGE_RETURN_TEST_DRIVER_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
+
+namespace boost
+{
+ namespace range_test
+ {
+ // check the results of an algorithm that returns
+ // a range_return.
+ //
+ // This version is the general version. It should never be called.
+ // All calls should invoke specialized implementations.
+ template< range_return_value return_type >
+ struct check_results
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ Iterator test_it,
+ Iterator reference_it
+ )
+ {
+ BOOST_ASSERT( false );
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a 'found' iterator
+ template< >
+ struct check_results<return_found>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ Iterator test_it,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+
+ BOOST_CHECK_EQUAL( std::distance(test.begin(), test_it),
+ std::distance(reference.begin(), reference_it) );
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a 'next(found)' iterator
+ template< >
+ struct check_results<return_next>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ Iterator test_it,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+
+ if (reference_it == reference.end())
+ {
+ BOOST_CHECK( test_it == test.end() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance(test.begin(), test_it),
+ std::distance(reference.begin(), reference_it) + 1);
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a 'prior(found)' iterator
+ template< >
+ struct check_results<return_prior>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ Iterator test_it,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+
+ if (reference_it == reference.begin())
+ {
+ BOOST_CHECK( test_it == test.begin() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL(
+ std::distance(test.begin(), test_it) + 1,
+ std::distance(reference.begin(), reference_it));
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[begin, found)' range
+ template< >
+ struct check_results<return_begin_found>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK( test_rng.begin() == test.begin() );
+
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference_it,
+ boost::begin(test_rng), boost::end(test_rng)
+ );
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[begin, next(found))' range
+ template< >
+ struct check_results<return_begin_next>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK( test_rng.begin() == test.begin() );
+
+ if (reference_it == reference.end())
+ {
+ BOOST_CHECK( test_rng.end() == test.end() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), boost::next(reference_it),
+ test_rng.begin(), test_rng.end());
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[begin, prior(found))' range
+ template< >
+ struct check_results<return_begin_prior>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+
+ BOOST_CHECK( test_rng.begin() == test.begin() );
+
+ if (reference_it == reference.begin())
+ {
+ BOOST_CHECK( boost::end(test_rng) == test.begin() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL( std::distance(boost::begin(test_rng), boost::end(test_rng)) + 1,
+ std::distance(reference.begin(), reference_it) );
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[found, end)' range
+ template< >
+ struct check_results<return_found_end>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
+ test.begin(), test.end() );
+
+ BOOST_CHECK_EQUAL(
+ std::distance(test.begin(), boost::begin(test_rng)),
+ std::distance(reference.begin(), reference_it));
+
+ BOOST_CHECK( boost::end(test_rng) == test.end() );
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[next(found), end)' range
+ template< >
+ struct check_results<return_next_end>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK( test_rng.end() == test.end() );
+
+ if (reference_it == reference.end())
+ {
+ BOOST_CHECK( test_rng.begin() == test.end() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ boost::next(reference_it), reference.end(),
+ test_rng.begin(), test_rng.end()
+ );
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a 'prior(found), end)' range
+ template< >
+ struct check_results<return_prior_end>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK( test_rng.end() == test.end() );
+
+ if (reference_it == reference.begin())
+ {
+ BOOST_CHECK( test_rng.begin() == test.begin() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ boost::prior(reference_it), reference.end(),
+ test_rng.begin(), test_rng.end()
+ );
+ }
+ }
+ };
+
+ // check the results of an algorithm that returns
+ // a '[begin, end)' range
+ template< >
+ struct check_results<return_begin_end>
+ {
+ template< class Container, class Iterator >
+ static void check(
+ Container& test,
+ Container& reference,
+ iterator_range<Iterator> test_rng,
+ Iterator reference_it
+ )
+ {
+ BOOST_CHECK_EQUAL_COLLECTIONS(
+ reference.begin(), reference.end(),
+ test.begin(), test.end()
+ );
+
+ BOOST_CHECK( test_rng.begin() == test.begin() );
+ BOOST_CHECK( test_rng.end() == test.end() );
+ }
+ };
+
+ // A test driver to exercise a test through all of the range_return
+ // combinations.
+ //
+ // The test driver also contains the code required to check the
+ // return value correctness.
+ //
+ // The TestPolicy needs to implement two functions:
+ //
+ // - perform the boost range version of the algorithm that returns
+ // a range_return<Container,return_type>::type
+ // template<range_return_value return_type, class Container>
+ // BOOST_DEDUCED_TYPENAME range_return<Container,return_type>::type
+ // test(Container& cont);
+ //
+ // - perform the reference std version of the algorithm that
+ // returns the standard iterator result
+ // template<class Container>
+ // BOOST_DEDUCED_TYPENAME range_iterator<Container>::type
+ // reference(Container& cont);
+ class range_return_test_driver
+ {
+ public:
+ template< class Container,
+ class TestPolicy >
+ void operator()(Container& cont, TestPolicy policy)
+ {
+ test_range_iter (cont, policy);
+ test_range<return_found,Container,TestPolicy> ()(cont, policy);
+ test_range<return_next,Container,TestPolicy> ()(cont, policy);
+ test_range<return_prior,Container,TestPolicy> ()(cont, policy);
+ test_range<return_begin_found,Container,TestPolicy>()(cont, policy);
+ test_range<return_begin_next,Container,TestPolicy> ()(cont, policy);
+ test_range<return_begin_prior,Container,TestPolicy>()(cont, policy);
+ test_range<return_found_end,Container,TestPolicy> ()(cont, policy);
+ test_range<return_next_end,Container,TestPolicy> ()(cont, policy);
+ test_range<return_prior_end,Container,TestPolicy> ()(cont, policy);
+ test_range<return_begin_end,Container,TestPolicy> ()(cont, policy);
+ }
+
+ private:
+ template< class Container, class TestPolicy >
+ void test_range_iter(
+ Container& cont,
+ TestPolicy policy
+ )
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+
+ Container reference(cont);
+ Container test(cont);
+
+ iterator_t range_result = policy.test_iter(test);
+ iterator_t reference_it = policy.reference(reference);
+
+ check_results<return_found>::check(test, reference,
+ range_result, reference_it);
+ }
+
+ template< range_return_value result_type, class Container, class TestPolicy >
+ struct test_range
+ {
+ void operator()(Container& cont, TestPolicy policy)
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type iterator_t;
+ typedef BOOST_DEDUCED_TYPENAME range_return<Container, result_type>::type range_return_t;
+ typedef BOOST_DEDUCED_TYPENAME TestPolicy::template test_range<result_type> test_range_t;
+
+ Container reference(cont);
+ Container test_cont(cont);
+
+ range_return_t range_result = test_range_t()(policy, test_cont);
+ iterator_t reference_it = policy.reference(reference);
+
+ check_results<result_type>::check(test_cont, reference,
+ range_result, reference_it);
+ }
+ };
+ };
+ }
+}
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/check_equal_fn.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/check_equal_fn.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,49 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_FUNCTIONS_CHECK_EQUAL_FN_HPP_INCLUDED
+#define BOOST_RANGE_TEST_FUNCTIONS_CHECK_EQUAL_FN_HPP_INCLUDED
+
+#include "counted_function.hpp"
+
+namespace boost
+{
+ namespace range_test_function
+ {
+ template< class Collection >
+ class check_equal_fn : private counted_function
+ {
+ typedef BOOST_DEDUCED_TYPENAME Collection::const_iterator iter_t;
+ public:
+ explicit check_equal_fn( const Collection& c )
+ : m_it(boost::begin(c)), m_last(boost::end(c)) {}
+
+ using counted_function::invocation_count;
+
+ void operator()(int x) const
+ {
+ invoked();
+ BOOST_CHECK( m_it != m_last );
+ if (m_it != m_last)
+ {
+ BOOST_CHECK_EQUAL( *m_it, x );
+ ++m_it;
+ }
+ }
+
+ private:
+ mutable iter_t m_it;
+ iter_t m_last;
+ };
+
+ } // namespace range_test_function
+} // namespace boost
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/counted_function.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/counted_function.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,40 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_FUNCTION_COUNTED_FUNCTION_HPP_INCLUDED
+#define BOOST_RANGE_TEST_FUNCTION_COUNTED_FUNCTION_HPP_INCLUDED
+
+namespace boost
+{
+ namespace range_test_function
+ {
+
+ class counted_function
+ {
+ public:
+ counted_function() : m_count(0u) {}
+
+ void invoked() const
+ {
+ ++m_count;
+ }
+
+ // Return the number of times that this function object
+ // has been invoked.
+ unsigned int invocation_count() const { return m_count; }
+
+ private:
+ mutable unsigned int m_count;
+ };
+
+ }
+}
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/equal_to_x.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/equal_to_x.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,33 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_TEST_FUNCTION_EQUAL_TO_X_HPP_INCLUDED
+#define BOOST_RANGE_TEST_TEST_FUNCTION_EQUAL_TO_X_HPP_INCLUDED
+
+namespace boost
+{
+ namespace range_test_function
+ {
+ template<class Arg>
+ struct equal_to_x
+ {
+ typedef bool result_type;
+ typedef Arg argument_type;
+
+ explicit equal_to_x(Arg x) : m_x(x) {}
+ bool operator()(Arg x) const { return x == m_x; }
+
+ private:
+ Arg m_x;
+ };
+ }
+}
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/false_predicate.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/false_predicate.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,29 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_TEST_FUNCTION_FALSE_PREDICATE_HPP_INCLUDED
+#define BOOST_RANGE_TEST_TEST_FUNCTION_FALSE_PREDICATE_HPP_INCLUDED
+
+namespace boost
+{
+ namespace range_test_function
+ {
+ struct false_predicate
+ {
+ typedef bool result_type;
+
+ bool operator()() const { return false; }
+ template<class Arg> bool operator()(Arg) const { return false; }
+ template<class Arg1, class Arg2> bool operator()(Arg1,Arg2) const { return false; }
+ };
+ }
+}
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/greater_than_x.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/greater_than_x.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_FUNCTION_GREATER_THAN_X_HPP_INCLUDED
+#define BOOST_RANGE_TEST_FUNCTION_GREATER_THAN_X_HPP_INCLUDED
+
+namespace boost
+{
+ namespace range_test_function
+ {
+ template< class Number >
+ struct greater_than_x
+ {
+ typedef bool result_type;
+ typedef Number argument_type;
+
+ explicit greater_than_x(Number x) : m_x(x) {}
+ bool operator()(Number x) const { return x > m_x; }
+ private:
+ Number m_x;
+ };
+ } // namespace range_test_function
+} // namespace boost
+
+#endif // include guard

Added: trunk/libs/range/test/test_function/multiply_by_x.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/range/test/test_function/multiply_by_x.hpp 2010-03-28 12:08:35 EDT (Sun, 28 Mar 2010)
@@ -0,0 +1,32 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_TEST_TEST_FUNCTION_MULTIPLY_BY_X_HPP_INCLUDED
+#define BOOST_RANGE_TEST_TEST_FUNCTION_MULTIPLY_BY_X_HPP_INCLUDED
+
+namespace boost
+{
+ namespace range_test_function
+ {
+ template< class Arg >
+ struct multiply_by_x
+ {
+ typedef Arg result_type;
+ typedef Arg argument_type;
+
+ explicit multiply_by_x(Arg x) : m_x(x) {}
+ Arg operator()(Arg x) const { return x * m_x; }
+ private:
+ Arg m_x;
+ };
+ }
+}
+
+#endif // include guard


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk