diff --git a/doc/concepts.qbk b/doc/concepts.qbk index 773ef9d..f379e18 100644 --- a/doc/concepts.qbk +++ b/doc/concepts.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:concepts Range Concepts] [section Overview] @@ -246,6 +251,5 @@ __iterator_concepts__ __concept_check__ [endsect] - [endsect] diff --git a/doc/examples.qbk b/doc/examples.qbk index bea16e2..1dfb924 100644 --- a/doc/examples.qbk +++ b/doc/examples.qbk @@ -1,4 +1,9 @@ -[section Examples] +[/ + Copyright 2010 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) +/] +[section:examples Examples] Some examples are given in the accompanying test files: diff --git a/doc/faq.qbk b/doc/faq.qbk index f01ffe8..ada6361 100644 --- a/doc/faq.qbk +++ b/doc/faq.qbk @@ -1,4 +1,9 @@ -[section FAQ] +[/ + Copyright 2010 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) +/] +[section:faq FAQ] 1. ['[*Why is there no difference between `range_iterator::type` and `range_const_iterator::type` for `std::pair`?]] diff --git a/doc/headers.qbk b/doc/headers.qbk index 0013853..0012c6a 100644 --- a/doc/headers.qbk +++ b/doc/headers.qbk @@ -1,6 +1,11 @@ -[section Library Headers] +[/ + Copyright 2010 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) +/] +[section:headers Library Headers] -[section General] +[section:general General] [table [[Header ] [Includes ] [Related Concept ]] [[`` ] [everything from Boost.Range version 1 (Boost versions 1.42 and below). Includes the core range functions and metafunctinos, but excludes Range Adaptors and Range Algorithms. ] [- ]] @@ -34,7 +39,7 @@ ] [endsect] -[section Adaptors] +[section:adaptors Adaptors] [table [[Header ][Includes ]] [[``] [__range_adaptors_adjacent_filtered__ ]] @@ -54,7 +59,7 @@ ] [endsect] -[section Algorithm] +[section:algorithm Algorithm] [table [[Header ][Includes ]] [[``] [__range_algorithms_adjacent_find__]] @@ -119,7 +124,7 @@ ] [endsect] -[section Algorithm Extensions] +[section:algorithm_ext Algorithm Extensions] [table [[Header ][Includes ]] [[``] [__range_algorithm_ext_copy_n__]] diff --git a/doc/history_ack.qbk b/doc/history_ack.qbk index 73ce9e8..f8c39e4 100644 --- a/doc/history_ack.qbk +++ b/doc/history_ack.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:history_ack History and Acknowledgement] [heading Version 1 - before Boost 1.43] @@ -51,4 +56,3 @@ Regardless of how I write this section it will never truly fairly capture the gratitude that I feel to all who have contributed. Thank you everyone. [endsect] - diff --git a/doc/html/index.html b/doc/html/index.html index cf6338e..8b74c06 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@
-

+

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)

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

Table of Contents

Introduction
-
Range Concepts
+
Range Concepts
Overview
Single Pass Range
@@ -49,87 +49,88 @@
Random Access Range
Concept Checking
-
Reference
+
Reference
Overview
-
Range concept +
Range concept implementation
Synopsis
Semantics
-
Range Adaptors
+
Range Adaptors
-
Introduction +
Introduction and motivation
-
General +
General Requirements
-
Reference
+
Reference
-
Range Algorithm
+
Range Algorithms
-
- Introduction and motivation
-
Mutating algorithms
-
Non-mutating +
Introduction + and motivation
+
Mutating algorithms
+
Non-mutating algorithms
-
Set algorithms
-
Heap algorithms
-
Permutation +
Set algorithms
+
Heap algorithms
+
Permutation algorithms
-
New algorithms
-
Numeric algorithms
+
New algorithms
+
Numeric algorithms
-
Provided Ranges
+
Provided Ranges
-
counting_range
-
istream_range
-
irange
+
counting_range
+
istream_range
+
irange
-
Utilities
+
Utilities
-
Class iterator_range
-
Class sub_range
-
Function join
+
Class iterator_range
+
Class sub_range
+
Function join
-
Extending the library
+
Extending the library
-
Method 1: provide +
Method 1: provide member functions and nested types
-
Method 2: provide +
Method 2: provide free-standing functions and specialize metafunctions
-
Method 3: provide +
Method 3: provide range adaptor implementations
-
Terminology and style guidelines
-
Library Headers
+
Terminology and style guidelines
+
Library Headers
-
General
-
Adaptors
-
Algorithm
-
Algorithm - Extensions
+
General
+
Adaptors
+
Algorithm
+
Algorithm Extensions
Examples
-
MFC/ATL (courtesy of Shunsuke Sogame)
+
MFC/ATL (courtesy of Shunsuke Sogame)
-
Requirements
-
MFC Ranges
-
ATL Ranges
-
const Ranges
-
References
+
Requirements
+
MFC Ranges
+
ATL Ranges
+
const Ranges
+
References
-
Upgrade version of Boost.Range
+
Upgrade version of Boost.Range
-
Upgrade from version +
Upgrade from version + 1.45
+
Upgrade from version 1.42
-
Upgrade from version +
Upgrade from version 1.34
Portability
FAQ
-
History and Acknowledgement
+
History and Acknowledgement

@@ -142,7 +143,7 @@

- +

Last revised: July 22, 2010 at 23:20:42 GMT

Last revised: December 23, 2010 at 17:58:25 GMT


diff --git a/doc/html/quickbook_HTML.manifest b/doc/html/quickbook_HTML.manifest index 7c5d13a..b12e40e 100644 --- a/doc/html/quickbook_HTML.manifest +++ b/doc/html/quickbook_HTML.manifest @@ -34,7 +34,7 @@ range/reference/adaptors/reference/tokenized.html range/reference/adaptors/reference/transformed.html range/reference/adaptors/reference/uniqued.html range/reference/algorithms.html -range/reference/algorithms/range_algorithm_introduction.html +range/reference/algorithms/introduction.html range/reference/algorithms/mutating.html range/reference/algorithms/mutating/copy.html range/reference/algorithms/mutating/copy_backward.html @@ -132,11 +132,11 @@ 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/style_guide.html -range/library_headers.html -range/library_headers/general.html -range/library_headers/adaptors.html -range/library_headers/algorithm.html -range/library_headers/algorithm_extensions.html +range/headers.html +range/headers/general.html +range/headers/adaptors.html +range/headers/algorithm.html +range/headers/algorithm_ext.html range/examples.html range/mfc_atl.html range/mfc_atl/requirements.html @@ -145,6 +145,7 @@ 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_45.html range/upgrade/upgrade_from_1_42.html range/upgrade/upgrade_from_1_34.html range/portability.html diff --git a/doc/html/range/concepts.html b/doc/html/range/concepts.html index b071de6..c3c92a8 100644 --- a/doc/html/range/concepts.html +++ b/doc/html/range/concepts.html @@ -24,7 +24,7 @@
Overview
diff --git a/doc/html/range/concepts/bidirectional_range.html b/doc/html/range/concepts/bidirectional_range.html index a75fbab..ba06db0 100644 --- a/doc/html/range/concepts/bidirectional_range.html +++ b/doc/html/range/concepts/bidirectional_range.html @@ -27,7 +27,7 @@ Bidirectional Range
- + Notation
@@ -65,7 +65,7 @@
- + Description

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

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

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

- + Invariants
@@ -272,7 +272,7 @@
- + See also

diff --git a/doc/html/range/concepts/concept_checking.html b/doc/html/range/concepts/concept_checking.html index ec75e36..db21dbb 100644 --- a/doc/html/range/concepts/concept_checking.html +++ b/doc/html/range/concepts/concept_checking.html @@ -79,7 +79,7 @@

- + See also

diff --git a/doc/html/range/concepts/forward_range.html b/doc/html/range/concepts/forward_range.html index c74fdef..95b7dac 100644 --- a/doc/html/range/concepts/forward_range.html +++ b/doc/html/range/concepts/forward_range.html @@ -27,7 +27,7 @@ Forward Range

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

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

- + Refinement of

Single Pass Range

- + Associated types
@@ -132,7 +132,7 @@
- + See also

diff --git a/doc/html/range/concepts/random_access_range.html b/doc/html/range/concepts/random_access_range.html index 0f0830b..fa49539 100644 --- a/doc/html/range/concepts/random_access_range.html +++ b/doc/html/range/concepts/random_access_range.html @@ -27,7 +27,7 @@ Random Access Range

- + Description

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

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

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

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

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

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

- + Invariants
@@ -316,7 +316,7 @@
- + See also

diff --git a/doc/html/range/examples.html b/doc/html/range/examples.html index 14aad79..5a4201b 100644 --- a/doc/html/range/examples.html +++ b/doc/html/range/examples.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@


-PrevUpHomeNext +PrevUpHomeNext

@@ -68,7 +68,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/range/headers.html b/doc/html/range/headers.html new file mode 100644 index 0000000..b4ce7e3 --- /dev/null +++ b/doc/html/range/headers.html @@ -0,0 +1,49 @@ + + + +Library Headers + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+ + + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/headers/adaptors.html b/doc/html/range/headers/adaptors.html new file mode 100644 index 0000000..1d2952e --- /dev/null +++ b/doc/html/range/headers/adaptors.html @@ -0,0 +1,232 @@ + + + +Adaptors + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

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

+
+

+ adjacent_filtered +

+
+

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

+
+

+ copied +

+
+

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

+
+

+ filtered +

+
+

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

+
+

+ indexed +

+
+

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

+
+

+ indirected +

+
+

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

+
+

+ map_keys + map_values +

+
+

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

+
+

+ replaced +

+
+

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

+
+

+ replaced_if +

+
+

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

+
+

+ reversed +

+
+

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

+
+

+ sliced +

+
+

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

+
+

+ strided +

+
+

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

+
+

+ tokenized +

+
+

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

+
+

+ transformed +

+
+

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

+
+

+ uniqued +

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

+ Header +

+
+

+ Includes +

+
+

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

+
+

+ adjacent_find +

+
+

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

+
+

+ binary_search +

+
+

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

+
+

+ copy +

+
+

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

+
+

+ copy_backward +

+
+

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

+
+

+ count +

+
+

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

+
+

+ count_if +

+
+

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

+
+

+ equal +

+
+

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

+
+

+ equal_range +

+
+

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

+
+

+ fill +

+
+

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

+
+

+ fill_n +

+
+

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

+
+

+ find +

+
+

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

+
+

+ find_end +

+
+

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

+
+

+ find_first_of +

+
+

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

+
+

+ find_if +

+
+

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

+
+

+ for_each +

+
+

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

+
+

+ generate +

+
+

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

+
+

+ push_heap + pop_heap + make_heap + sort_heap +

+
+

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

+
+

+ inplace_merge +

+
+

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

+
+

+ lexicographical_compare +

+
+

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

+
+

+ lower_bound +

+
+

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

+
+

+ max_element +

+
+

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

+
+

+ merge +

+
+

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

+
+

+ min_element +

+
+

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

+
+

+ mismatch +

+
+

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

+
+

+ nth_element +

+
+

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

+
+

+ partial_sort +

+
+

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

+
+

+ partition +

+
+

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

+
+

+ next_permutation + prev_permutation +

+
+

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

+
+

+ random_shuffle +

+
+

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

+
+

+ remove +

+
+

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

+
+

+ remove_copy +

+
+

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

+
+

+ remove_copy_if +

+
+

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

+
+

+ remove_if +

+
+

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

+
+

+ replace +

+
+

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

+
+

+ replace_copy +

+
+

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

+
+

+ replace_copy_if +

+
+

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

+
+

+ replace_if +

+
+

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

+
+

+ reverse +

+
+

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

+
+

+ reverse_copy +

+
+

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

+
+

+ rotate +

+
+

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

+
+

+ rotate_copy +

+
+

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

+
+

+ search +

+
+

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

+
+

+ search_n +

+
+

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

+
+

+ includes + set_union + set_intersection + set_difference + set_symmetric_difference +

+
+

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

+
+

+ sort +

+
+

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

+
+

+ stable_partition +

+
+

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

+
+

+ swap_ranges +

+
+

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

+
+

+ transform +

+
+

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

+
+

+ unique +

+
+

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

+
+

+ unique_copy +

+
+

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

+
+

+ upper_bound +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/headers/algorithm_ext.html b/doc/html/range/headers/algorithm_ext.html new file mode 100644 index 0000000..4a62339 --- /dev/null +++ b/doc/html/range/headers/algorithm_ext.html @@ -0,0 +1,171 @@ + + + +Algorithm Extensions + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Header +

+
+

+ Includes +

+
+

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

+
+

+ copy_n +

+
+

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

+
+

+ erase +

+
+

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

+
+

+ for_each +

+
+

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

+
+

+ insert +

+
+

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

+
+

+ iota +

+
+

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

+
+

+ is_sorted +

+
+

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

+
+

+ overwrite +

+
+

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

+
+

+ push_back +

+
+

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

+
+

+ push_front +

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

+ Header +

+
+

+ Includes +

+
+

+ Related Concept +

+
+

+ <boost/range.hpp> +

+
+

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

+
+

+ - +

+
+

+ <boost/range/metafunctions.hpp> +

+
+

+ every metafunction +

+
+

+ - +

+
+

+ <boost/range/functions.hpp> +

+
+

+ every function +

+
+

+ - +

+
+

+ <boost/range/value_type.hpp> +

+
+

+ range_value +

+
+

+ Single Pass Range +

+
+

+ <boost/range/iterator.hpp> +

+
+

+ range_iterator +

+
+

+ Single Pass Range +

+
+

+ <boost/range/difference_type.hpp> +

+
+

+ range_difference +

+
+

+ Forward Range +

+
+

+ <boost/range/pointer.hpp> +

+
+

+ range_pointer +

+
+

+ - +

+
+

+ <boost/range/category.hpp> +

+
+

+ range_category +

+
+

+ - +

+
+

+ <boost/range/reverse_iterator.hpp> +

+
+

+ range_reverse_iterator +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/begin.hpp> +

+
+

+ begin and const_begin +

+
+

+ Single Pass Range +

+
+

+ <boost/range/end.hpp> +

+
+

+ end and const_end +

+
+

+ Single Pass Range +

+
+

+ <boost/range/empty.hpp> +

+
+

+ empty +

+
+

+ Single Pass Range +

+
+

+ <boost/range/distance.hpp> +

+
+

+ distance +

+
+

+ Forward Range +

+
+

+ <boost/range/size.hpp> +

+
+

+ size +

+
+

+ Random Access + Range +

+
+

+ <boost/range/rbegin.hpp> +

+
+

+ rbegin and const_rbegin +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/rend.hpp> +

+
+

+ rend and const_rend +

+
+

+ Bidirectional + Range +

+
+

+ <boost/range/as_array.hpp> +

+
+

+ as_array +

+
+

+ - +

+
+

+ <boost/range/as_literal.hpp> +

+
+

+ as_literal +

+
+

+ - +

+
+

+ <boost/range/iterator_range.hpp> +

+
+

+ iterator_range +

+
+

+ - +

+
+

+ <boost/range/sub_range.hpp> +

+
+

+ sub_range +

+
+

+ - +

+
+

+ <boost/range/concepts.hpp> +

+
+

+ Range concepts +

+
+

+ - +

+
+

+ <boost/range/adaptors.hpp> +

+
+

+ every range adaptor +

+
+

+ - +

+
+

+ <boost/range/algorithm.hpp> +

+
+

+ every range equivalent of an STL algorithm +

+
+

+ - +

+
+

+ <boost/range/algorithm_ext.hpp> +

+
+

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

+
+

+ - +

+
+

+ <boost/range/counting_range.hpp> +

+
+

+ counting_range +

+
+

+ - +

+
+

+ <boost/range/istream_range.hpp> +

+
+

+ istream_range +

+
+

+ - +

+
+

+ <boost/range/irange.hpp> +

+
+

+ irange +

+
+

+ - +

+
+

+ <boost/range/join.hpp> +

+
+

+ join +

+
+

+ - +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/range/history_ack.html b/doc/html/range/history_ack.html index d64b6e1..8c99a63 100644 --- a/doc/html/range/history_ack.html +++ b/doc/html/range/history_ack.html @@ -23,10 +23,10 @@

- + Version 1 - before Boost 1.43

@@ -79,7 +79,7 @@ The concept checks and their documentation was provided by Daniel Walker.

- + Version 2 - Boost 1.43 and beyond

diff --git a/doc/html/range/introduction.html b/doc/html/range/introduction.html index b0ce921..07af796 100644 --- a/doc/html/range/introduction.html +++ b/doc/html/range/introduction.html @@ -70,7 +70,7 @@

- + Example - Iterate over the values in a map

@@ -84,7 +84,7 @@

- + Example - Iterate over the keys in a map

@@ -98,7 +98,7 @@

- + Example - Push the even values from a map in reverse order into the container target

diff --git a/doc/html/range/mfc_atl.html b/doc/html/range/mfc_atl.html index 9c2d65e..91938cc 100644 --- a/doc/html/range/mfc_atl.html +++ b/doc/html/range/mfc_atl.html @@ -24,17 +24,17 @@
- + Overview

diff --git a/doc/html/range/mfc_atl/atl_ranges.html b/doc/html/range/mfc_atl/atl_ranges.html index 6c96f33..aec5af5 100644 --- a/doc/html/range/mfc_atl/atl_ranges.html +++ b/doc/html/range/mfc_atl/atl_ranges.html @@ -24,7 +24,7 @@

If the <boost/range/atl.hpp> diff --git a/doc/html/range/mfc_atl/const_ranges.html b/doc/html/range/mfc_atl/const_ranges.html index cf41223..d833d83 100644 --- a/doc/html/range/mfc_atl/const_ranges.html +++ b/doc/html/range/mfc_atl/const_ranges.html @@ -24,7 +24,7 @@

range_reference<const Range>::type diff --git a/doc/html/range/mfc_atl/mfc_ranges.html b/doc/html/range/mfc_atl/mfc_ranges.html index 57655a2..a757cf5 100644 --- a/doc/html/range/mfc_atl/mfc_ranges.html +++ b/doc/html/range/mfc_atl/mfc_ranges.html @@ -24,7 +24,7 @@

If the <boost/range/mfc.hpp> diff --git a/doc/html/range/mfc_atl/references.html b/doc/html/range/mfc_atl/references.html index 1d0a7a4..a09ba0a 100644 --- a/doc/html/range/mfc_atl/references.html +++ b/doc/html/range/mfc_atl/references.html @@ -24,7 +24,7 @@

  1. diff --git a/doc/html/range/mfc_atl/requirements.html b/doc/html/range/mfc_atl/requirements.html index 8c0a80a..f171d85 100644 --- a/doc/html/range/mfc_atl/requirements.html +++ b/doc/html/range/mfc_atl/requirements.html @@ -24,7 +24,7 @@
  • diff --git a/doc/html/range/portability.html b/doc/html/range/portability.html index e2afd81..8f24282 100644 --- a/doc/html/range/portability.html +++ b/doc/html/range/portability.html @@ -62,17 +62,19 @@ rvalue problems,
  • +

    do not rely on ADL: -

      +

      +
      • - if you overload functions, include that header before the headers - in this library, -
      • + if you overload functions, include that header before the headers in + this library, +
      • - put all overloads in namespace boost. -
      • + put all overloads in namespace boost. +
      - +
diff --git a/doc/html/range/reference.html b/doc/html/range/reference.html index 9b31bb4..f8246fb 100644 --- a/doc/html/range/reference.html +++ b/doc/html/range/reference.html @@ -24,57 +24,57 @@
diff --git a/doc/html/range/reference/adaptors/general_requirements.html b/doc/html/range/reference/adaptors/general_requirements.html index 83d19c0..8078038 100644 --- a/doc/html/range/reference/adaptors/general_requirements.html +++ b/doc/html/range/reference/adaptors/general_requirements.html @@ -24,7 +24,7 @@

diff --git a/doc/html/range/reference/adaptors/introduction.html b/doc/html/range/reference/adaptors/introduction.html index a049b13..d3e606b 100644 --- a/doc/html/range/reference/adaptors/introduction.html +++ b/doc/html/range/reference/adaptors/introduction.html @@ -24,7 +24,7 @@

@@ -122,7 +122,7 @@ situations, you will really appreciate the succinctness of operator|().

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

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

- + Range Adaptor alternative to count_if algorithm
diff --git a/doc/html/range/reference/adaptors/reference.html b/doc/html/range/reference/adaptors/reference.html index b026090..dffb6fe 100644 --- a/doc/html/range/reference/adaptors/reference.html +++ b/doc/html/range/reference/adaptors/reference.html @@ -24,27 +24,24 @@
diff --git a/doc/html/range/reference/adaptors/reference/adjacent_filtered.html b/doc/html/range/reference/adaptors/reference/adjacent_filtered.html index 31128ea..cce2471 100644 --- a/doc/html/range/reference/adaptors/reference/adjacent_filtered.html +++ b/doc/html/range/reference/adaptors/reference/adjacent_filtered.html @@ -24,11 +24,10 @@
@@ -94,6 +93,9 @@ Range Category:Single Pass Range +
  • + Return Type: boost::adjacent_filtered_range<typeof(rng)> +
  • Returned Range Category: The minimum of the range category of rng @@ -102,8 +104,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/copied.html b/doc/html/range/reference/adaptors/reference/copied.html index b690eba..5007999 100644 --- a/doc/html/range/reference/adaptors/reference/copied.html +++ b/doc/html/range/reference/adaptors/reference/copied.html @@ -24,10 +24,10 @@

  • @@ -101,8 +101,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/filtered.html b/doc/html/range/reference/adaptors/reference/filtered.html index 1d21ce0..6fe2ce1 100644 --- a/doc/html/range/reference/adaptors/reference/filtered.html +++ b/doc/html/range/reference/adaptors/reference/filtered.html @@ -24,10 +24,10 @@

    @@ -92,6 +92,9 @@ Range Category:Forward Range +
  • + Range Return Type: boost::filtered_range<typeof(rng)> +
  • Returned Range Category: The minimum of the range category of rng @@ -101,8 +104,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/indexed.html b/doc/html/range/reference/adaptors/reference/indexed.html index 45bcbef..1d29887 100644 --- a/doc/html/range/reference/adaptors/reference/indexed.html +++ b/doc/html/range/reference/adaptors/reference/indexed.html @@ -24,10 +24,10 @@

  • @@ -86,6 +86,9 @@ Range Category:Single Pass Range +
  • + Range Return Type: boost::indexed_range<typeof(rng)> +
  • Returned Range Category: The range category of rng @@ -93,8 +96,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/indirected.html b/doc/html/range/reference/adaptors/reference/indirected.html index 7360891..e990d1e 100644 --- a/doc/html/range/reference/adaptors/reference/indirected.html +++ b/doc/html/range/reference/adaptors/reference/indirected.html @@ -24,10 +24,10 @@

  • @@ -90,6 +90,9 @@ Range Category:Single Pass Range +
  • + Range Return Type: boost::indirected_range<typeof(rng)> +
  • Returned Range Category: The range category of rng @@ -97,8 +100,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/map_keys.html b/doc/html/range/reference/adaptors/reference/map_keys.html index 3b8e621..3120f2f 100644 --- a/doc/html/range/reference/adaptors/reference/map_keys.html +++ b/doc/html/range/reference/adaptors/reference/map_keys.html @@ -24,10 +24,10 @@

  • @@ -89,6 +89,9 @@ Range Category:Single Pass Range +
  • + Range Return Type: boost::select_first_range<typeof(rng)> +
  • Returned Range Category: The range category of rng. @@ -96,8 +99,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/map_values.html b/doc/html/range/reference/adaptors/reference/map_values.html index c55f9ae..30ff247 100644 --- a/doc/html/range/reference/adaptors/reference/map_values.html +++ b/doc/html/range/reference/adaptors/reference/map_values.html @@ -24,10 +24,10 @@

  • @@ -89,6 +89,11 @@ Range Category:Single Pass Range +
  • + Range Return Type: for constant + ranges, boost::select_second_const<typeof(rng)> + otherwise boost:select_second_mutable<typeof(rng)> +
  • Returned Range Category: The range category of rng. @@ -96,8 +101,8 @@

    diff --git a/doc/html/range/reference/adaptors/reference/replaced.html b/doc/html/range/reference/adaptors/reference/replaced.html index da45959..398258c 100644 --- a/doc/html/range/reference/adaptors/reference/replaced.html +++ b/doc/html/range/reference/adaptors/reference/replaced.html @@ -24,10 +24,10 @@

  • @@ -78,20 +78,22 @@
    • +

      Precondition: -

        +

        +
        • - new_value is - convertible to the value_type - of the range. -
        • + new_value is + convertible to the value_type + of the range. +
        • - old_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 @@ -107,6 +109,9 @@ Range Category: Forward Range
      • +
      • + Range Return Type: boost::replaced_range<typeof(rng)> +
      • Returned Range Category: The range category of rng. @@ -114,8 +119,8 @@

      diff --git a/doc/html/range/reference/adaptors/reference/replaced_if.html b/doc/html/range/reference/adaptors/reference/replaced_if.html index b3b77e3..e259a84 100644 --- a/doc/html/range/reference/adaptors/reference/replaced_if.html +++ b/doc/html/range/reference/adaptors/reference/replaced_if.html @@ -24,11 +24,10 @@

      - +
      @@ -79,19 +78,21 @@
      • +

        Precondition: -

          +

          +
          • - The range value_type - is convertible to the argument type of pred. -
          • + The range value_type + is convertible to the argument type of pred. +
          • - new_value is - convertible to the value_type - of the range. -
          • + new_value is + convertible to the value_type + of the range. +
          - +
        • Postconditions: For all elements x in the returned @@ -104,6 +105,9 @@ Range Category: Forward Range
        • +
        • + Range Return Type: boost::replaced_if_range<typeof(rng)> +
        • Returned Range Category: The range category of rng. @@ -111,8 +115,8 @@

        diff --git a/doc/html/range/reference/adaptors/reference/reversed.html b/doc/html/range/reference/adaptors/reference/reversed.html index 2b192f9..efdf11f 100644 --- a/doc/html/range/reference/adaptors/reference/reversed.html +++ b/doc/html/range/reference/adaptors/reference/reversed.html @@ -24,10 +24,10 @@

        - +
        @@ -82,6 +82,9 @@ Range Category:Bidirectional Range +
      • + Range Return Type: boost::reversed_range<typeof(rng)> +
      • Returned Range Category: The range category of rng. @@ -89,8 +92,8 @@

        diff --git a/doc/html/range/reference/adaptors/reference/sliced.html b/doc/html/range/reference/adaptors/reference/sliced.html index c0dfed0..ea0b736 100644 --- a/doc/html/range/reference/adaptors/reference/sliced.html +++ b/doc/html/range/reference/adaptors/reference/sliced.html @@ -24,10 +24,10 @@

      • @@ -92,6 +92,9 @@ Range Category:Random Access Range +
      • + Range Return Type: boost::sliced_range<typeof(rng)> +
      • Returned Range Category: Random Access Range @@ -99,8 +102,8 @@

        diff --git a/doc/html/range/reference/adaptors/reference/strided.html b/doc/html/range/reference/adaptors/reference/strided.html index 2cbb302..e79f8cf 100644 --- a/doc/html/range/reference/adaptors/reference/strided.html +++ b/doc/html/range/reference/adaptors/reference/strided.html @@ -24,10 +24,10 @@

      • @@ -77,27 +77,27 @@
        • Precondition: 0 - <= n - && n - < distance(rng) + <= n + and boost::size(rng) + is a valid expression.
        • Returns: A new range based on rng where traversal is performed in steps of n.
        • - Range Category: Random - Access Range + Range Category: Single + Pass Range
        • - Returned Range Category: Random - Access Range + Returned Range Category: The range + category of rng.

        diff --git a/doc/html/range/reference/adaptors/reference/tokenized.html b/doc/html/range/reference/adaptors/reference/tokenized.html index 66e5cd7..242fbc2 100644 --- a/doc/html/range/reference/adaptors/reference/tokenized.html +++ b/doc/html/range/reference/adaptors/reference/tokenized.html @@ -24,7 +24,7 @@

        @@ -88,30 +88,32 @@
        • +

          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. -
            • + 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. -
            • + i has the type + int. +
            • - the value_type - of rndRng is - int. -
            • + the value_type + of rndRng is + int. +
            • - flags has the - type regex_constants::syntax_option_type. -
            • + 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 @@ -128,6 +130,9 @@ Range Category: Random Access Range
          • +
          • + Range Return Type: boost::tokenized_range<typeof(rng)> +
          • Returned Range Category: Random Access Range diff --git a/doc/html/range/reference/adaptors/reference/transformed.html b/doc/html/range/reference/adaptors/reference/transformed.html index 9631986..97200e9 100644 --- a/doc/html/range/reference/adaptors/reference/transformed.html +++ b/doc/html/range/reference/adaptors/reference/transformed.html @@ -24,11 +24,10 @@
          - +
          @@ -96,6 +95,9 @@ Range Category:Single Pass Range +
        • + Range Return Type: boost::transformed_range<typeof(rng)> +
        • Returned Range Category: The range category of rng. @@ -103,8 +105,8 @@

          diff --git a/doc/html/range/reference/adaptors/reference/uniqued.html b/doc/html/range/reference/adaptors/reference/uniqued.html index 6ab4c59..4174cf8 100644 --- a/doc/html/range/reference/adaptors/reference/uniqued.html +++ b/doc/html/range/reference/adaptors/reference/uniqued.html @@ -7,7 +7,7 @@ - +

        • @@ -24,10 +24,10 @@
          @@ -86,6 +86,9 @@ Range Category:Forward Range +
        • + Range Return Type: boost::uniqued_range<typeof(rng)> +
        • Returned Range Category: The minimum of the range concept of rng @@ -94,8 +97,8 @@

          diff --git a/doc/html/range/reference/algorithms.html b/doc/html/range/reference/algorithms.html index 0bc9f39..bd65e72 100644 --- a/doc/html/range/reference/algorithms.html +++ b/doc/html/range/reference/algorithms.html @@ -1,13 +1,13 @@ -Range Algorithm +Range Algorithms - +

        • @@ -20,24 +20,24 @@

          -PrevUpHomeNext +PrevUpHomeNext
          @@ -50,7 +50,7 @@

          -PrevUpHomeNext +PrevUpHomeNext
          diff --git a/doc/html/range/reference/algorithms/heap.html b/doc/html/range/reference/algorithms/heap.html index 045ea7b..66d79ce 100644 --- a/doc/html/range/reference/algorithms/heap.html +++ b/doc/html/range/reference/algorithms/heap.html @@ -5,7 +5,7 @@ - + @@ -24,13 +24,13 @@
          diff --git a/doc/html/range/reference/algorithms/heap/make_heap.html b/doc/html/range/reference/algorithms/heap/make_heap.html index d241d0f..a7a201c 100644 --- a/doc/html/range/reference/algorithms/heap/make_heap.html +++ b/doc/html/range/reference/algorithms/heap/make_heap.html @@ -24,10 +24,10 @@
          - + Prototype

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

          - + Description

          @@ -60,14 +60,14 @@ the predicate versions.

          - + Definition

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

          - + Requirements

          @@ -118,7 +118,7 @@

          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/heap/pop_heap.html b/doc/html/range/reference/algorithms/heap/pop_heap.html index 0fc429c..4926fa5 100644 --- a/doc/html/range/reference/algorithms/heap/pop_heap.html +++ b/doc/html/range/reference/algorithms/heap/pop_heap.html @@ -24,10 +24,10 @@

          - + Prototype

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

          - + Description

          @@ -62,14 +62,14 @@ the predicate versions.

          - + Definition

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

          - + Requirements

          @@ -120,7 +120,7 @@

          - + Precondition:
            @@ -132,7 +132,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/heap/push_heap.html b/doc/html/range/reference/algorithms/heap/push_heap.html index 7b304da..976aece 100644 --- a/doc/html/range/reference/algorithms/heap/push_heap.html +++ b/doc/html/range/reference/algorithms/heap/push_heap.html @@ -24,10 +24,10 @@

          - + Prototype

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

          - + Description

          @@ -62,14 +62,14 @@ the predicate versions.

          - + Definition

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

          - + Requirements

          @@ -120,7 +120,7 @@

          - + Precondition:
            @@ -132,7 +132,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/heap/sort_heap.html b/doc/html/range/reference/algorithms/heap/sort_heap.html index 36ac8dc..4366d76 100644 --- a/doc/html/range/reference/algorithms/heap/sort_heap.html +++ b/doc/html/range/reference/algorithms/heap/sort_heap.html @@ -24,10 +24,10 @@

          - + Prototype

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

          - + Description

          @@ -61,14 +61,14 @@ the predicate versions.

          - + Definition

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

          - + Requirements

          @@ -119,14 +119,14 @@

          - + Precondition:

          rng is a heap.

          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/introduction.html b/doc/html/range/reference/algorithms/introduction.html new file mode 100644 index 0000000..708e794 --- /dev/null +++ b/doc/html/range/reference/algorithms/introduction.html @@ -0,0 +1,257 @@ + + + +Introduction and motivation + + + + + + + + +

          + + + + + + +
          Boost C++ LibrariesHomeLibrariesPeopleFAQMore
          +
          +
          +PrevUpHomeNext +
          +
          + +

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

          +

          + +

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

          +

          +

          + instead of +

          +

          + +

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

          +

          +

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

          +

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

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

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

          +

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

          +

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

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

          +

          +

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

          +
          ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +

          + Expression +

          +
          +

          + Return +

          +
          +

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

          +
          +

          + returns a single iterator like std::unique +

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

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

          +
          +

          + returns the entire original range. +

          +
          +

          + This functionality has the following advantages: +

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

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

          +

          + +

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

          +

          +

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

          +

          + +

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

          +

          +

          + The same task may be accomplished simply with +

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

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

          +
          + + + +
          +
          +
          +PrevUpHomeNext +
          + + diff --git a/doc/html/range/reference/algorithms/mutating.html b/doc/html/range/reference/algorithms/mutating.html index 7a7d945..ad51a61 100644 --- a/doc/html/range/reference/algorithms/mutating.html +++ b/doc/html/range/reference/algorithms/mutating.html @@ -5,8 +5,8 @@ - - + + @@ -20,59 +20,43 @@
          -PrevUpHomeNext +PrevUpHomeNext
          @@ -85,7 +69,7 @@

          -PrevUpHomeNext +PrevUpHomeNext
          diff --git a/doc/html/range/reference/algorithms/mutating/copy.html b/doc/html/range/reference/algorithms/mutating/copy.html index 8aabe6a..bfa49dc 100644 --- a/doc/html/range/reference/algorithms/mutating/copy.html +++ b/doc/html/range/reference/algorithms/mutating/copy.html @@ -24,10 +24,10 @@
          - + Prototype

          @@ -39,7 +39,7 @@

          - + Description

          @@ -50,14 +50,14 @@ distance(source_rng)

          - + Definition

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

          - + Requirements
            @@ -78,7 +78,7 @@
          - + Precondition:
            @@ -92,7 +92,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/mutating/copy_backward.html b/doc/html/range/reference/algorithms/mutating/copy_backward.html index 6450b6a..2c79bf9 100644 --- a/doc/html/range/reference/algorithms/mutating/copy_backward.html +++ b/doc/html/range/reference/algorithms/mutating/copy_backward.html @@ -24,11 +24,10 @@

          - + Prototype

          @@ -42,7 +41,7 @@

          - + Description

          @@ -60,14 +59,14 @@ denotes the end of the output sequence.

          - + Definition

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

          - + Requirements
            @@ -88,7 +87,7 @@
          - + Precondition:
            @@ -102,7 +101,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/mutating/fill.html b/doc/html/range/reference/algorithms/mutating/fill.html index f3130ae..77c78c6 100644 --- a/doc/html/range/reference/algorithms/mutating/fill.html +++ b/doc/html/range/reference/algorithms/mutating/fill.html @@ -24,10 +24,10 @@

          - + Prototype

          @@ -39,7 +39,7 @@

          - + Description

          @@ -48,14 +48,14 @@ in the range rng.

          - + Definition

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

          - + Requirements
            @@ -78,7 +78,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/mutating/fill_n.html b/doc/html/range/reference/algorithms/mutating/fill_n.html index 50abf67..5a7fb40 100644 --- a/doc/html/range/reference/algorithms/mutating/fill_n.html +++ b/doc/html/range/reference/algorithms/mutating/fill_n.html @@ -24,10 +24,10 @@

          - + Prototype

          @@ -39,7 +39,7 @@

          - + Description

          @@ -47,14 +47,14 @@ val to n elements in the range rng begining with boost::begin(rng).

          - + Definition

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

          - + Requirements
            @@ -77,7 +77,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/mutating/generate.html b/doc/html/range/reference/algorithms/mutating/generate.html index b53a312..d28c8ca 100644 --- a/doc/html/range/reference/algorithms/mutating/generate.html +++ b/doc/html/range/reference/algorithms/mutating/generate.html @@ -24,10 +24,10 @@

          - + Prototype

          @@ -42,7 +42,7 @@

          - + Description

          @@ -52,14 +52,14 @@ Returns the resultant range.

          - + Definition

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

          - + Requirements
            @@ -83,7 +83,7 @@
          - + Precondition:
            @@ -97,7 +97,7 @@
          - + Complexity

          diff --git a/doc/html/range/reference/algorithms/mutating/inplace_merge.html b/doc/html/range/reference/algorithms/mutating/inplace_merge.html index 8980d1a..a14c627 100644 --- a/doc/html/range/reference/algorithms/mutating/inplace_merge.html +++ b/doc/html/range/reference/algorithms/mutating/inplace_merge.html @@ -24,11 +24,10 @@

          - + Prototype

          @@ -59,7 +58,7 @@

          - + Description

          @@ -72,14 +71,14 @@ input range is preserved.

          - + Definition

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

          - + Requirements

          @@ -116,11 +115,11 @@ argument types.

          - + Precondition:
          - + For the non-predicate version:
          @@ -143,7 +142,7 @@
        - + For the predicate version:
        @@ -164,7 +163,7 @@
      - + Complexity

      diff --git a/doc/html/range/reference/algorithms/mutating/merge.html b/doc/html/range/reference/algorithms/mutating/merge.html index 83e88b7..f847d5d 100644 --- a/doc/html/range/reference/algorithms/mutating/merge.html +++ b/doc/html/range/reference/algorithms/mutating/merge.html @@ -24,10 +24,10 @@

      - + Prototype

      @@ -56,7 +56,7 @@

      - + Description

      @@ -75,14 +75,14 @@ version uses the predicate instead of operator<().

      - + Definition

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

      - + Requirements

      @@ -150,11 +150,11 @@

    - + Precondition:
    - + For the non-predicate version:
    @@ -194,7 +194,7 @@
    - + For the predicate version:
    @@ -230,7 +230,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/nth_element.html b/doc/html/range/reference/algorithms/mutating/nth_element.html index bd42f1f..624dfb2 100644 --- a/doc/html/range/reference/algorithms/mutating/nth_element.html +++ b/doc/html/range/reference/algorithms/mutating/nth_element.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -59,7 +58,7 @@

    - + Description

    @@ -70,14 +69,14 @@ is the same as the element that would be in that position if rng has been sorted.

    - + Definition

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

    - + Requirements

    @@ -128,7 +127,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/partial_sort.html b/doc/html/range/reference/algorithms/mutating/partial_sort.html index c0445f4..12a4024 100644 --- a/doc/html/range/reference/algorithms/mutating/partial_sort.html +++ b/doc/html/range/reference/algorithms/mutating/partial_sort.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -59,7 +58,7 @@

    - + Description

    @@ -75,14 +74,14 @@ predicate instead.

    - + Definition

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

    - + Requirements

    @@ -133,7 +132,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/partition.html b/doc/html/range/reference/algorithms/mutating/partition.html index 0cdf0d9..0cd0c73 100644 --- a/doc/html/range/reference/algorithms/mutating/partition.html +++ b/doc/html/range/reference/algorithms/mutating/partition.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -66,7 +66,7 @@

    - + Description

    @@ -80,14 +80,14 @@ corresponds to the middle iterator.

    - + Definition

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

    - + Requirements
      @@ -107,7 +107,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/random_shuffle.html b/doc/html/range/reference/algorithms/mutating/random_shuffle.html index ce742b5..f1a3c6c 100644 --- a/doc/html/range/reference/algorithms/mutating/random_shuffle.html +++ b/doc/html/range/reference/algorithms/mutating/random_shuffle.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -61,14 +60,14 @@ the shuffles range.

    - + Definition

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

    - + Requirements

    @@ -99,7 +98,7 @@

    - + Precondition:
    • @@ -108,7 +107,7 @@ maximum value.
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/remove.html b/doc/html/range/reference/algorithms/mutating/remove.html index 1017fa8..618d087 100644 --- a/doc/html/range/reference/algorithms/mutating/remove.html +++ b/doc/html/range/reference/algorithms/mutating/remove.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -66,7 +66,7 @@

    - + Description

    @@ -83,14 +83,14 @@ are dereferenceable, but the elements are unspecified.

    - + Definition

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

    - + Requirements
      @@ -113,7 +113,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy.html b/doc/html/range/reference/algorithms/mutating/remove_copy.html index 9b69dec..410848d 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_copy.html +++ b/doc/html/range/reference/algorithms/mutating/remove_copy.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -54,14 +53,14 @@ rng for which x == val is false.

    - + Definition

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

    - + Requirements
      @@ -84,7 +83,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/remove_copy_if.html b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html index b21f8c9..ed95b13 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_copy_if.html +++ b/doc/html/range/reference/algorithms/mutating/remove_copy_if.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -55,14 +54,14 @@ is false.

    - + Definition

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

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

    diff --git a/doc/html/range/reference/algorithms/mutating/remove_if.html b/doc/html/range/reference/algorithms/mutating/remove_if.html index 492ee63..113d9dd 100644 --- a/doc/html/range/reference/algorithms/mutating/remove_if.html +++ b/doc/html/range/reference/algorithms/mutating/remove_if.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -66,7 +66,7 @@

    - + Description

    @@ -82,14 +82,14 @@ are unspecified.

    - + Definition

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

    - + Requirements
      @@ -112,7 +112,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/replace.html b/doc/html/range/reference/algorithms/mutating/replace.html index c68005f..9055f9a 100644 --- a/doc/html/range/reference/algorithms/mutating/replace.html +++ b/doc/html/range/reference/algorithms/mutating/replace.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -57,14 +57,14 @@ Return a reference to rng.

    - + Definition

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

    - + Requirements
      @@ -93,7 +93,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy.html b/doc/html/range/reference/algorithms/mutating/replace_copy.html index 41b3d07..267f594 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_copy.html +++ b/doc/html/range/reference/algorithms/mutating/replace_copy.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -54,14 +53,14 @@ x.

    - + Definition

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

    - + Requirements
      @@ -88,7 +87,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/replace_copy_if.html b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html index 1d9be73..b053c1e 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_copy_if.html +++ b/doc/html/range/reference/algorithms/mutating/replace_copy_if.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -52,14 +51,14 @@ : x.

    - + Definition

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

    - + Requirements
      @@ -90,7 +89,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/replace_if.html b/doc/html/range/reference/algorithms/mutating/replace_if.html index 9730e67..f63c30e 100644 --- a/doc/html/range/reference/algorithms/mutating/replace_if.html +++ b/doc/html/range/reference/algorithms/mutating/replace_if.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -43,7 +42,7 @@

    - + Description

    @@ -52,14 +51,14 @@ Returns a reference to rng.

    - + Definition

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

    - + Requirements
      @@ -91,7 +90,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/reverse.html b/doc/html/range/reference/algorithms/mutating/reverse.html index c32a5ea..2e8262b 100644 --- a/doc/html/range/reference/algorithms/mutating/reverse.html +++ b/doc/html/range/reference/algorithms/mutating/reverse.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -42,7 +42,7 @@

    - + Description

    @@ -50,14 +50,14 @@ Returns a reference to the reversed range.

    - + Definition

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

    - + Requirements
      @@ -72,7 +72,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/reverse_copy.html b/doc/html/range/reference/algorithms/mutating/reverse_copy.html index 3a94e8a..ea0d3e9 100644 --- a/doc/html/range/reference/algorithms/mutating/reverse_copy.html +++ b/doc/html/range/reference/algorithms/mutating/reverse_copy.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -50,14 +49,14 @@ Returns the output iterator one passed the last copied element.

    - + Definition

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

    - + Requirements
      @@ -76,7 +75,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/rotate.html b/doc/html/range/reference/algorithms/mutating/rotate.html index 1d4646c..4b55abb 100644 --- a/doc/html/range/reference/algorithms/mutating/rotate.html +++ b/doc/html/range/reference/algorithms/mutating/rotate.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -53,14 +53,14 @@ and [middle, end(rng)). Returns a reference to rng.

    - + Definition

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

    - + Requirements
      @@ -74,7 +74,7 @@
    - + Precondition:
      @@ -86,7 +86,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/rotate_copy.html b/doc/html/range/reference/algorithms/mutating/rotate_copy.html index c1d3434..497fa1d 100644 --- a/doc/html/range/reference/algorithms/mutating/rotate_copy.html +++ b/doc/html/range/reference/algorithms/mutating/rotate_copy.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -43,7 +42,7 @@

    - + Description

    @@ -52,14 +51,14 @@ and [middle, end(rng)) to out.

    - + Definition

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

    - + Requirements
      @@ -77,7 +76,7 @@
    - + Precondition:
      @@ -89,7 +88,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/sort.html b/doc/html/range/reference/algorithms/mutating/sort.html index aac3921..db9444b 100644 --- a/doc/html/range/reference/algorithms/mutating/sort.html +++ b/doc/html/range/reference/algorithms/mutating/sort.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -71,14 +71,14 @@ [x,y], pred(y, x) == false.

    - + Definition

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

    - + Requirements

    @@ -129,7 +129,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/stable_partition.html b/doc/html/range/reference/algorithms/mutating/stable_partition.html index 8450d4c..bd77f3c 100644 --- a/doc/html/range/reference/algorithms/mutating/stable_partition.html +++ b/doc/html/range/reference/algorithms/mutating/stable_partition.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -61,7 +60,7 @@

    - + Description

    @@ -83,14 +82,14 @@ the iterator to the first element that fails to satisfy pred.

    - + Definition

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

    - + Requirements
      @@ -108,7 +107,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/stable_sort.html b/doc/html/range/reference/algorithms/mutating/stable_sort.html index 5bb61fb..6196114 100644 --- a/doc/html/range/reference/algorithms/mutating/stable_sort.html +++ b/doc/html/range/reference/algorithms/mutating/stable_sort.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -72,14 +71,14 @@ [x,y], pred(y,x) == false.

    - + Definition

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

    - + Requirements

    @@ -130,7 +129,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/swap_ranges.html b/doc/html/range/reference/algorithms/mutating/swap_ranges.html index 956694f..2e818ce 100644 --- a/doc/html/range/reference/algorithms/mutating/swap_ranges.html +++ b/doc/html/range/reference/algorithms/mutating/swap_ranges.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -50,14 +49,14 @@ Returns a reference to rng2.

    - + Definition

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

    - + Requirements
      @@ -81,7 +80,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/transform.html b/doc/html/range/reference/algorithms/mutating/transform.html index 056255e..068db05 100644 --- a/doc/html/range/reference/algorithms/mutating/transform.html +++ b/doc/html/range/reference/algorithms/mutating/transform.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -56,7 +56,7 @@

    - + Description

    @@ -92,14 +92,14 @@ The return value is out + min(distance(rng1), distance(rng2)).

    - + Definition

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

    - + Requirements

    @@ -169,7 +169,7 @@

    - + Precondition:

    @@ -203,7 +203,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/unique.html b/doc/html/range/reference/algorithms/mutating/unique.html index 2a7bae6..e36cbfe 100644 --- a/doc/html/range/reference/algorithms/mutating/unique.html +++ b/doc/html/range/reference/algorithms/mutating/unique.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -68,7 +68,7 @@

    - + Description

    @@ -86,14 +86,14 @@ type.

    - + Definition

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

    - + Requirements

    @@ -137,7 +137,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/mutating/unique_copy.html b/doc/html/range/reference/algorithms/mutating/unique_copy.html index 1b0c570..432191e 100644 --- a/doc/html/range/reference/algorithms/mutating/unique_copy.html +++ b/doc/html/range/reference/algorithms/mutating/unique_copy.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -43,7 +42,7 @@

    - + Description

    @@ -56,14 +55,14 @@ value type.

    - + Definition

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

    - + Requirements

    @@ -117,7 +116,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new.html b/doc/html/range/reference/algorithms/new.html index 2fc36d9..e0451a8 100644 --- a/doc/html/range/reference/algorithms/new.html +++ b/doc/html/range/reference/algorithms/new.html @@ -5,7 +5,7 @@ - + @@ -24,21 +24,20 @@

    diff --git a/doc/html/range/reference/algorithms/new/copy_n.html b/doc/html/range/reference/algorithms/new/copy_n.html index 593724d..dedfad3 100644 --- a/doc/html/range/reference/algorithms/new/copy_n.html +++ b/doc/html/range/reference/algorithms/new/copy_n.html @@ -24,10 +24,10 @@
    - + Prototype

    @@ -39,7 +39,7 @@

    - + Description

    @@ -53,14 +53,14 @@ from [boost::begin(rng), boost::begin(rng) + n) to the range [out, out + n)

    - + Definition

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

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

    diff --git a/doc/html/range/reference/algorithms/new/erase.html b/doc/html/range/reference/algorithms/new/erase.html index c802ee7..ef49c5f 100644 --- a/doc/html/range/reference/algorithms/new/erase.html +++ b/doc/html/range/reference/algorithms/new/erase.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -41,7 +41,7 @@

    - + Description

    @@ -58,14 +58,14 @@ the frequently used combination equivalent to target.erase(std::remove_if(target.begin(), target.end(), pred), target.end());

    - + Definition

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

    - + Requirements
    1. @@ -73,7 +73,7 @@ erase of an iterator range.
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/for_each.html b/doc/html/range/reference/algorithms/new/for_each.html index 3f685d5..15ec17b 100644 --- a/doc/html/range/reference/algorithms/new/for_each.html +++ b/doc/html/range/reference/algorithms/new/for_each.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -72,7 +72,7 @@

    - + Description

    @@ -88,14 +88,14 @@ It is safe to call this function with unequal length ranges.

    - + Definition

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

    - + Requirements
      @@ -125,7 +125,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/insert.html b/doc/html/range/reference/algorithms/new/insert.html index c9624e6..dec9b6a 100644 --- a/doc/html/range/reference/algorithms/new/insert.html +++ b/doc/html/range/reference/algorithms/new/insert.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -54,14 +54,14 @@ target.

    - + Definition

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

    - + Requirements
      @@ -81,7 +81,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/iota.html b/doc/html/range/reference/algorithms/new/iota.html index 5d932ee..b3c8c06 100644 --- a/doc/html/range/reference/algorithms/new/iota.html +++ b/doc/html/range/reference/algorithms/new/iota.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -39,7 +39,7 @@

    - + Description

    @@ -50,14 +50,14 @@ + boost::distance(boost::begin(rng), it)

    - + Definition

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

    - + Requirements
      @@ -73,7 +73,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/is_sorted.html b/doc/html/range/reference/algorithms/new/is_sorted.html index 53b79f1..93e9ee9 100644 --- a/doc/html/range/reference/algorithms/new/is_sorted.html +++ b/doc/html/range/reference/algorithms/new/is_sorted.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -42,7 +42,7 @@

    - + Description

    @@ -58,14 +58,14 @@ is true.

    - + Definition

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

    - + Requirements
      @@ -85,7 +85,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/overwrite.html b/doc/html/range/reference/algorithms/new/overwrite.html index c7de271..914a4e8 100644 --- a/doc/html/range/reference/algorithms/new/overwrite.html +++ b/doc/html/range/reference/algorithms/new/overwrite.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -43,7 +43,7 @@

    - + Description

    @@ -52,14 +52,14 @@ into the range to.

    - + Definition

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

    - + Requirements
      @@ -88,7 +88,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/push_back.html b/doc/html/range/reference/algorithms/new/push_back.html index b74c4d5..58dd060 100644 --- a/doc/html/range/reference/algorithms/new/push_back.html +++ b/doc/html/range/reference/algorithms/new/push_back.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -43,7 +43,7 @@

    - + Description

    @@ -52,14 +52,14 @@ to the back of the container target.

    - + Definition

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

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

    diff --git a/doc/html/range/reference/algorithms/new/push_front.html b/doc/html/range/reference/algorithms/new/push_front.html index 1104cc2..8650468 100644 --- a/doc/html/range/reference/algorithms/new/push_front.html +++ b/doc/html/range/reference/algorithms/new/push_front.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -43,7 +43,7 @@

    - + Description

    @@ -52,14 +52,14 @@ to the front of the container target.

    - + Definition

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

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

    diff --git a/doc/html/range/reference/algorithms/new/remove_erase.html b/doc/html/range/reference/algorithms/new/remove_erase.html index 3136430..b28ecfe 100644 --- a/doc/html/range/reference/algorithms/new/remove_erase.html +++ b/doc/html/range/reference/algorithms/new/remove_erase.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -50,14 +50,14 @@ algorithm which merely rearranges elements.

    - + Definition

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

    - + Requirements
    1. @@ -65,7 +65,7 @@ erase of an iterator range.
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/new/remove_erase_if.html b/doc/html/range/reference/algorithms/new/remove_erase_if.html index 994dd02..f66b732 100644 --- a/doc/html/range/reference/algorithms/new/remove_erase_if.html +++ b/doc/html/range/reference/algorithms/new/remove_erase_if.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -52,14 +51,14 @@ algorithm which merely rearranges elements.

    - + Definition

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

    - + Requirements
      @@ -73,7 +72,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating.html b/doc/html/range/reference/algorithms/non_mutating.html index ef22f2d..aca1179 100644 --- a/doc/html/range/reference/algorithms/non_mutating.html +++ b/doc/html/range/reference/algorithms/non_mutating.html @@ -5,7 +5,7 @@ - + @@ -24,45 +24,29 @@

    diff --git a/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html index 28aacf3..b4e1ec3 100644 --- a/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html +++ b/doc/html/range/reference/algorithms/non_mutating/adjacent_find.html @@ -24,11 +24,10 @@
    - + Prototype

    @@ -77,7 +76,7 @@

    - + Description

    @@ -98,14 +97,14 @@ is true.

    - + Definition

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

    - + Requirements

    @@ -143,7 +142,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/binary_search.html b/doc/html/range/reference/algorithms/non_mutating/binary_search.html index 4c75b33..b48a47e 100644 --- a/doc/html/range/reference/algorithms/non_mutating/binary_search.html +++ b/doc/html/range/reference/algorithms/non_mutating/binary_search.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -43,7 +42,7 @@

    - + Description

    @@ -53,14 +52,14 @@ range rng.

    - + Definition

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

    - + Requirements

    @@ -111,7 +110,7 @@

    - + Precondition:

    @@ -129,7 +128,7 @@ order according to the function object pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/count.html b/doc/html/range/reference/algorithms/non_mutating/count.html index a7ec656..75b364e 100644 --- a/doc/html/range/reference/algorithms/non_mutating/count.html +++ b/doc/html/range/reference/algorithms/non_mutating/count.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -54,14 +54,14 @@ is true.

    - + Definition

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

    - + Requirements
      @@ -84,7 +84,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/count_if.html b/doc/html/range/reference/algorithms/non_mutating/count_if.html index e56fb51..b50203b 100644 --- a/doc/html/range/reference/algorithms/non_mutating/count_if.html +++ b/doc/html/range/reference/algorithms/non_mutating/count_if.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -51,14 +50,14 @@ is true.

    - + Definition

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

    - + Requirements
      @@ -81,7 +80,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/equal.html b/doc/html/range/reference/algorithms/non_mutating/equal.html index 1576f3e..d70859b 100644 --- a/doc/html/range/reference/algorithms/non_mutating/equal.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -52,7 +52,7 @@

    - + Description

    @@ -70,14 +70,14 @@ considered equal in the predicate version if pred(x,y) is true.

    - + Definition

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

    - + Requirements

    @@ -138,7 +138,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/equal_range.html b/doc/html/range/reference/algorithms/non_mutating/equal_range.html index 51536ec..0594865 100644 --- a/doc/html/range/reference/algorithms/non_mutating/equal_range.html +++ b/doc/html/range/reference/algorithms/non_mutating/equal_range.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -71,7 +70,7 @@

    - + Description

    @@ -85,14 +84,14 @@ is determined by pred.

    - + Definition

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

    - + Requirements

    @@ -143,7 +142,7 @@

    - + Precondition:

    @@ -155,7 +154,7 @@ is ordered in ascending order according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/find.html b/doc/html/range/reference/algorithms/non_mutating/find.html index 583c1cb..76086a8 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find.html +++ b/doc/html/range/reference/algorithms/non_mutating/find.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -59,14 +59,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements
      @@ -87,7 +87,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/find_end.html b/doc/html/range/reference/algorithms/non_mutating/find_end.html index d4e9525..95cb212 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_end.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_end.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -66,7 +65,7 @@

    - + Description

    @@ -81,14 +80,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -148,7 +147,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/find_first_of.html b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html index 0585184..2751651 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_first_of.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_first_of.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -66,7 +65,7 @@

    - + Description

    @@ -86,14 +85,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -147,7 +146,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/find_if.html b/doc/html/range/reference/algorithms/non_mutating/find_if.html index df62ea8..18d83c4 100644 --- a/doc/html/range/reference/algorithms/non_mutating/find_if.html +++ b/doc/html/range/reference/algorithms/non_mutating/find_if.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -64,14 +63,14 @@ defines found in the same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements
      @@ -90,7 +89,7 @@
    - + Precondition:

    @@ -98,7 +97,7 @@ rng, *i is in the domain of UnaryPredicate.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/for_each.html b/doc/html/range/reference/algorithms/non_mutating/for_each.html index 413fc82..b7f8384 100644 --- a/doc/html/range/reference/algorithms/non_mutating/for_each.html +++ b/doc/html/range/reference/algorithms/non_mutating/for_each.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -59,14 +58,14 @@ fun(x).

    - + Definition

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

    - + Requirements
      @@ -90,7 +89,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html index f3ea649..25ace1b 100644 --- a/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html +++ b/doc/html/range/reference/algorithms/non_mutating/lexicographical_compare.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -53,7 +52,7 @@

    - + Description

    @@ -73,14 +72,14 @@ predicate versions.

    - + Definition

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

    - + Requirements

    @@ -145,7 +144,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/lower_bound.html b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html index e220c33..b4419b1 100644 --- a/doc/html/range/reference/algorithms/non_mutating/lower_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/lower_bound.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -72,14 +71,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -130,7 +129,7 @@

    - + Precondition:

    @@ -148,7 +147,7 @@ order according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/max_element.html b/doc/html/range/reference/algorithms/non_mutating/max_element.html index 2b61404..7202da9 100644 --- a/doc/html/range/reference/algorithms/non_mutating/max_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/max_element.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -84,7 +83,7 @@

    - + Description

    @@ -98,14 +97,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -142,7 +141,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/min_element.html b/doc/html/range/reference/algorithms/non_mutating/min_element.html index 1d91462..50260c5 100644 --- a/doc/html/range/reference/algorithms/non_mutating/min_element.html +++ b/doc/html/range/reference/algorithms/non_mutating/min_element.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -84,7 +83,7 @@

    - + Description

    @@ -98,14 +97,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -142,7 +141,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/mismatch.html b/doc/html/range/reference/algorithms/non_mutating/mismatch.html index 484a7a0..30f2acd 100644 --- a/doc/html/range/reference/algorithms/non_mutating/mismatch.html +++ b/doc/html/range/reference/algorithms/non_mutating/mismatch.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -106,7 +105,7 @@

    - + Description

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

    - + Definition

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

    - + Requirements

    @@ -186,14 +185,14 @@

    - + Precondition:

    distance(rng2) >= distance(rng1)

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/search.html b/doc/html/range/reference/algorithms/non_mutating/search.html index 16d35f0..6e68396 100644 --- a/doc/html/range/reference/algorithms/non_mutating/search.html +++ b/doc/html/range/reference/algorithms/non_mutating/search.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -96,7 +95,7 @@

    - + Description

    @@ -115,14 +114,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -183,7 +182,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/search_n.html b/doc/html/range/reference/algorithms/non_mutating/search_n.html index 394072c..aa1e621 100644 --- a/doc/html/range/reference/algorithms/non_mutating/search_n.html +++ b/doc/html/range/reference/algorithms/non_mutating/search_n.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -55,7 +54,7 @@

    - + Description

    @@ -64,14 +63,14 @@ and by a predicate when one is supplied.

    - + Definition

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

    - + Requirements

    @@ -125,7 +124,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/non_mutating/upper_bound.html b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html index be7c7e7..6e75ef7 100644 --- a/doc/html/range/reference/algorithms/non_mutating/upper_bound.html +++ b/doc/html/range/reference/algorithms/non_mutating/upper_bound.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -71,14 +70,14 @@ same manner as the returned iterator described above.

    - + Definition

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

    - + Requirements

    @@ -129,7 +128,7 @@

    - + Precondition:

    @@ -147,7 +146,7 @@ order according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/numeric.html b/doc/html/range/reference/algorithms/numeric.html index 99b3631..b71fd54 100644 --- a/doc/html/range/reference/algorithms/numeric.html +++ b/doc/html/range/reference/algorithms/numeric.html @@ -5,7 +5,7 @@ - + @@ -24,16 +24,13 @@

    diff --git a/doc/html/range/reference/algorithms/numeric/accumulate.html b/doc/html/range/reference/algorithms/numeric/accumulate.html index 2243e8c..e3accc8 100644 --- a/doc/html/range/reference/algorithms/numeric/accumulate.html +++ b/doc/html/range/reference/algorithms/numeric/accumulate.html @@ -24,10 +24,10 @@
    - + Prototype

    @@ -52,7 +52,7 @@

    - + Description

    @@ -63,18 +63,18 @@ The return value is the resultant value of the above algorithm.

    - + Definition

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

    - + Requirements
    - + For the first version
    @@ -99,7 +99,7 @@
    - + For the second version
    @@ -133,7 +133,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/numeric/adjacent_difference.html b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html index 0bfe131..b5b3f49 100644 --- a/doc/html/range/reference/algorithms/numeric/adjacent_difference.html +++ b/doc/html/range/reference/algorithms/numeric/adjacent_difference.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -55,7 +54,7 @@

    - + Description

    @@ -69,18 +68,18 @@ instead of operator-().

    - + Definition

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

    - + Requirements
    - + For the first version
    @@ -111,7 +110,7 @@
    - + For the second version
    @@ -146,7 +145,7 @@
    - + Precondition:

    @@ -154,7 +153,7 @@ + distance(rng)) is a valid range.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/numeric/inner_product.html b/doc/html/range/reference/algorithms/numeric/inner_product.html index 021ae08..9567a89 100644 --- a/doc/html/range/reference/algorithms/numeric/inner_product.html +++ b/doc/html/range/reference/algorithms/numeric/inner_product.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -54,7 +53,7 @@

    - + Description

    @@ -67,18 +66,18 @@ algorithm please see inner_product.

    - + Definition

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

    - + Requirements
    - + For the first version
    @@ -113,7 +112,7 @@
    - + For the second version
    @@ -162,14 +161,14 @@
    - + Precondition:

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

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/numeric/partial_sum.html b/doc/html/range/reference/algorithms/numeric/partial_sum.html index e1d88c8..50fa44b 100644 --- a/doc/html/range/reference/algorithms/numeric/partial_sum.html +++ b/doc/html/range/reference/algorithms/numeric/partial_sum.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -58,18 +57,18 @@ in the same manner as std::partial_sum(boost::begin(rng), boost::end(rng), out_it). See partial_sum.

    - + Definition

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

    - + Requirements
    - + For the first version
    @@ -99,7 +98,7 @@
    - + For the second version
    @@ -128,7 +127,7 @@
    - + Precondition:

    @@ -136,7 +135,7 @@ + distance(rng)) is a valid range.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/permutation.html b/doc/html/range/reference/algorithms/permutation.html index cf2da0e..d596b34 100644 --- a/doc/html/range/reference/algorithms/permutation.html +++ b/doc/html/range/reference/algorithms/permutation.html @@ -5,7 +5,7 @@ - + @@ -24,14 +24,12 @@

    diff --git a/doc/html/range/reference/algorithms/permutation/next_permutation.html b/doc/html/range/reference/algorithms/permutation/next_permutation.html index 73502be..78626e7 100644 --- a/doc/html/range/reference/algorithms/permutation/next_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/next_permutation.html @@ -24,11 +24,10 @@
    - + Prototype

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

    - + Description

    @@ -67,14 +66,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -125,7 +124,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/permutation/prev_permutation.html b/doc/html/range/reference/algorithms/permutation/prev_permutation.html index b1eb2bb..c87dadb 100644 --- a/doc/html/range/reference/algorithms/permutation/prev_permutation.html +++ b/doc/html/range/reference/algorithms/permutation/prev_permutation.html @@ -24,11 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -67,14 +66,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -125,7 +124,7 @@

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/set.html b/doc/html/range/reference/algorithms/set.html index 2e0ae8b..2d31545 100644 --- a/doc/html/range/reference/algorithms/set.html +++ b/doc/html/range/reference/algorithms/set.html @@ -5,7 +5,7 @@ - + @@ -24,16 +24,14 @@

    diff --git a/doc/html/range/reference/algorithms/set/includes.html b/doc/html/range/reference/algorithms/set/includes.html index dc960b9..9090779 100644 --- a/doc/html/range/reference/algorithms/set/includes.html +++ b/doc/html/range/reference/algorithms/set/includes.html @@ -24,10 +24,10 @@
    - + Prototype

    @@ -47,7 +47,7 @@

    - + Description

    @@ -59,14 +59,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -144,7 +144,7 @@

    - + Precondition:

    @@ -162,7 +162,7 @@ according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/set/set_difference.html b/doc/html/range/reference/algorithms/set/set_difference.html index 80c4cff..6aa68d8 100644 --- a/doc/html/range/reference/algorithms/set/set_difference.html +++ b/doc/html/range/reference/algorithms/set/set_difference.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -56,7 +56,7 @@

    - + Description

    @@ -70,14 +70,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -163,7 +163,7 @@

    - + Precondition:

    @@ -181,7 +181,7 @@ according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/set/set_intersection.html b/doc/html/range/reference/algorithms/set/set_intersection.html index cde3eb5..0c4705e 100644 --- a/doc/html/range/reference/algorithms/set/set_intersection.html +++ b/doc/html/range/reference/algorithms/set/set_intersection.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -57,7 +56,7 @@

    - + Description

    @@ -71,14 +70,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -164,7 +163,7 @@

    - + Precondition:

    @@ -182,7 +181,7 @@ according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/set/set_symmetric_difference.html b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html index 4be44e6..aab6c38 100644 --- a/doc/html/range/reference/algorithms/set/set_symmetric_difference.html +++ b/doc/html/range/reference/algorithms/set/set_symmetric_difference.html @@ -24,11 +24,10 @@

    - + Prototype

    @@ -59,7 +58,7 @@

    - + Description

    @@ -75,14 +74,14 @@ the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -168,7 +167,7 @@

    - + Precondition:

    @@ -186,7 +185,7 @@ according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/algorithms/set/set_union.html b/doc/html/range/reference/algorithms/set/set_union.html index b963850..f89ab11 100644 --- a/doc/html/range/reference/algorithms/set/set_union.html +++ b/doc/html/range/reference/algorithms/set/set_union.html @@ -24,10 +24,10 @@

    - + Prototype

    @@ -56,7 +56,7 @@

    - + Description

    @@ -69,14 +69,14 @@ in the predicate versions.

    - + Definition

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

    - + Requirements

    @@ -162,7 +162,7 @@

    - + Precondition:

    @@ -180,7 +180,7 @@ according to pred.

    - + Complexity

    diff --git a/doc/html/range/reference/concept_implementation.html b/doc/html/range/reference/concept_implementation.html index f2c4792..3c57172 100644 --- a/doc/html/range/reference/concept_implementation.html +++ b/doc/html/range/reference/concept_implementation.html @@ -24,7 +24,7 @@

    diff --git a/doc/html/range/reference/concept_implementation/semantics.html b/doc/html/range/reference/concept_implementation/semantics.html index 55a2106..10f57ad 100644 --- a/doc/html/range/reference/concept_implementation/semantics.html +++ b/doc/html/range/reference/concept_implementation/semantics.html @@ -31,7 +31,7 @@
    Functions
    - + notation
    diff --git a/doc/html/range/reference/concept_implementation/semantics/functions.html b/doc/html/range/reference/concept_implementation/semantics/functions.html index 895d32d..318dec3 100644 --- a/doc/html/range/reference/concept_implementation/semantics/functions.html +++ b/doc/html/range/reference/concept_implementation/semantics/functions.html @@ -168,8 +168,27 @@ + + + + + + + + + +

    - boost::end(x) - - boost::begin(x) + The size + of the + range with + complexity O(1). For + RandomAccessRanges this is + achieved via + boost::end(x) + - boost::begin(x). For + other traversal + categories range_calculate_size(x) is + returned. + Note that + unless range_calculate_size(x) has + been implemented + by the + user as + an extension + then the + Argument Dependent + Lookup will + return x.size()

    diff --git a/doc/html/range/reference/concept_implementation/semantics/metafunctions.html b/doc/html/range/reference/concept_implementation/semantics/metafunctions.html index 1a03534..bafa0af 100644 --- a/doc/html/range/reference/concept_implementation/semantics/metafunctions.html +++ b/doc/html/range/reference/concept_implementation/semantics/metafunctions.html @@ -217,6 +217,44 @@

    +

    + has_range_iterator<X>::type +

    +
    +

    + mpl::true_ if range_mutable_iterator<X>::type + is a valid expression, mpl::false_ + otherwise +

    +
    +

    + compile time +

    +
    +

    + has_range_const_iterator<X>::type +

    +
    +

    + mpl::true_ if range_const_iterator<X>::type + is a valid expression, mpl::false_ + otherwise +

    +
    +

    + compile time +

    +
    diff --git a/doc/html/range/reference/extending.html b/doc/html/range/reference/extending.html index 8ca7be8..6d418a1 100644 --- a/doc/html/range/reference/extending.html +++ b/doc/html/range/reference/extending.html @@ -24,14 +24,14 @@ diff --git a/doc/html/range/reference/extending/method_1.html b/doc/html/range/reference/extending/method_1.html index 910d2de..24b054c 100644 --- a/doc/html/range/reference/extending/method_1.html +++ b/doc/html/range/reference/extending/method_1.html @@ -24,7 +24,7 @@

    diff --git a/doc/html/range/reference/extending/method_2.html b/doc/html/range/reference/extending/method_2.html index 3828c8b..24e9a37 100644 --- a/doc/html/range/reference/extending/method_2.html +++ b/doc/html/range/reference/extending/method_2.html @@ -24,7 +24,7 @@

    @@ -83,6 +83,26 @@

    + + +

    + range_calculate_size(x) +

    + + +

    + Optional. This can be used to specify a mechanism for constant-time + computation of the size of a range. The default behaviour is + to return boost::end(x) - + boost::begin(x) + for random access ranges, and to return x.size() for ranges with lesser traversal + capability. This behaviour can be changed by implementing range_calculate_size in a manner + that will be found via ADL. The ability to calculate size in + O(1) is often possible even with ranges with traversal categories + less than random access. +

    + +

    diff --git a/doc/html/range/reference/extending/method_3.html b/doc/html/range/reference/extending/method_3.html index 2ec9d4d..3cee703 100644 --- a/doc/html/range/reference/extending/method_3.html +++ b/doc/html/range/reference/extending/method_3.html @@ -24,13 +24,13 @@

    diff --git a/doc/html/range/reference/extending/method_3/method_3_1.html b/doc/html/range/reference/extending/method_3/method_3_1.html index 3c038e6..07c18f9 100644 --- a/doc/html/range/reference/extending/method_3/method_3_1.html +++ b/doc/html/range/reference/extending/method_3/method_3_1.html @@ -24,7 +24,7 @@

    diff --git a/doc/html/range/reference/extending/method_3/method_3_2.html b/doc/html/range/reference/extending/method_3/method_3_2.html index 1f2102d..cb5235a 100644 --- a/doc/html/range/reference/extending/method_3/method_3_2.html +++ b/doc/html/range/reference/extending/method_3/method_3_2.html @@ -24,7 +24,7 @@

      diff --git a/doc/html/range/reference/ranges.html b/doc/html/range/reference/ranges.html index 6f8c5af..7ebd43e 100644 --- a/doc/html/range/reference/ranges.html +++ b/doc/html/range/reference/ranges.html @@ -24,12 +24,12 @@
    diff --git a/doc/html/range/reference/ranges/counting_range.html b/doc/html/range/reference/ranges/counting_range.html index 01d404d..01355b0 100644 --- a/doc/html/range/reference/ranges/counting_range.html +++ b/doc/html/range/reference/ranges/counting_range.html @@ -24,10 +24,10 @@
    - + Prototype

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

    - + Description

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

    - + Definition

    Defined in header file boost/range/counting_range.hpp

    - + Requirements
    1. diff --git a/doc/html/range/reference/ranges/irange.html b/doc/html/range/reference/ranges/irange.html index 3beff0b..291a416 100644 --- a/doc/html/range/reference/ranges/irange.html +++ b/doc/html/range/reference/ranges/irange.html @@ -24,10 +24,10 @@
    - + Prototype

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

    - + Description

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

    - + Definition

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

    - + Requirements
      @@ -80,7 +80,7 @@
    - + Complexity

    diff --git a/doc/html/range/reference/ranges/istream_range.html b/doc/html/range/reference/ranges/istream_range.html index df2709c..3e704f2 100644 --- a/doc/html/range/reference/ranges/istream_range.html +++ b/doc/html/range/reference/ranges/istream_range.html @@ -24,10 +24,10 @@

    - + Prototype

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

    - + Description

    @@ -49,7 +49,7 @@ wrapping a std::istream_iterator.

    - + Definition

    diff --git a/doc/html/range/reference/utilities.html b/doc/html/range/reference/utilities.html index 45e60d3..f4b5c90 100644 --- a/doc/html/range/reference/utilities.html +++ b/doc/html/range/reference/utilities.html @@ -24,12 +24,12 @@

    Having an abstraction that encapsulates a pair of iterators is very useful. diff --git a/doc/html/range/reference/utilities/iterator_range.html b/doc/html/range/reference/utilities/iterator_range.html index fb41371..b2b1923 100644 --- a/doc/html/range/reference/utilities/iterator_range.html +++ b/doc/html/range/reference/utilities/iterator_range.html @@ -24,7 +24,7 @@

    The intention of the iterator_range @@ -48,7 +48,7 @@ type.

    - + Synopsis

    @@ -188,7 +188,7 @@ iterators from the same container.

    - + Details member functions
    @@ -207,7 +207,7 @@ == r.end();

    - + Details functions
    diff --git a/doc/html/range/reference/utilities/join.html b/doc/html/range/reference/utilities/join.html index a06440d..8fc0d82 100644 --- a/doc/html/range/reference/utilities/join.html +++ b/doc/html/range/reference/utilities/join.html @@ -24,7 +24,7 @@

    The intention of the join @@ -39,33 +39,76 @@ check if the end of a range has been reached internally during traversal.

    - + Synposis

    template<typename SinglePassRange1, typename SinglePassRange2>
    -iterator_range<range_detail::join_iterator<
    -    typename range_iterator<const SinglePassRange1>::type,
    -    typename range_iterator<const SinglePassRange2>::type,
    -    typename add_const<
    -        typename range_value<const SinglePassRange1>::type>::type>
    ->
    +joined_range<const SinglePassRange1, const SinglePassRange2>
     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>
    ->
    +joined_range<SinglePassRange1, SinglePassRange2>
     join(SinglePassRange1& rng1, SinglePassRange2& rng2);
     

    +

    + For the const version: +

    +
      +
    • + Precondition: The range_value<SinglePassRange2>::type + must be convertible to range_value<SinglePassRange1>::type. + The range_reference<const + SinglePassRange2>::type must be convertible to range_reference<const SinglePassRange1>::type. +
    • +
    • + Range Category: Both rng1 and rng2 + must be a model of Single + Pass Range or better. +
    • +
    • + Range Return Type: joined_range<const + SinglePassRange1, + const SinglePassRange2> which is a model of the lesser + of the two range concepts passed. +
    • +
    • + Returned Range Category: The minimum + of the range category of rng1 + and rng2. +
    • +
    +

    + For the mutable version: +

    +
      +
    • + Precondition: The range_value<SinglePassRange2>::type + must be convertible to range_value<SinglePassRange1>::type. + The range_reference<SinglePassRange2>::type + must be convertible to range_reference<SinglePassRange1>::type. +
    • +
    • + Range Category: Both rng1 and rng2 + must be a model of Single + Pass Range or better. +
    • +
    • + Range Return Type: joined_range<SinglePassRange1, SinglePassRange2> which is a model of the lesser + of the two range concepts passed. +
    • +
    • + Returned Range Category: The minimum + of the range category of rng1 + and rng2. +
    • +
    - + Example

    diff --git a/doc/html/range/reference/utilities/sub_range.html b/doc/html/range/reference/utilities/sub_range.html index ebbf648..e82e7f5 100644 --- a/doc/html/range/reference/utilities/sub_range.html +++ b/doc/html/range/reference/utilities/sub_range.html @@ -24,7 +24,7 @@

    The sub_range class inherits @@ -35,7 +35,7 @@ is.

    - + Synopsis

    diff --git a/doc/html/range/style_guide.html b/doc/html/range/style_guide.html index c5e6877..5e36efd 100644 --- a/doc/html/range/style_guide.html +++ b/doc/html/range/style_guide.html @@ -7,7 +7,7 @@ - +

    @@ -20,11 +20,11 @@

    -PrevUpHomeNext +PrevUpHomeNext

    The use of a consistent terminology is as important for Ranges @@ -39,41 +39,43 @@

    @@ -62,7 +62,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/range/upgrade/upgrade_from_1_45.html b/doc/html/range/upgrade/upgrade_from_1_45.html new file mode 100644 index 0000000..542b5c9 --- /dev/null +++ b/doc/html/range/upgrade/upgrade_from_1_45.html @@ -0,0 +1,64 @@ + + + +Upgrade from version 1.45 + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
      +
    1. + size in addition to supporting + Random Access Range + now also supports extensibility via calls to the unqualified range_calculate_size(rng) + function. +
    2. +
    3. + strided + now in addition to working with any RandomAccessRange additionally works + for any SinglePassRange for which boost::size(rng) is valid. +
    4. +
    5. + strided + no longer requires distance(rng) % stride_size + == 0 + or stride_size < + distance(rng) +
    6. +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/introduction.qbk b/doc/introduction.qbk index 7fc83df..d03a65b 100644 --- a/doc/introduction.qbk +++ b/doc/introduction.qbk @@ -1,4 +1,9 @@ -[section Introduction] +[/ + Copyright 2010 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) +/] +[section:introduction 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. diff --git a/doc/mfc_atl.qbk b/doc/mfc_atl.qbk index 2a7bb9c..0511509 100644 --- a/doc/mfc_atl.qbk +++ b/doc/mfc_atl.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [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]] diff --git a/doc/portability.qbk b/doc/portability.qbk index b4aadbb..aed3825 100644 --- a/doc/portability.qbk +++ b/doc/portability.qbk @@ -1,4 +1,9 @@ -[section Portability] +[/ + Copyright 2010 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) +/] +[section:portability Portability] A huge effort has been made to port the library to as many compilers as possible. diff --git a/doc/reference.qbk b/doc/reference.qbk index 76e210e..14cf8e8 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:reference Reference] [include reference/overview.qbk] diff --git a/doc/reference/adaptors.qbk b/doc/reference/adaptors.qbk index 1b3fd9f..260fc39 100644 --- a/doc/reference/adaptors.qbk +++ b/doc/reference/adaptors.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:adaptors Range Adaptors] [section:introduction Introduction and motivation] diff --git a/doc/reference/adaptors/adjacent_filtered.qbk b/doc/reference/adaptors/adjacent_filtered.qbk index 1502d3b..a15f992 100644 --- a/doc/reference/adaptors/adjacent_filtered.qbk +++ b/doc/reference/adaptors/adjacent_filtered.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:adjacent_filtered adjacent_filtered] [table @@ -10,6 +15,7 @@ * [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `bi_pred(x,y)` is `true`. * [*Throws:] Whatever the copy constructor of `bi_pred` might throw. * [*Range Category:] __single_pass_range__ +* [*Return Type:] `boost::adjacent_filtered_range` * [*Returned Range Category:] The minimum of the range category of `rng` and __forward_range__ [section:adjacent_filtered_example adjacent_filtered example] diff --git a/doc/reference/adaptors/copied.qbk b/doc/reference/adaptors/copied.qbk index dbdeb4b..69ee46d 100644 --- a/doc/reference/adaptors/copied.qbk +++ b/doc/reference/adaptors/copied.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:copied copied] [table diff --git a/doc/reference/adaptors/examples/adjacent_filtered.cpp b/doc/reference/adaptors/examples/adjacent_filtered.cpp index 70923f8..7830a1d 100644 --- a/doc/reference/adaptors/examples/adjacent_filtered.cpp +++ b/doc/reference/adaptors/examples/adjacent_filtered.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/copied.cpp b/doc/reference/adaptors/examples/copied.cpp index 0ab0ca2..2de46ab 100644 --- a/doc/reference/adaptors/examples/copied.cpp +++ b/doc/reference/adaptors/examples/copied.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/filtered.cpp b/doc/reference/adaptors/examples/filtered.cpp index 65242f3..6471237 100644 --- a/doc/reference/adaptors/examples/filtered.cpp +++ b/doc/reference/adaptors/examples/filtered.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/indexed.cpp b/doc/reference/adaptors/examples/indexed.cpp index 3dc31d1..3178457 100644 --- a/doc/reference/adaptors/examples/indexed.cpp +++ b/doc/reference/adaptors/examples/indexed.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/indirected.cpp b/doc/reference/adaptors/examples/indirected.cpp index 47cf493..efb9d13 100644 --- a/doc/reference/adaptors/examples/indirected.cpp +++ b/doc/reference/adaptors/examples/indirected.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/map_keys.cpp b/doc/reference/adaptors/examples/map_keys.cpp index 6c5fc44..006e7e9 100644 --- a/doc/reference/adaptors/examples/map_keys.cpp +++ b/doc/reference/adaptors/examples/map_keys.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/map_values.cpp b/doc/reference/adaptors/examples/map_values.cpp index 9442612..a0fa651 100644 --- a/doc/reference/adaptors/examples/map_values.cpp +++ b/doc/reference/adaptors/examples/map_values.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/replaced.cpp b/doc/reference/adaptors/examples/replaced.cpp index 7c8926b..7b85ba1 100644 --- a/doc/reference/adaptors/examples/replaced.cpp +++ b/doc/reference/adaptors/examples/replaced.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/replaced_if.cpp b/doc/reference/adaptors/examples/replaced_if.cpp index fedd364..23952f7 100644 --- a/doc/reference/adaptors/examples/replaced_if.cpp +++ b/doc/reference/adaptors/examples/replaced_if.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/reversed.cpp b/doc/reference/adaptors/examples/reversed.cpp index e2aa80c..85696cb 100644 --- a/doc/reference/adaptors/examples/reversed.cpp +++ b/doc/reference/adaptors/examples/reversed.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/sliced.cpp b/doc/reference/adaptors/examples/sliced.cpp index 6ce4b12..cc8b9cb 100644 --- a/doc/reference/adaptors/examples/sliced.cpp +++ b/doc/reference/adaptors/examples/sliced.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/strided.cpp b/doc/reference/adaptors/examples/strided.cpp index 4509758..f12b72a 100644 --- a/doc/reference/adaptors/examples/strided.cpp +++ b/doc/reference/adaptors/examples/strided.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/tokenized.cpp b/doc/reference/adaptors/examples/tokenized.cpp index b4e6371..273eaf1 100644 --- a/doc/reference/adaptors/examples/tokenized.cpp +++ b/doc/reference/adaptors/examples/tokenized.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/transformed.cpp b/doc/reference/adaptors/examples/transformed.cpp index 1508969..f2a46f5 100644 --- a/doc/reference/adaptors/examples/transformed.cpp +++ b/doc/reference/adaptors/examples/transformed.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/examples/uniqued.cpp b/doc/reference/adaptors/examples/uniqued.cpp index 0511ade..a7b2f8e 100644 --- a/doc/reference/adaptors/examples/uniqued.cpp +++ b/doc/reference/adaptors/examples/uniqued.cpp @@ -1,3 +1,12 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// #include #include #include diff --git a/doc/reference/adaptors/filtered.qbk b/doc/reference/adaptors/filtered.qbk index 02c826f..1b14524 100644 --- a/doc/reference/adaptors/filtered.qbk +++ b/doc/reference/adaptors/filtered.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:filtered filtered] [table @@ -10,6 +15,7 @@ * [*Postcondition:] For all adjacent elements `[x]` in the returned range, `pred(x)` is `true`. * [*Throws:] Whatever the copy constructor of `pred` might throw. * [*Range Category:] __forward_range__ +* [*Range Return Type:] `boost::filtered_range` * [*Returned Range Category:] The minimum of the range category of `rng` and __bidirectional_range__ [section:filtered_example filtered example] diff --git a/doc/reference/adaptors/indexed.qbk b/doc/reference/adaptors/indexed.qbk index f6eb23e..9778f20 100644 --- a/doc/reference/adaptors/indexed.qbk +++ b/doc/reference/adaptors/indexed.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:indexed indexed] [table @@ -8,6 +13,7 @@ * [*Returns:] A range adapted to return both the element and the associated index. The returned range consists of iterators that have in addition to the usual iterator member functions an `index()` member function that returns the appropriate index for the element in the sequence corresponding with the iterator. * [*Range Category:] __single_pass_range__ +* [*Range Return Type:] `boost::indexed_range` * [*Returned Range Category:] The range category of `rng` [section:indexed_example indexed example] diff --git a/doc/reference/adaptors/indirected.qbk b/doc/reference/adaptors/indirected.qbk index 44182fb..5a1ed05 100644 --- a/doc/reference/adaptors/indirected.qbk +++ b/doc/reference/adaptors/indirected.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:indirected indirected] [table @@ -9,6 +14,7 @@ * [*Precondition:] The `value_type` of the range defines unary `operator*()` * [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `*y` where `y` is the corresponding element in the original range. * [*Range Category:] __single_pass_range__ +* [*Range Return Type:] `boost::indirected_range` * [*Returned Range Category:] The range category of `rng` [section:indirected_example indirected example] diff --git a/doc/reference/adaptors/map_keys.qbk b/doc/reference/adaptors/map_keys.qbk index 831d88f..01b9d34 100644 --- a/doc/reference/adaptors/map_keys.qbk +++ b/doc/reference/adaptors/map_keys.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:map_keys map_keys] [table @@ -9,6 +14,7 @@ * [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`. * [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.first` where `y` is the corresponding element in the original range. * [*Range Category:] __single_pass_range__ +* [*Range Return Type:] `boost::select_first_range` * [*Returned Range Category:] The range category of `rng`. [section:map_keys_example map_keys example] diff --git a/doc/reference/adaptors/map_values.qbk b/doc/reference/adaptors/map_values.qbk index a89b0e3..17ad9c4 100644 --- a/doc/reference/adaptors/map_values.qbk +++ b/doc/reference/adaptors/map_values.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:map_values map_values] [table @@ -9,6 +14,7 @@ * [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`. * [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range. * [*Range Category:] __single_pass_range__ +* [*Range Return Type:] for constant ranges, `boost::select_second_const` otherwise `boost:select_second_mutable` * [*Returned Range Category:] The range category of `rng`. [section:map_values_example map_values example] diff --git a/doc/reference/adaptors/replaced.qbk b/doc/reference/adaptors/replaced.qbk index 3fe1cb8..3df708c 100644 --- a/doc/reference/adaptors/replaced.qbk +++ b/doc/reference/adaptors/replaced.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replaced replaced] [table @@ -11,6 +16,7 @@ * `old_value` is convertible to the `value_type` of the range. * [*Postcondition:] For all elements `x` in the returned range, the value `x` is equal to the value of `(y == old_value) ? new_value : y` where `y` is the corresponding element in the original range. * [*Range Category:] __forward_range__ +* [*Range Return Type:] `boost::replaced_range` * [*Returned Range Category:] The range category of `rng`. [section:replaced_example replaced example] diff --git a/doc/reference/adaptors/replaced_if.qbk b/doc/reference/adaptors/replaced_if.qbk index 0a67aae..b160b34 100644 --- a/doc/reference/adaptors/replaced_if.qbk +++ b/doc/reference/adaptors/replaced_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replaced_if replaced_if] [table @@ -11,6 +16,7 @@ * `new_value` is convertible to the `value_type` of the range. * [*Postconditions:] For all elements `x` in the returned range, the value `x` is equal to the value of `pred(y) ? new_value : y` where `y` is the corresponding element in the original range. * [*Range Category:] __forward_range__ +* [*Range Return Type:] `boost::replaced_if_range` * [*Returned Range Category:] The range category of `rng`. [section:replaced_if_example replaced_if example] diff --git a/doc/reference/adaptors/reversed.qbk b/doc/reference/adaptors/reversed.qbk index 56cf141..7116475 100644 --- a/doc/reference/adaptors/reversed.qbk +++ b/doc/reference/adaptors/reversed.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:reversed reversed] [table @@ -8,6 +13,7 @@ * [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`. * [*Range Category:] __bidirectional_range__ +* [*Range Return Type:] `boost::reversed_range` * [*Returned Range Category:] The range category of `rng`. [section:reversed_example reversed example] diff --git a/doc/reference/adaptors/sliced.qbk b/doc/reference/adaptors/sliced.qbk index 275e4a8..33b57ca 100644 --- a/doc/reference/adaptors/sliced.qbk +++ b/doc/reference/adaptors/sliced.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:sliced sliced] [table @@ -9,6 +14,7 @@ * [*Precondition:] `0 <= n && n <= m && m < distance(rng)` * [*Returns:] `make_range(rng, n, m)` * [*Range Category:] __random_access_range__ +* [*Range Return Type:] `boost::sliced_range` * [*Returned Range Category:] __random_access_range__ [section:sliced_example sliced example] diff --git a/doc/reference/adaptors/strided.qbk b/doc/reference/adaptors/strided.qbk index 5b7ddf2..0f57222 100644 --- a/doc/reference/adaptors/strided.qbk +++ b/doc/reference/adaptors/strided.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:strided strided] [table @@ -6,10 +11,10 @@ [[Function] [`boost::adaptors::stride(rng, n)`]] ] -* [*Precondition:] `0 <= n && n < distance(rng)` +* [*Precondition:] `0 <= n` and `boost::size(rng)` is a valid expression. * [*Returns:] A new range based on `rng` where traversal is performed in steps of `n`. -* [*Range Category:] __random_access_range__ -* [*Returned Range Category:] __random_access_range__ +* [*Range Category:] __single_pass_range__ +* [*Returned Range Category:] The range category of `rng`. [section:strided_example strided example] `` diff --git a/doc/reference/adaptors/tokenized.qbk b/doc/reference/adaptors/tokenized.qbk index 2b3a656..2127785 100644 --- a/doc/reference/adaptors/tokenized.qbk +++ b/doc/reference/adaptors/tokenized.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:tokenized tokenized] [table @@ -36,6 +41,7 @@ * [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `regex_token_iterator`. The first iterator in the range would be constructed by forwarding all the arguments of `tokenized()` to the `regex_token_iterator` constructor. * [*Throws:] Whatever constructing and copying equivalent `regex_token_iterator`s might throw. * [*Range Category:] __random_access_range__ +* [*Range Return Type:] `boost::tokenized_range` * [*Returned Range Category:] __random_access_range__ [endsect] diff --git a/doc/reference/adaptors/transformed.qbk b/doc/reference/adaptors/transformed.qbk index f5bacf9..ec19583 100644 --- a/doc/reference/adaptors/transformed.qbk +++ b/doc/reference/adaptors/transformed.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:transformed transformed] [table @@ -10,6 +15,7 @@ * [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `fun(y)` where `y` is the corresponding element in the original range. * [*Throws:] Whatever the copy-constructor of `fun` might throw. * [*Range Category:] __single_pass_range__ +* [*Range Return Type:] `boost::transformed_range` * [*Returned Range Category:] The range category of `rng`. [section:transformed_example transformed example] diff --git a/doc/reference/adaptors/uniqued.qbk b/doc/reference/adaptors/uniqued.qbk index b7565a0..a74d1a8 100644 --- a/doc/reference/adaptors/uniqued.qbk +++ b/doc/reference/adaptors/uniqued.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:uniqued uniqued] [table @@ -9,6 +14,7 @@ * [*Precondition:] The `value_type` of the range is comparable with `operator==()`. * [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `x==y` is false. * [*Range Category:] __forward_range__ +* [*Range Return Type:] `boost::uniqued_range` * [*Returned Range Category:] The minimum of the range concept of `rng` and __forward_range__. [section:uniqued_example uniqued example] diff --git a/doc/reference/algorithm/adjacent_find.qbk b/doc/reference/algorithm/adjacent_find.qbk index 23c3cf8..67d78d4 100644 --- a/doc/reference/algorithm/adjacent_find.qbk +++ b/doc/reference/algorithm/adjacent_find.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:adjacent_find adjacent_find] [heading Prototype] diff --git a/doc/reference/algorithm/binary_search.qbk b/doc/reference/algorithm/binary_search.qbk index 542906f..42031b3 100644 --- a/doc/reference/algorithm/binary_search.qbk +++ b/doc/reference/algorithm/binary_search.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:binary_search binary_search] [heading Prototype] diff --git a/doc/reference/algorithm/copy.qbk b/doc/reference/algorithm/copy.qbk index e959825..e40f1b1 100644 --- a/doc/reference/algorithm/copy.qbk +++ b/doc/reference/algorithm/copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:copy copy] [heading Prototype] diff --git a/doc/reference/algorithm/copy_backward.qbk b/doc/reference/algorithm/copy_backward.qbk index f571aff..8fdac5a 100644 --- a/doc/reference/algorithm/copy_backward.qbk +++ b/doc/reference/algorithm/copy_backward.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:copy_backward copy_backward] [heading Prototype] diff --git a/doc/reference/algorithm/count.qbk b/doc/reference/algorithm/count.qbk index 3a41ec8..a84af3c 100644 --- a/doc/reference/algorithm/count.qbk +++ b/doc/reference/algorithm/count.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:count count] [heading Prototype] diff --git a/doc/reference/algorithm/count_if.qbk b/doc/reference/algorithm/count_if.qbk index c2ee4bd..b95cc91 100644 --- a/doc/reference/algorithm/count_if.qbk +++ b/doc/reference/algorithm/count_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:count_if count_if] [heading Prototype] diff --git a/doc/reference/algorithm/equal.qbk b/doc/reference/algorithm/equal.qbk index 278fe45..37d1c02 100644 --- a/doc/reference/algorithm/equal.qbk +++ b/doc/reference/algorithm/equal.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:equal equal] [heading Prototype] diff --git a/doc/reference/algorithm/equal_range.qbk b/doc/reference/algorithm/equal_range.qbk index 6d9650a..2d6c342 100644 --- a/doc/reference/algorithm/equal_range.qbk +++ b/doc/reference/algorithm/equal_range.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:equal_range equal_range] [heading Prototype] diff --git a/doc/reference/algorithm/fill.qbk b/doc/reference/algorithm/fill.qbk index a401046..4df2c0f 100644 --- a/doc/reference/algorithm/fill.qbk +++ b/doc/reference/algorithm/fill.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:fill fill] [heading Prototype] diff --git a/doc/reference/algorithm/fill_n.qbk b/doc/reference/algorithm/fill_n.qbk index 0ca27af..6458255 100644 --- a/doc/reference/algorithm/fill_n.qbk +++ b/doc/reference/algorithm/fill_n.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:fill_n fill_n] [heading Prototype] diff --git a/doc/reference/algorithm/find.qbk b/doc/reference/algorithm/find.qbk index 38d5507..ba57637 100644 --- a/doc/reference/algorithm/find.qbk +++ b/doc/reference/algorithm/find.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:find find] [heading Prototype] diff --git a/doc/reference/algorithm/find_end.qbk b/doc/reference/algorithm/find_end.qbk index a5999ce..dff17cd 100644 --- a/doc/reference/algorithm/find_end.qbk +++ b/doc/reference/algorithm/find_end.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:find_end find_end] [heading Prototype] diff --git a/doc/reference/algorithm/find_first_of.qbk b/doc/reference/algorithm/find_first_of.qbk index a6af825..d10d986 100644 --- a/doc/reference/algorithm/find_first_of.qbk +++ b/doc/reference/algorithm/find_first_of.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:find_first_of find_first_of] [heading Prototype] diff --git a/doc/reference/algorithm/find_if.qbk b/doc/reference/algorithm/find_if.qbk index 862d8a1..12ff91b 100644 --- a/doc/reference/algorithm/find_if.qbk +++ b/doc/reference/algorithm/find_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:find_if find_if] [heading Prototype] diff --git a/doc/reference/algorithm/for_each.qbk b/doc/reference/algorithm/for_each.qbk index a11530c..3661368 100644 --- a/doc/reference/algorithm/for_each.qbk +++ b/doc/reference/algorithm/for_each.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:for_each for_each] [heading Prototype] diff --git a/doc/reference/algorithm/generate.qbk b/doc/reference/algorithm/generate.qbk index 0bbc345..3d19664 100644 --- a/doc/reference/algorithm/generate.qbk +++ b/doc/reference/algorithm/generate.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:generate generate] [heading Prototype] diff --git a/doc/reference/algorithm/includes.qbk b/doc/reference/algorithm/includes.qbk index 5b7eb84..5f1ca5f 100644 --- a/doc/reference/algorithm/includes.qbk +++ b/doc/reference/algorithm/includes.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:includes includes] [heading Prototype] diff --git a/doc/reference/algorithm/inplace_merge.qbk b/doc/reference/algorithm/inplace_merge.qbk index d4c2a9c..015d9bb 100644 --- a/doc/reference/algorithm/inplace_merge.qbk +++ b/doc/reference/algorithm/inplace_merge.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:inplace_merge inplace_merge] [heading Prototype] diff --git a/doc/reference/algorithm/lexicographical_compare.qbk b/doc/reference/algorithm/lexicographical_compare.qbk index 16d155d..c8fad4b 100644 --- a/doc/reference/algorithm/lexicographical_compare.qbk +++ b/doc/reference/algorithm/lexicographical_compare.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:lexicographical_compare lexicographical_compare] [heading Prototype] diff --git a/doc/reference/algorithm/lower_bound.qbk b/doc/reference/algorithm/lower_bound.qbk index 6228928..58ed287 100644 --- a/doc/reference/algorithm/lower_bound.qbk +++ b/doc/reference/algorithm/lower_bound.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:lower_bound lower_bound] [heading Prototype] diff --git a/doc/reference/algorithm/make_heap.qbk b/doc/reference/algorithm/make_heap.qbk index 13238fc..df47fac 100644 --- a/doc/reference/algorithm/make_heap.qbk +++ b/doc/reference/algorithm/make_heap.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:make_heap make_heap] [heading Prototype] diff --git a/doc/reference/algorithm/max_element.qbk b/doc/reference/algorithm/max_element.qbk index 35cc0ed..01101a5 100644 --- a/doc/reference/algorithm/max_element.qbk +++ b/doc/reference/algorithm/max_element.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:max_element max_element] [heading Prototype] diff --git a/doc/reference/algorithm/merge.qbk b/doc/reference/algorithm/merge.qbk index 96d547c..e838358 100644 --- a/doc/reference/algorithm/merge.qbk +++ b/doc/reference/algorithm/merge.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:merge merge] [heading Prototype] diff --git a/doc/reference/algorithm/min_element.qbk b/doc/reference/algorithm/min_element.qbk index 3977f09..3895532 100644 --- a/doc/reference/algorithm/min_element.qbk +++ b/doc/reference/algorithm/min_element.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:min_element min_element] [heading Prototype] diff --git a/doc/reference/algorithm/mismatch.qbk b/doc/reference/algorithm/mismatch.qbk index 562fdb5..eb23928 100644 --- a/doc/reference/algorithm/mismatch.qbk +++ b/doc/reference/algorithm/mismatch.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:mismatch mismatch] [heading Prototype] diff --git a/doc/reference/algorithm/next_permutation.qbk b/doc/reference/algorithm/next_permutation.qbk index 3da1383..4a8dc21 100644 --- a/doc/reference/algorithm/next_permutation.qbk +++ b/doc/reference/algorithm/next_permutation.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:next_permutation next_permutation] [heading Prototype] diff --git a/doc/reference/algorithm/nth_element.qbk b/doc/reference/algorithm/nth_element.qbk index 57c1d37..9bd785e 100644 --- a/doc/reference/algorithm/nth_element.qbk +++ b/doc/reference/algorithm/nth_element.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:nth_element nth_element] [heading Prototype] diff --git a/doc/reference/algorithm/partial_sort.qbk b/doc/reference/algorithm/partial_sort.qbk index 6548672..e2b8876 100644 --- a/doc/reference/algorithm/partial_sort.qbk +++ b/doc/reference/algorithm/partial_sort.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:partial_sort partial_sort] [heading Prototype] diff --git a/doc/reference/algorithm/partition.qbk b/doc/reference/algorithm/partition.qbk index 272c0e3..8ae28e5 100644 --- a/doc/reference/algorithm/partition.qbk +++ b/doc/reference/algorithm/partition.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:partition partition] [heading Prototype] diff --git a/doc/reference/algorithm/pop_heap.qbk b/doc/reference/algorithm/pop_heap.qbk index 8b3d900..6950704 100644 --- a/doc/reference/algorithm/pop_heap.qbk +++ b/doc/reference/algorithm/pop_heap.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:pop_heap pop_heap] [heading Prototype] diff --git a/doc/reference/algorithm/prev_permutation.qbk b/doc/reference/algorithm/prev_permutation.qbk index d40eb6a..6d20431 100644 --- a/doc/reference/algorithm/prev_permutation.qbk +++ b/doc/reference/algorithm/prev_permutation.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:prev_permutation prev_permutation] [heading Prototype] diff --git a/doc/reference/algorithm/push_heap.qbk b/doc/reference/algorithm/push_heap.qbk index ddc7df2..8aff8c2 100644 --- a/doc/reference/algorithm/push_heap.qbk +++ b/doc/reference/algorithm/push_heap.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:push_heap push_heap] [heading Prototype] diff --git a/doc/reference/algorithm/random_shuffle.qbk b/doc/reference/algorithm/random_shuffle.qbk index 8f94696..b092c36 100644 --- a/doc/reference/algorithm/random_shuffle.qbk +++ b/doc/reference/algorithm/random_shuffle.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:random_shuffle random_shuffle] [heading Prototype] diff --git a/doc/reference/algorithm/remove.qbk b/doc/reference/algorithm/remove.qbk index 9e7380c..f26b277 100644 --- a/doc/reference/algorithm/remove.qbk +++ b/doc/reference/algorithm/remove.qbk @@ -1,5 +1,9 @@ +[/ + Copyright 2010 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) +/] [section:remove remove] - [heading Prototype] `` @@ -53,6 +57,4 @@ Defined in the header file `boost/range/algorithm/remove.hpp` Linear. `remove` performs exactly `distance(rng)` comparisons for equality. -[endsect] - - +[endsect] \ No newline at end of file diff --git a/doc/reference/algorithm/remove_copy.qbk b/doc/reference/algorithm/remove_copy.qbk index 9236396..b98da47 100644 --- a/doc/reference/algorithm/remove_copy.qbk +++ b/doc/reference/algorithm/remove_copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:remove_copy remove_copy] [heading Prototype] diff --git a/doc/reference/algorithm/remove_copy_if.qbk b/doc/reference/algorithm/remove_copy_if.qbk index b94dae2..d56647b 100644 --- a/doc/reference/algorithm/remove_copy_if.qbk +++ b/doc/reference/algorithm/remove_copy_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:remove_copy_if remove_copy_if] [heading Prototype] diff --git a/doc/reference/algorithm/remove_if.qbk b/doc/reference/algorithm/remove_if.qbk index 1250aba..64b6ac3 100644 --- a/doc/reference/algorithm/remove_if.qbk +++ b/doc/reference/algorithm/remove_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:remove_if remove_if] [heading Prototype] diff --git a/doc/reference/algorithm/replace.qbk b/doc/reference/algorithm/replace.qbk index 6b33666..27b6c1b 100644 --- a/doc/reference/algorithm/replace.qbk +++ b/doc/reference/algorithm/replace.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replace replace] [heading Prototype] diff --git a/doc/reference/algorithm/replace_copy.qbk b/doc/reference/algorithm/replace_copy.qbk index 72478ea..e936fc0 100644 --- a/doc/reference/algorithm/replace_copy.qbk +++ b/doc/reference/algorithm/replace_copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replace_copy replace_copy] [heading Prototype] diff --git a/doc/reference/algorithm/replace_copy_if.qbk b/doc/reference/algorithm/replace_copy_if.qbk index 19a1946..13305a7 100644 --- a/doc/reference/algorithm/replace_copy_if.qbk +++ b/doc/reference/algorithm/replace_copy_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replace_copy_if replace_copy_if] [heading Prototype] diff --git a/doc/reference/algorithm/replace_if.qbk b/doc/reference/algorithm/replace_if.qbk index e12202e..18480a9 100644 --- a/doc/reference/algorithm/replace_if.qbk +++ b/doc/reference/algorithm/replace_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:replace_if replace_if] [heading Prototype] diff --git a/doc/reference/algorithm/reverse.qbk b/doc/reference/algorithm/reverse.qbk index d6bd00f..6ecb31b 100644 --- a/doc/reference/algorithm/reverse.qbk +++ b/doc/reference/algorithm/reverse.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:reverse reverse] [heading Prototype] diff --git a/doc/reference/algorithm/reverse_copy.qbk b/doc/reference/algorithm/reverse_copy.qbk index d7d087e..b19ed9f 100644 --- a/doc/reference/algorithm/reverse_copy.qbk +++ b/doc/reference/algorithm/reverse_copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:reverse_copy reverse_copy] [heading Prototype] diff --git a/doc/reference/algorithm/rotate.qbk b/doc/reference/algorithm/rotate.qbk index 66b6f45..e28641b 100644 --- a/doc/reference/algorithm/rotate.qbk +++ b/doc/reference/algorithm/rotate.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:rotate rotate] [heading Prototype] diff --git a/doc/reference/algorithm/rotate_copy.qbk b/doc/reference/algorithm/rotate_copy.qbk index 838524a..0f11bdc 100644 --- a/doc/reference/algorithm/rotate_copy.qbk +++ b/doc/reference/algorithm/rotate_copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:rotate_copy rotate_copy] [heading Prototype] diff --git a/doc/reference/algorithm/search.qbk b/doc/reference/algorithm/search.qbk index e6c0a85..5c2c2a8 100644 --- a/doc/reference/algorithm/search.qbk +++ b/doc/reference/algorithm/search.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:search search] [heading Prototype] diff --git a/doc/reference/algorithm/search_n.qbk b/doc/reference/algorithm/search_n.qbk index 3f3ef10..ad8cbd2 100644 --- a/doc/reference/algorithm/search_n.qbk +++ b/doc/reference/algorithm/search_n.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:search_n search_n] [heading Prototype] diff --git a/doc/reference/algorithm/set_difference.qbk b/doc/reference/algorithm/set_difference.qbk index cd9724d..8ab5091 100644 --- a/doc/reference/algorithm/set_difference.qbk +++ b/doc/reference/algorithm/set_difference.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:set_difference set_difference] [heading Prototype] diff --git a/doc/reference/algorithm/set_intersection.qbk b/doc/reference/algorithm/set_intersection.qbk index 3c4e984..3d46109 100644 --- a/doc/reference/algorithm/set_intersection.qbk +++ b/doc/reference/algorithm/set_intersection.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:set_intersection set_intersection] [heading Prototype] diff --git a/doc/reference/algorithm/set_symmetric_difference.qbk b/doc/reference/algorithm/set_symmetric_difference.qbk index 4c6ed3e..9110cf0 100644 --- a/doc/reference/algorithm/set_symmetric_difference.qbk +++ b/doc/reference/algorithm/set_symmetric_difference.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:set_symmetric_difference set_symmetric_difference] [heading Prototype] diff --git a/doc/reference/algorithm/set_union.qbk b/doc/reference/algorithm/set_union.qbk index 3788781..679ec71 100644 --- a/doc/reference/algorithm/set_union.qbk +++ b/doc/reference/algorithm/set_union.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:set_union set_union] [heading Prototype] diff --git a/doc/reference/algorithm/sort.qbk b/doc/reference/algorithm/sort.qbk index 16fcfc4..3027c89 100644 --- a/doc/reference/algorithm/sort.qbk +++ b/doc/reference/algorithm/sort.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:sort sort] [heading Prototype] diff --git a/doc/reference/algorithm/sort_heap.qbk b/doc/reference/algorithm/sort_heap.qbk index 13e4133..b065ce5 100644 --- a/doc/reference/algorithm/sort_heap.qbk +++ b/doc/reference/algorithm/sort_heap.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:sort_heap sort_heap] [heading Prototype] diff --git a/doc/reference/algorithm/stable_partition.qbk b/doc/reference/algorithm/stable_partition.qbk index 8b20710..a820bcd 100644 --- a/doc/reference/algorithm/stable_partition.qbk +++ b/doc/reference/algorithm/stable_partition.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:stable_partition stable_partition] [heading Prototype] diff --git a/doc/reference/algorithm/stable_sort.qbk b/doc/reference/algorithm/stable_sort.qbk index bb6b64a..502551f 100644 --- a/doc/reference/algorithm/stable_sort.qbk +++ b/doc/reference/algorithm/stable_sort.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:stable_sort stable_sort] [heading Prototype] diff --git a/doc/reference/algorithm/swap_ranges.qbk b/doc/reference/algorithm/swap_ranges.qbk index f761ec4..9dcb764 100644 --- a/doc/reference/algorithm/swap_ranges.qbk +++ b/doc/reference/algorithm/swap_ranges.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:swap_ranges swap_ranges] [heading Prototype] diff --git a/doc/reference/algorithm/transform.qbk b/doc/reference/algorithm/transform.qbk index 49df721..d1e5ac4 100644 --- a/doc/reference/algorithm/transform.qbk +++ b/doc/reference/algorithm/transform.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:transform transform] [heading Prototype] diff --git a/doc/reference/algorithm/unique.qbk b/doc/reference/algorithm/unique.qbk index 56a2283..bc2cdce 100644 --- a/doc/reference/algorithm/unique.qbk +++ b/doc/reference/algorithm/unique.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:unique unique] [heading Prototype] diff --git a/doc/reference/algorithm/unique_copy.qbk b/doc/reference/algorithm/unique_copy.qbk index 1c311b6..f10a85f 100644 --- a/doc/reference/algorithm/unique_copy.qbk +++ b/doc/reference/algorithm/unique_copy.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:unique_copy unique_copy] [heading Prototype] diff --git a/doc/reference/algorithm/upper_bound.qbk b/doc/reference/algorithm/upper_bound.qbk index 7882410..cb79aee 100644 --- a/doc/reference/algorithm/upper_bound.qbk +++ b/doc/reference/algorithm/upper_bound.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:upper_bound upper_bound] [heading Prototype] diff --git a/doc/reference/algorithm_ext/copy_n.qbk b/doc/reference/algorithm_ext/copy_n.qbk index 8d0481f..6b34c7b 100644 --- a/doc/reference/algorithm_ext/copy_n.qbk +++ b/doc/reference/algorithm_ext/copy_n.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:copy_n copy_n] [heading Prototype] diff --git a/doc/reference/algorithm_ext/erase.qbk b/doc/reference/algorithm_ext/erase.qbk index 5e8c746..5b640a2 100644 --- a/doc/reference/algorithm_ext/erase.qbk +++ b/doc/reference/algorithm_ext/erase.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:erase erase] [heading Prototype] diff --git a/doc/reference/algorithm_ext/for_each.qbk b/doc/reference/algorithm_ext/for_each.qbk index 47b5d40..fdfcb99 100644 --- a/doc/reference/algorithm_ext/for_each.qbk +++ b/doc/reference/algorithm_ext/for_each.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:for_each for_each] [heading Prototype] diff --git a/doc/reference/algorithm_ext/insert.qbk b/doc/reference/algorithm_ext/insert.qbk index 4d5dc39..532e256 100644 --- a/doc/reference/algorithm_ext/insert.qbk +++ b/doc/reference/algorithm_ext/insert.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:insert insert] [heading Prototype] diff --git a/doc/reference/algorithm_ext/iota.qbk b/doc/reference/algorithm_ext/iota.qbk index 36cd7ab..0a5f799 100644 --- a/doc/reference/algorithm_ext/iota.qbk +++ b/doc/reference/algorithm_ext/iota.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:iota iota] [heading Prototype] diff --git a/doc/reference/algorithm_ext/is_sorted.qbk b/doc/reference/algorithm_ext/is_sorted.qbk index 9edc08d..f9c07b4 100644 --- a/doc/reference/algorithm_ext/is_sorted.qbk +++ b/doc/reference/algorithm_ext/is_sorted.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:is_sorted is_sorted] [heading Prototype] diff --git a/doc/reference/algorithm_ext/overwrite.qbk b/doc/reference/algorithm_ext/overwrite.qbk index b9307ff..a265833 100644 --- a/doc/reference/algorithm_ext/overwrite.qbk +++ b/doc/reference/algorithm_ext/overwrite.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:overwrite overwrite] [heading Prototype] diff --git a/doc/reference/algorithm_ext/push_back.qbk b/doc/reference/algorithm_ext/push_back.qbk index 101fd30..ec46d0b 100644 --- a/doc/reference/algorithm_ext/push_back.qbk +++ b/doc/reference/algorithm_ext/push_back.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:push_back push_back] [heading Prototype] diff --git a/doc/reference/algorithm_ext/push_front.qbk b/doc/reference/algorithm_ext/push_front.qbk index edb540c..d9ca4fe 100644 --- a/doc/reference/algorithm_ext/push_front.qbk +++ b/doc/reference/algorithm_ext/push_front.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:push_front push_front] [heading Prototype] diff --git a/doc/reference/algorithm_ext/remove_erase.qbk b/doc/reference/algorithm_ext/remove_erase.qbk index 25fb564..eecc97b 100644 --- a/doc/reference/algorithm_ext/remove_erase.qbk +++ b/doc/reference/algorithm_ext/remove_erase.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:remove_erase remove_erase] [heading Prototype] diff --git a/doc/reference/algorithm_ext/remove_erase_if.qbk b/doc/reference/algorithm_ext/remove_erase_if.qbk index 0b8648e..5eab446 100644 --- a/doc/reference/algorithm_ext/remove_erase_if.qbk +++ b/doc/reference/algorithm_ext/remove_erase_if.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:remove_erase_if remove_erase_if] [heading Prototype] diff --git a/doc/reference/algorithms.qbk b/doc/reference/algorithms.qbk index e5c16f7..5cfabc7 100644 --- a/doc/reference/algorithms.qbk +++ b/doc/reference/algorithms.qbk @@ -1,6 +1,10 @@ -[section:algorithms Range Algorithm] - -[section:range_algorithm_introduction Introduction and motivation] +[/ + Copyright 2010 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) +/] +[section:algorithms Range Algorithms] +[section: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 `` @@ -173,6 +177,4 @@ and there is no need to worry about generating an invalid range. Furthermore, if [include numeric/inner_product.qbk] [include numeric/partial_sum.qbk] [endsect] - -[endsect] - +[endsect] \ No newline at end of file diff --git a/doc/reference/extending.qbk b/doc/reference/extending.qbk index 13b0b5e..6414e67 100644 --- a/doc/reference/extending.qbk +++ b/doc/reference/extending.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:extending Extending the library] [section:method_1 Method 1: provide member functions and nested types] @@ -36,6 +41,7 @@ The primary templates in this library are implemented such that certain function [[Function ] [Related concept ]] [[`range_begin(x)`] [__single_pass_range__]] [[`range_end(x)` ] [__single_pass_range__]] + [[`range_calculate_size(x)`] [ Optional. This can be used to specify a mechanism for constant-time computation of the size of a range. The default behaviour is to return `boost::end(x) - boost::begin(x)` for random access ranges, and to return `x.size()` for ranges with lesser traversal capability. This behaviour can be changed by implementing `range_calculate_size` in a manner that will be found via ADL. The ability to calculate size in O(1) is often possible even with ranges with traversal categories less than random access.]] ] `range_begin()` and `range_end()` must be overloaded for both `const` and `mutable` reference arguments. diff --git a/doc/reference/numeric/accumulate.qbk b/doc/reference/numeric/accumulate.qbk index e642305..af5df1d 100644 --- a/doc/reference/numeric/accumulate.qbk +++ b/doc/reference/numeric/accumulate.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:accumulate accumulate] [heading Prototype] diff --git a/doc/reference/numeric/adjacent_difference.qbk b/doc/reference/numeric/adjacent_difference.qbk index f7ea1f7..7580036 100644 --- a/doc/reference/numeric/adjacent_difference.qbk +++ b/doc/reference/numeric/adjacent_difference.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:adjacent_difference adjacent_difference] [heading Prototype] diff --git a/doc/reference/numeric/inner_product.qbk b/doc/reference/numeric/inner_product.qbk index 2b42f8d..1c6fc51 100644 --- a/doc/reference/numeric/inner_product.qbk +++ b/doc/reference/numeric/inner_product.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:inner_product inner_product] [heading Prototype] diff --git a/doc/reference/numeric/partial_sum.qbk b/doc/reference/numeric/partial_sum.qbk index aa556e2..f52e465 100644 --- a/doc/reference/numeric/partial_sum.qbk +++ b/doc/reference/numeric/partial_sum.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:partial_sum partial_sum] [heading Prototype] diff --git a/doc/reference/overview.qbk b/doc/reference/overview.qbk index 48b3ee6..af7ef2c 100644 --- a/doc/reference/overview.qbk +++ b/doc/reference/overview.qbk @@ -1,4 +1,9 @@ -[section Overview] +[/ + Copyright 2010 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) +/] +[section:overview Overview] Three types of objects are currently supported by the library: diff --git a/doc/reference/ranges.qbk b/doc/reference/ranges.qbk index aaee7d8..14299c4 100644 --- a/doc/reference/ranges.qbk +++ b/doc/reference/ranges.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:ranges Provided Ranges] [include ranges/counting_range.qbk] diff --git a/doc/reference/ranges/counting_range.qbk b/doc/reference/ranges/counting_range.qbk index c9484b8..31037a9 100644 --- a/doc/reference/ranges/counting_range.qbk +++ b/doc/reference/ranges/counting_range.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:counting_range counting_range] [heading Prototype] diff --git a/doc/reference/ranges/irange.qbk b/doc/reference/ranges/irange.qbk index a689ec0..6e59cb1 100644 --- a/doc/reference/ranges/irange.qbk +++ b/doc/reference/ranges/irange.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:irange irange] [heading Prototype] diff --git a/doc/reference/ranges/istream_range.qbk b/doc/reference/ranges/istream_range.qbk index 2b195e7..66a1e84 100644 --- a/doc/reference/ranges/istream_range.qbk +++ b/doc/reference/ranges/istream_range.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [section:istream_range istream_range] [heading Prototype] diff --git a/doc/reference/semantics.qbk b/doc/reference/semantics.qbk index 47d15c9..6276e9d 100644 --- a/doc/reference/semantics.qbk +++ b/doc/reference/semantics.qbk @@ -1,4 +1,9 @@ -[section Semantics] +[/ + Copyright 2010 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) +/] +[section:semantics Semantics] [heading notation] @@ -68,6 +73,16 @@ [`boost::reverse_iterator::type`] [compile time] ] + [ + [`has_range_iterator::type`] + [`mpl::true_` if `range_mutable_iterator::type` is a valid expression, `mpl::false_` otherwise] + [compile time] + ] + [ + [`has_range_const_iterator::type`] + [`mpl::true_` if `range_const_iterator::type` is a valid expression, `mpl::false_` otherwise] + [compile time] + ] ] [endsect] @@ -114,7 +129,7 @@ [ [`size(x)`] [`range_difference::type`] - [`boost::end(x) - boost::begin(x)`] + [`The size of the range with complexity O(1). For RandomAccessRanges this is achieved via boost::end(x) - boost::begin(x). For other traversal categories range_calculate_size(x) is returned. Note that unless range_calculate_size(x) has been implemented by the user as an extension then the Argument Dependent Lookup will return x.size()`] [constant time] ] [ diff --git a/doc/reference/synopsis.qbk b/doc/reference/synopsis.qbk index 5848bd2..381d77b 100644 --- a/doc/reference/synopsis.qbk +++ b/doc/reference/synopsis.qbk @@ -1,4 +1,9 @@ -[section Synopsis] +[/ + Copyright 2010 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) +/] +[section:synopsis Synopsis] `` namespace boost diff --git a/doc/reference/utilities.qbk b/doc/reference/utilities.qbk index 20ce6b6..94d4699 100644 --- a/doc/reference/utilities.qbk +++ b/doc/reference/utilities.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [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` is hardly self-documenting whereas more domain specific class names are. Therefore these two classes are provided: @@ -266,25 +271,31 @@ The resultant range will have the lowest common traversal of the two ranges supp 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 -iterator_range::type, - typename range_iterator::type, - typename add_const< - typename range_value::type>::type> -> +joined_range join(const SinglePassRange1& rng1, const SinglePassRange2& rng2) template -iterator_range::type, - typename range_iterator::type, - typename range_value::type> -> +joined_range join(SinglePassRange1& rng1, SinglePassRange2& rng2); `` +For the const version: + +* [*Precondition:] The `range_value::type` must be convertible to `range_value::type`. The `range_reference::type` must be convertible to `range_reference::type`. +* [*Range Category:] Both `rng1` and `rng2` must be a model of __single_pass_range__ or better. +* [*Range Return Type:] `joined_range` which is a model of the lesser of the two range concepts passed. +* [*Returned Range Category:] The minimum of the range category of `rng1` and `rng2`. + +For the mutable version: + +* [*Precondition:] The `range_value::type` must be convertible to `range_value::type`. The `range_reference::type` must be convertible to `range_reference::type`. +* [*Range Category:] Both `rng1` and `rng2` must be a model of __single_pass_range__ or better. +* [*Range Return Type:] `joined_range` which is a model of the lesser of the two range concepts passed. +* [*Returned Range Category:] The minimum of the range category of `rng1` and `rng2`. + [h4 Example] The expression `join(irange(0,5), irange(5,10))` would evaluate to a range representing an integer range `[0,10)` diff --git a/doc/style.css b/doc/style.css deleted file mode 100755 index ce44c30..0000000 --- a/doc/style.css +++ /dev/null @@ -1,42 +0,0 @@ -/* -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-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/ -// -*/ -pre{ - BORDER-RIGHT: gray 1pt solid; - PADDING-RIGHT: 2pt; - BORDER-TOP: gray 1pt solid; - DISPLAY: block; - PADDING-LEFT: 2pt; - PADDING-BOTTOM: 2pt; - BORDER-LEFT: gray 1pt solid; - MARGIN-RIGHT: 32pt; - PADDING-TOP: 2pt; - BORDER-BOTTOM: gray 1pt solid; - FONT-FAMILY: "Courier New", Courier, mono; - background-color: #EEEEEE; -} - - -.keyword{color: #0000FF;} -.identifier{} -.comment{font-style: italic; color: #008000;} -.special{color: #800040;} -.preprocessor{color: #3F007F;} -.string{font-style: italic; color: #666666;} -.literal{font-style: italic; color: #666666;} - -table -{ - cellpadding: 5px; - border: 2px; -} - - diff --git a/doc/style.qbk b/doc/style.qbk index 779fd5c..c6e5e34 100644 --- a/doc/style.qbk +++ b/doc/style.qbk @@ -1,3 +1,8 @@ +[/ + Copyright 2010 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) +/] [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/]. diff --git a/doc/upgrade.qbk b/doc/upgrade.qbk index 016f89c..516ed11 100644 --- a/doc/upgrade.qbk +++ b/doc/upgrade.qbk @@ -1,5 +1,18 @@ +[/ + Copyright 2010 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) +/] [section:upgrade Upgrade version of Boost.Range] +[section:upgrade_from_1_45 Upgrade from version 1.45] + +# __size__ in addition to supporting __random_access_range__ now also supports extensibility via calls to the unqualified `range_calculate_size(rng)` function. +# __range_adaptors_strided__ now in addition to working with any RandomAccessRange additionally works for any SinglePassRange for which `boost::size(rng)` is valid. +# __range_adaptors_strided__ no longer requires `distance(rng) % stride_size == 0` or `stride_size < distance(rng)` + +[endsect] + [section:upgrade_from_1_42 Upgrade from version 1.42] New features: diff --git a/include/boost/range/adaptor/adjacent_filtered.hpp b/include/boost/range/adaptor/adjacent_filtered.hpp index f63a599..edc1dff 100644 --- a/include/boost/range/adaptor/adjacent_filtered.hpp +++ b/include/boost/range/adaptor/adjacent_filtered.hpp @@ -116,7 +116,7 @@ namespace boost }; template< class P, class R, bool default_pass > - struct adjacent_filter_range + struct adjacent_filtered_range : iterator_range< skip_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type, P, @@ -138,7 +138,7 @@ namespace boost typedef BOOST_DEDUCED_TYPENAME range_iterator::type raw_iterator; public: - adjacent_filter_range( const P& p, R& r ) + adjacent_filtered_range( const P& p, R& r ) : base_range(skip_iter(boost::begin(r), boost::end(r), p), skip_iter(boost::end(r), boost::end(r), p)) { @@ -164,37 +164,37 @@ namespace boost }; template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( ForwardRng& r, const adjacent_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( const ForwardRng& r, const adjacent_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( ForwardRng& r, const adjacent_excl_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( const ForwardRng& r, const adjacent_excl_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } } // 'range_detail' @@ -202,7 +202,7 @@ namespace boost // Bring adjacent_filter_range into the boost namespace so that users of // this library may specify the return type of the '|' operator and // adjacent_filter() - using range_detail::adjacent_filter_range; + using range_detail::adjacent_filtered_range; namespace adaptors { @@ -218,17 +218,17 @@ namespace boost } template - inline adjacent_filter_range + inline adjacent_filtered_range adjacent_filter(ForwardRng& rng, BinPredicate filter_pred) { - return adjacent_filter_range(filter_pred, rng); + return adjacent_filtered_range(filter_pred, rng); } template - inline adjacent_filter_range + inline adjacent_filtered_range adjacent_filter(const ForwardRng& rng, BinPredicate filter_pred) { - return adjacent_filter_range(filter_pred, rng); + return adjacent_filtered_range(filter_pred, rng); } } // 'adaptors' diff --git a/include/boost/range/adaptor/define_adaptor.hpp b/include/boost/range/adaptor/define_adaptor.hpp index d68c64e..26f4016 100644 --- a/include/boost/range/adaptor/define_adaptor.hpp +++ b/include/boost/range/adaptor/define_adaptor.hpp @@ -1,3 +1,13 @@ +// 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_DEFINE_ADAPTOR_HPP_INCLUDED #define BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED diff --git a/include/boost/range/adaptor/filtered.hpp b/include/boost/range/adaptor/filtered.hpp index 62888e7..d9315bd 100755 --- a/include/boost/range/adaptor/filtered.hpp +++ b/include/boost/range/adaptor/filtered.hpp @@ -20,7 +20,7 @@ namespace boost namespace range_detail { template< class P, class R > - struct filter_range : + struct filtered_range : boost::iterator_range< boost::filter_iterator< P, BOOST_DEDUCED_TYPENAME range_iterator::type @@ -34,7 +34,7 @@ namespace boost > > base; public: - filter_range( P p, R& r ) + filtered_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) ) ) { } @@ -48,19 +48,19 @@ namespace boost }; template< class InputRng, class Predicate > - inline filter_range + inline filtered_range operator|( InputRng& r, const filter_holder& f ) { - return filter_range( f.val, r ); + return filtered_range( f.val, r ); } template< class InputRng, class Predicate > - inline filter_range + inline filtered_range operator|( const InputRng& r, const filter_holder& f ) { - return filter_range( f.val, r ); + return filtered_range( f.val, r ); } } // 'range_detail' @@ -70,7 +70,7 @@ namespace boost // 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 filter() - using range_detail::filter_range; + using range_detail::filtered_range; namespace adaptors { @@ -82,17 +82,17 @@ namespace boost } template - inline filter_range + inline filtered_range filter(InputRange& rng, Predicate filter_pred) { - return range_detail::filter_range( filter_pred, rng ); + return range_detail::filtered_range( filter_pred, rng ); } template - inline filter_range + inline filtered_range filter(const InputRange& rng, Predicate filter_pred) { - return range_detail::filter_range( filter_pred, rng ); + return range_detail::filtered_range( filter_pred, rng ); } } // 'adaptors' diff --git a/include/boost/range/adaptor/indirected.hpp b/include/boost/range/adaptor/indirected.hpp index 4abb3ec..d7edc18 100644 --- a/include/boost/range/adaptor/indirected.hpp +++ b/include/boost/range/adaptor/indirected.hpp @@ -19,7 +19,7 @@ namespace boost namespace range_detail { template< class R > - struct indirect_range : + struct indirected_range : public boost::iterator_range< boost::indirect_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -35,7 +35,7 @@ namespace boost base; public: - explicit indirect_range( R& r ) + explicit indirected_range( R& r ) : base( r ) { } }; @@ -43,22 +43,22 @@ namespace boost struct indirect_forwarder {}; template< class InputRng > - inline indirect_range + inline indirected_range operator|( InputRng& r, indirect_forwarder ) { - return indirect_range( r ); + return indirected_range( r ); } template< class InputRng > - inline indirect_range + inline indirected_range operator|( const InputRng& r, indirect_forwarder ) { - return indirect_range( r ); + return indirected_range( r ); } } // 'range_detail' - using range_detail::indirect_range; + using range_detail::indirected_range; namespace adaptors { @@ -69,17 +69,17 @@ namespace boost } template - inline indirect_range + inline indirected_range indirect(InputRange& rng) { - return indirect_range(rng); + return indirected_range(rng); } template - inline indirect_range + inline indirected_range indirect(const InputRange& rng) { - return indirect_range(rng); + return indirected_range(rng); } } // 'adaptors' diff --git a/include/boost/range/adaptor/map.hpp b/include/boost/range/adaptor/map.hpp index 6d08ea7..ff8b97e 100755 --- a/include/boost/range/adaptor/map.hpp +++ b/include/boost/range/adaptor/map.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { @@ -25,11 +26,10 @@ namespace boost template< class Map > struct select_first { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::first_type& - result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::first_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( argument_type r ) const { return r.first; } @@ -38,10 +38,10 @@ namespace boost template< class Map > struct select_second_mutable { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef BOOST_DEDUCED_TYPENAME pair_t::second_type& result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef BOOST_DEDUCED_TYPENAME range_value::type::second_type& result_type; - result_type operator()( pair_t& r ) const + result_type operator()( argument_type r ) const { return r.second; } @@ -50,11 +50,10 @@ namespace boost template< class Map > struct select_second_const { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::second_type& - result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::second_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( argument_type r ) const { return r.second; } @@ -62,11 +61,11 @@ namespace boost template class select_first_range - : public transform_range< + : public transformed_range< select_first, const StdPairRng> { - typedef transform_range, const StdPairRng> base; + typedef transformed_range, const StdPairRng> base; public: typedef select_first transform_fn_type; typedef const StdPairRng source_range_type; @@ -81,11 +80,11 @@ namespace boost template class select_second_mutable_range - : public transform_range< + : public transformed_range< select_second_mutable, StdPairRng> { - typedef transform_range, StdPairRng> base; + typedef transformed_range, StdPairRng> base; public: typedef select_second_mutable transform_fn_type; typedef StdPairRng source_range_type; @@ -100,11 +99,11 @@ namespace boost template class select_second_const_range - : public transform_range< + : public transformed_range< select_second_const, const StdPairRng> { - typedef transform_range, const StdPairRng> base; + typedef transformed_range, const StdPairRng> base; public: typedef select_second_const transform_fn_type; typedef const StdPairRng source_range_type; @@ -122,7 +121,7 @@ namespace boost operator|( const StdPairRng& r, map_keys_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_first() ) ); + boost::adaptors::transformed( select_first() ) ); } template< class StdPairRng > @@ -130,7 +129,7 @@ namespace boost operator|( StdPairRng& r, map_values_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_second_mutable() ) ); + boost::adaptors::transformed( select_second_mutable() ) ); } template< class StdPairRng > @@ -138,7 +137,7 @@ namespace boost operator|( const StdPairRng& r, map_values_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_second_const() ) ); + boost::adaptors::transformed( select_second_const() ) ); } } // 'range_detail' diff --git a/include/boost/range/adaptor/replaced_if.hpp b/include/boost/range/adaptor/replaced_if.hpp index 9353abd..b514354 100644 --- a/include/boost/range/adaptor/replaced_if.hpp +++ b/include/boost/range/adaptor/replaced_if.hpp @@ -47,7 +47,7 @@ namespace boost }; template< class Pred, class R > - class replace_if_range : + class replaced_if_range : public boost::iterator_range< boost::transform_iterator< replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value::type >, @@ -64,7 +64,7 @@ namespace boost public: typedef BOOST_DEDUCED_TYPENAME range_value::type value_type; - replace_if_range( R& r, const Pred& pred, value_type to ) + replaced_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) ) ) { } @@ -87,23 +87,23 @@ namespace boost }; template< class Pred, class InputRng > - inline replace_if_range + inline replaced_if_range operator|( InputRng& r, const replace_if_holder::type>& f ) { - return replace_if_range(r, f.pred(), f.to()); + return replaced_if_range(r, f.pred(), f.to()); } template< class Pred, class InputRng > - inline replace_if_range + inline replaced_if_range operator|( const InputRng& r, const replace_if_holder::type>& f ) { - return replace_if_range(r, f.pred(), f.to()); + return replaced_if_range(r, f.pred(), f.to()); } } // 'range_detail' - using range_detail::replace_if_range; + using range_detail::replaced_if_range; namespace adaptors { @@ -115,19 +115,19 @@ namespace boost } template - inline replace_if_range + inline replaced_if_range replace_if(InputRange& rng, Pred pred, BOOST_DEDUCED_TYPENAME range_value::type to) { - return range_detail::replace_if_range(rng, pred, to); + return range_detail::replaced_if_range(rng, pred, to); } template - inline replace_if_range + inline replaced_if_range replace_if(const InputRange& rng, Pred pred, BOOST_DEDUCED_TYPENAME range_value::type to) { - return range_detail::replace_if_range(rng, pred, to); + return range_detail::replaced_if_range(rng, pred, to); } } // 'adaptors' diff --git a/include/boost/range/adaptor/reversed.hpp b/include/boost/range/adaptor/reversed.hpp index 229702b..c85eda8 100755 --- a/include/boost/range/adaptor/reversed.hpp +++ b/include/boost/range/adaptor/reversed.hpp @@ -19,7 +19,7 @@ namespace boost namespace range_detail { template< class R > - struct reverse_range : + struct reversed_range : public boost::iterator_range< boost::reverse_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -37,7 +37,7 @@ namespace boost public: typedef boost::reverse_iterator::type> iterator; - reverse_range( R& r ) + explicit reversed_range( R& r ) : base( iterator(boost::end(r)), iterator(boost::begin(r)) ) { } }; @@ -45,22 +45,22 @@ namespace boost struct reverse_forwarder {}; template< class BidirectionalRng > - inline reverse_range + inline reversed_range operator|( BidirectionalRng& r, reverse_forwarder ) { - return reverse_range( r ); + return reversed_range( r ); } template< class BidirectionalRng > - inline reverse_range + inline reversed_range operator|( const BidirectionalRng& r, reverse_forwarder ) { - return reverse_range( r ); + return reversed_range( r ); } } // 'range_detail' - using range_detail::reverse_range; + using range_detail::reversed_range; namespace adaptors { @@ -71,17 +71,17 @@ namespace boost } template - inline reverse_range + inline reversed_range reverse(BidirectionalRange& rng) { - return reverse_range(rng); + return reversed_range(rng); } template - inline reverse_range + inline reversed_range reverse(const BidirectionalRange& rng) { - return reverse_range(rng); + return reversed_range(rng); } } // 'adaptors' diff --git a/include/boost/range/adaptor/sliced.hpp b/include/boost/range/adaptor/sliced.hpp index 03c6894..7772bb5 100755 --- a/include/boost/range/adaptor/sliced.hpp +++ b/include/boost/range/adaptor/sliced.hpp @@ -27,53 +27,53 @@ namespace boost std::size_t u; }; - template< class RandomAccessRange > - class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - { - typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > base_t; - public: - template - sliced_range(Rng& rng, T t, U u) - : base_t(boost::make_iterator_range(rng, t, u - boost::size(rng))) - { - } - }; + template< class RandomAccessRange > + class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + { + typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > base_t; + public: + template + sliced_range(Rng& rng, T t, U u) + : base_t(boost::make_iterator_range(rng, t, u - boost::size(rng))) + { + } + }; - template< class RandomAccessRange > - inline sliced_range - slice( RandomAccessRange& rng, std::size_t t, std::size_t u ) - { - BOOST_ASSERT( t <= u && "error in slice indices" ); + template< class RandomAccessRange > + inline sliced_range + slice( RandomAccessRange& rng, std::size_t t, std::size_t u ) + { + BOOST_ASSERT( t <= u && "error in slice indices" ); BOOST_ASSERT( static_cast(boost::size(rng)) >= u && - "second slice index out of bounds" ); + "second slice index out of bounds" ); - return sliced_range(rng, t, u); - } + return sliced_range(rng, t, u); + } - template< class RandomAccessRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::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(boost::size(rng)) >= u && - "second slice index out of bounds" ); + template< class RandomAccessRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::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(boost::size(rng)) >= u && + "second slice index out of bounds" ); return sliced_range(rng, t, u); - } + } - template< class RandomAccessRange > - inline sliced_range - operator|( RandomAccessRange& r, const sliced& f ) - { - return sliced_range( r, f.t, f.u ); - } + template< class RandomAccessRange > + inline sliced_range + operator|( RandomAccessRange& r, const sliced& f ) + { + return sliced_range( r, f.t, f.u ); + } - template< class RandomAccessRange > - inline sliced_range - operator|( const RandomAccessRange& r, const sliced& f ) - { - return sliced_range( r, f.t, f.u ); - } + template< class RandomAccessRange > + inline sliced_range + operator|( const RandomAccessRange& r, const sliced& f ) + { + return sliced_range( r, f.t, f.u ); + } } // namespace adaptors } // namespace boost diff --git a/include/boost/range/adaptor/strided.hpp b/include/boost/range/adaptor/strided.hpp index 5f4c4fa..9bbd8ca 100755 --- a/include/boost/range/adaptor/strided.hpp +++ b/include/boost/range/adaptor/strided.hpp @@ -16,68 +16,119 @@ #include #include +#include + namespace boost { namespace range_detail { - template + template class strided_iterator : public iterator_adaptor< - strided_iterator, - BaseIterator> + strided_iterator + , BaseIterator + > { friend class iterator_core_access; typedef iterator_adaptor, BaseIterator> super_t; - + public: - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::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) { } - + typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type difference_type; + + strided_iterator() + : m_stride(), m_offset(), m_max_offset() + { + } + + explicit strided_iterator(BaseIterator base_it, + difference_type stride, + difference_type offset, + difference_type max_offset) + : super_t(base_it) + , m_stride(stride) + , m_offset(offset) + , m_max_offset(max_offset) + { + } + + template + strided_iterator(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) + : super_t(other) + , m_stride(other.m_stride) + , m_offset(other.m_offset) + , m_max_offset(other.m_max_offset) + { + } + strided_iterator& operator=(const strided_iterator& other) { super_t::operator=(other); - - // Is the interoperation of the stride safe? m_stride = other.m_stride; + m_offset = other.m_offset; + m_max_offset = other.m_max_offset; 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); } - + + void increment() + { + m_offset += m_stride; + if (m_offset <= m_max_offset) + std::advance(this->base_reference(), m_stride); + } + + void decrement() + { + m_offset -= m_stride; + if (m_offset >= 0) + std::advance(this->base_reference(), -m_stride); + } + + void advance(difference_type n) + { + n *= m_stride; + m_offset += n; + + if (m_offset >= 0 && m_offset <= m_max_offset) + std::advance(this->base_reference(), n); + } + + template + bool equal(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) const + { + return m_offset == other.m_offset; + } + difference_type distance_to(const strided_iterator& other) const { - return std::distance(this->base_reference(), other.base_reference()) / m_stride; + return (other.m_offset - m_offset) / m_stride; } - // Using the compiler generated copy constructor and - // and assignment operator - private: difference_type m_stride; + difference_type m_offset; + difference_type m_max_offset; }; - - template inline + + template inline strided_iterator make_strided_iterator( const BaseIterator& first, - BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type stride) + Difference stride, + typename std::iterator_traits::difference_type offset, + typename std::iterator_traits::difference_type max_offset + ) { - return strided_iterator(first, stride); + BOOST_ASSERT( stride >= 0 ); + BOOST_ASSERT( (stride == 0) || (offset % stride == 0) ); + BOOST_ASSERT( (stride == 0) || (max_offset % stride == 0) ); + BOOST_ASSERT( offset <= max_offset ); + return strided_iterator(first, stride, offset, max_offset); } template< class Rng > @@ -87,11 +138,33 @@ namespace boost typedef range_detail::strided_iterator::type> iter_type; typedef iterator_range super_t; public: - template< typename Difference > + template strided_range(Difference stride, Rng& rng) - : super_t(make_strided_iterator(boost::begin(rng), stride), - make_strided_iterator(boost::end(rng), stride)) + : super_t(make_super(stride, rng)) { + BOOST_ASSERT( stride >= 0 ); + } + + private: + template + static super_t make_super(const Difference stride, Rng& rng) + { + const Difference count = boost::size(rng); + const Difference max_count = max_offset(count, stride); + return super_t(make_strided_iterator(boost::begin(rng), stride, 0, max_count), + make_strided_iterator(boost::end(rng), stride, max_count, max_count)); + } + + template + static Difference max_offset(Difference sz, const Stride stride) + { + if (stride > 0) + { + sz += stride - 1; + sz /= stride; + sz *= stride; + } + return sz; } }; @@ -99,7 +172,7 @@ namespace boost class strided_holder : public holder { public: - strided_holder(Difference value) : holder(value) {} + explicit strided_holder(Difference value) : holder(value) {} }; template @@ -117,32 +190,32 @@ namespace boost } } // namespace range_detail - + using range_detail::strided_range; namespace adaptors { - + namespace { const range_detail::forwarder strided = range_detail::forwarder(); } - + template inline strided_range stride(Range& rng, Difference step) { return strided_range(step, rng); } - + template inline strided_range stride(const Range& rng, Difference step) { return strided_range(step, rng); } - + } // namespace 'adaptors' } // namespace 'boost' diff --git a/include/boost/range/adaptor/tokenized.hpp b/include/boost/range/adaptor/tokenized.hpp index 6b6a6fa..8a7402a 100755 --- a/include/boost/range/adaptor/tokenized.hpp +++ b/include/boost/range/adaptor/tokenized.hpp @@ -20,7 +20,7 @@ namespace boost { template< class R > - struct token_range : + struct tokenized_range : public boost::iterator_range< boost::regex_token_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -42,7 +42,7 @@ namespace boost public: template< class Regex, class Submatch, class Flag > - token_range( R& r, const Regex& re, const Submatch& sub, Flag f ) + tokenized_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() ) @@ -90,24 +90,24 @@ namespace boost }; template< class BidirectionalRng, class R, class S, class F > - inline token_range + inline tokenized_range operator|( BidirectionalRng& r, const regex_holder& f ) { - return token_range( r, f.re, f.sub, f.f ); + return tokenized_range( r, f.re, f.sub, f.f ); } template< class BidirectionalRng, class R, class S, class F > - inline token_range + inline tokenized_range operator|( const BidirectionalRng& r, const regex_holder& f ) { - return token_range( r, f.re, f.sub, f.f ); + return tokenized_range( r, f.re, f.sub, f.f ); } } // 'range_detail' - using range_detail::token_range; + using range_detail::tokenized_range; namespace adaptors { @@ -118,17 +118,17 @@ namespace boost } template - inline token_range + inline tokenized_range tokenize(BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) { - return token_range(rng, reg, sub, f); + return tokenized_range(rng, reg, sub, f); } template - inline token_range + inline tokenized_range tokenize(const BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) { - return token_range(rng, reg, sub, f); + return tokenized_range(rng, reg, sub, f); } } // 'adaptors' diff --git a/include/boost/range/adaptor/transformed.hpp b/include/boost/range/adaptor/transformed.hpp index 00297ca..ee4ab34 100755 --- a/include/boost/range/adaptor/transformed.hpp +++ b/include/boost/range/adaptor/transformed.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { @@ -21,17 +22,17 @@ namespace boost { template< class F, class R > - struct transform_range : - public boost::iterator_range< + struct transformed_range : + public boost::iterator_range< boost::transform_iterator< F, - BOOST_DEDUCED_TYPENAME range_iterator::type + BOOST_DEDUCED_TYPENAME range_iterator::type > > { private: - typedef boost::iterator_range< + typedef boost::iterator_range< boost::transform_iterator< F, - BOOST_DEDUCED_TYPENAME range_iterator::type + BOOST_DEDUCED_TYPENAME range_iterator::type > > base; @@ -39,11 +40,11 @@ namespace boost public: typedef F transform_fn_type; typedef R source_range_type; - - transform_range( F f, R& r ) + + transformed_range( F f, R& r ) : base( make_transform_iterator( boost::begin(r), f ), - make_transform_iterator( boost::end(r), f ) ) - + make_transform_iterator( boost::end(r), f ) ) + { } }; @@ -53,51 +54,51 @@ namespace boost transform_holder( T r ) : holder(r) { } }; - + template< class InputRng, class UnaryFunction > - inline transform_range - operator|( InputRng& r, + inline transformed_range + operator|( InputRng& r, const transform_holder& f ) { - return transform_range( f.val, r ); + return transformed_range( f.val, r ); } - + template< class InputRng, class UnaryFunction > - inline transform_range - operator|( const InputRng& r, + inline transformed_range + operator|( const InputRng& r, const transform_holder& f ) { - return transform_range( f.val, r ); + return transformed_range( f.val, r ); } - + } // 'range_detail' - using range_detail::transform_range; - + using range_detail::transformed_range; + namespace adaptors - { + { namespace { - const range_detail::forwarder - transformed = + const range_detail::forwarder + transformed = range_detail::forwarder(); } - + template - inline transform_range + inline transformed_range transform(InputRange& rng, UnaryFunction fn) { - return transform_range(fn, rng); + return transformed_range(fn, rng); } - + template - inline transform_range + inline transformed_range transform(const InputRange& rng, UnaryFunction fn) { - return transform_range(fn, rng); + return transformed_range(fn, rng); } } // 'adaptors' - + } #endif diff --git a/include/boost/range/adaptor/type_erased.hpp b/include/boost/range/adaptor/type_erased.hpp new file mode 100644 index 0000000..85bff73 --- /dev/null +++ b/include/boost/range/adaptor/type_erased.hpp @@ -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_TYPE_ERASED_HPP_INCLUDED +#define BOOST_RANGE_ADAPTOR_TYPE_ERASED_HPP_INCLUDED + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< + class Value, + class CategoryOrTraversal, + class Reference, + class Difference + > + class any_range + : public iterator_range< + IteratorTypeErasure::any_iterator< + Value, CategoryOrTraversal, Reference, Difference> > + { + typedef typename IteratorTypeErasure::any_iterator< + Value, CategoryOrTraversal, Reference, Difference> iterator_t; + + typedef iterator_range base_t; + public: + template + explicit any_range(Range& r) : base_t(r) {} + + template + explicit any_range(const Range& r) : base_t(r) {} + }; + + template + class any_range_generator + { + public: + typedef any_range< + BOOST_DEDUCED_TYPENAME range_value::type, + BOOST_DEDUCED_TYPENAME iterator_traversal< + BOOST_DEDUCED_TYPENAME range_iterator::type + >::type, + BOOST_DEDUCED_TYPENAME range_reference::type, + BOOST_DEDUCED_TYPENAME range_difference::type + > type; + }; + + class type_erased_tag {}; + + + } // namespace range_detail + + using range_detail::any_range; + + namespace adaptors + { + namespace + { + const range_detail::type_erased_tag type_erased = range_detail::type_erased_tag(); + } + + template + typename range_detail::any_range_generator::type + operator|(SinglePassRange& rng, range_detail::type_erased_tag) + { + typedef typename range_detail::any_range_generator::type range_t; + return range_t(rng); + } + + template + typename range_detail::any_range_generator::type + operator|(const SinglePassRange& rng, range_detail::type_erased_tag) + { + typedef typename range_detail::any_range_generator::type range_t; + return range_t(rng); + } + } +} // namespace boost + +#endif // include guard diff --git a/include/boost/range/adaptor/uniqued.hpp b/include/boost/range/adaptor/uniqued.hpp index ad6f7f4..40c8249 100755 --- a/include/boost/range/adaptor/uniqued.hpp +++ b/include/boost/range/adaptor/uniqued.hpp @@ -32,35 +32,35 @@ namespace boost }; template - class unique_range : public adjacent_filter_range + class uniqued_range : public adjacent_filtered_range { - typedef adjacent_filter_range base; + typedef adjacent_filtered_range base; public: - explicit unique_range(ForwardRng& rng) + explicit uniqued_range(ForwardRng& rng) : base(unique_not_equal_to(), rng) { } }; template< class ForwardRng > - inline unique_range + inline uniqued_range operator|( ForwardRng& r, unique_forwarder ) { - return unique_range(r); + return uniqued_range(r); } template< class ForwardRng > - inline unique_range + inline uniqued_range operator|( const ForwardRng& r, unique_forwarder ) { - return unique_range(r); + return uniqued_range(r); } } // 'range_detail' - using range_detail::unique_range; + using range_detail::uniqued_range; namespace adaptors { @@ -71,17 +71,17 @@ namespace boost } template - inline unique_range + inline uniqued_range unique(ForwardRange& rng) { - return unique_range(rng); + return uniqued_range(rng); } template - inline unique_range + inline uniqued_range unique(const ForwardRange& rng) { - return unique_range(rng); + return uniqued_range(rng); } } // 'adaptors' diff --git a/include/boost/range/algorithm/search_n.hpp b/include/boost/range/algorithm/search_n.hpp index b69bc6d..ca2b6ef 100755 --- a/include/boost/range/algorithm/search_n.hpp +++ b/include/boost/range/algorithm/search_n.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include namespace boost @@ -22,6 +23,218 @@ namespace boost namespace range { +namespace range_detail +{ + // Rationale: search_n is implemented rather than delegate to + // the standard library implementation because some standard + // library implementations are broken eg. MSVC. + + // search_n forward iterator version + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, Integer count, + const Value& value, std::forward_iterator_tag) + { + first = std::find(first, last, value); + while (first != last) + { + typename std::iterator_traits::difference_type n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && *i==value) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = std::find(++i, last, value); + } + return last; + } + + // search_n random-access iterator version + template + inline RandomAccessIterator + search_n_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + // look_ahead here is pointing to the last element of the + // next possible match + while (!(*look_ahead == value)) // skip loop... + { + if (tail_size < pattern_size) + return last; // no match + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + *back_track == value; --back_track) + { + if (--remainder == 0) + { + return look_ahead - skip_offset; // matched + } + } + if (remainder > tail_size) + return last; // no match + look_ahead += remainder; + tail_size -= remainder; + } + + return last; + } + + // search_n for forward iterators using a binary predicate + // to determine a match + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::forward_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + while (first != last && !static_cast(pred(*first, value))) + ++first; + + while (first != last) + { + difference_t n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && static_cast(pred(*i, value))) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = ++i; + while (first != last && !static_cast(pred(*first, value))) + ++first; + } + return last; + } + + // search_n for random-access iterators using a binary predicate + // to determine a match + template + inline RandomAccessIterator + search_n_pred_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + // look_ahead points to the last element of the next + // possible match + while (!static_cast(pred(*look_ahead, value))) // skip loop + { + if (tail_size < pattern_size) + return last; // no match + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + pred(*back_track, value); --back_track) + { + if (--remainder == 0) + return look_ahead -= skip_offset; // success + } + if (remainder > tail_size) + { + return last; // no match + } + look_ahead += remainder; + tail_size -= remainder; + } + } + + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value) + { + BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept)); + BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept::value_type>)); + //BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept2::value_type, Value>)); + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + return std::find(first, last, value); + return range_detail::search_n_impl(first, last, count, value, cat_t()); + } + + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred) + { + BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT(( + BinaryPredicateConcept< + BinaryPredicate, + typename std::iterator_traits::value_type, + Value> + )); + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + { + while (first != last && !static_cast(pred(*first, value))) + ++first; + return first; + } + return range_detail::search_n_pred_impl(first, last, count, + value, pred, cat_t()); + } +} // namespace range_detail + /// \brief template function search /// /// range-based version of the search std algorithm @@ -36,7 +249,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type search_n(ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); - return std::search_n(boost::begin(rng),boost::end(rng), count, value); + return range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value); } /// \overload @@ -45,7 +258,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type search_n(const ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); - return std::search_n(boost::begin(rng), boost::end(rng), count, value); + return range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value); } /// \overload @@ -58,7 +271,7 @@ search_n(ForwardRange& rng, Integer count, const Value& value, BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept::type, const Value&>)); - return std::search_n(boost::begin(rng), boost::end(rng), + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), count, value, binary_pred); } @@ -72,7 +285,7 @@ search_n(const ForwardRange& rng, Integer count, const Value& value, BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept::type, const Value&>)); - return std::search_n(boost::begin(rng), boost::end(rng), + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), count, value, binary_pred); } @@ -86,7 +299,7 @@ search_n(ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); return range_return:: - pack(std::search_n(boost::begin(rng),boost::end(rng), + pack(range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value), rng); } @@ -99,7 +312,7 @@ search_n(const ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value), rng); } @@ -116,7 +329,8 @@ search_n(ForwardRange& rng, Integer count, const Value& value, BOOST_DEDUCED_TYPENAME range_value::type, const Value&>)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), count, value, pred), rng); } @@ -133,7 +347,8 @@ search_n(const ForwardRange& rng, Integer count, const Value& value, BOOST_DEDUCED_TYPENAME range_value::type, const Value&>)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), count, value, pred), rng); } diff --git a/include/boost/range/algorithm/transform.hpp b/include/boost/range/algorithm/transform.hpp index 28f423d..fb03441 100755 --- a/include/boost/range/algorithm/transform.hpp +++ b/include/boost/range/algorithm/transform.hpp @@ -84,7 +84,7 @@ namespace boost { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); - return range_detail::transform_impl( + return boost::range_detail::transform_impl( boost::begin(rng1), boost::end(rng1), boost::begin(rng2), boost::end(rng2), out, fun); diff --git a/include/boost/range/combine.hpp b/include/boost/range/combine.hpp index 8b1be00..999bbc3 100755 --- a/include/boost/range/combine.hpp +++ b/include/boost/range/combine.hpp @@ -1,3 +1,11 @@ +// 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_COMBINE_HPP #define BOOST_RANGE_COMBINE_HPP diff --git a/include/boost/range/concepts.hpp b/include/boost/range/concepts.hpp index 8e4d2cf..d9f9bfc 100644 --- a/include/boost/range/concepts.hpp +++ b/include/boost/range/concepts.hpp @@ -98,8 +98,9 @@ namespace boost { // 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. + // Assignable or default constructable, 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 @@ -141,6 +142,23 @@ namespace boost { BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)); + + BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + Iterator i3(i++); + boost::ignore_unused_variable_warning(i3); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r2(*i++); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; #endif }; diff --git a/include/boost/range/counting_range.hpp b/include/boost/range/counting_range.hpp index bf22f7c..72733a2 100755 --- a/include/boost/range/counting_range.hpp +++ b/include/boost/range/counting_range.hpp @@ -1,13 +1,11 @@ -// 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) // -// 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 +// For more information, see http://www.boost.org/libs/range/ // - #ifndef BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED #define BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED diff --git a/include/boost/range/has_range_iterator.hpp b/include/boost/range/has_range_iterator.hpp new file mode 100644 index 0000000..b2bca39 --- /dev/null +++ b/include/boost/range/has_range_iterator.hpp @@ -0,0 +1,62 @@ +// 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_HAS_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(type); + + template + struct has_range_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_iterator_impl > >::type> + : boost::mpl::true_ + { + }; + + template + struct has_range_const_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_const_iterator_impl > >::type> + : boost::mpl::true_ + { + }; + + } // namespace range_detail + + template + struct has_range_iterator + : range_detail::has_range_iterator_impl + {}; + + template + struct has_range_const_iterator + : range_detail::has_range_const_iterator_impl + {}; +} // namespace boost + +#endif // include guard + diff --git a/include/boost/range/istream_range.hpp b/include/boost/range/istream_range.hpp index f0e9ef4..c3f2248 100755 --- a/include/boost/range/istream_range.hpp +++ b/include/boost/range/istream_range.hpp @@ -1,13 +1,11 @@ -// 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) // -// 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 +// For more information, see http://www.boost.org/libs/range/ // - #ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED #define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp index 497b1e3..ab1e80e 100755 --- a/include/boost/range/iterator_range_core.hpp +++ b/include/boost/range/iterator_range_core.hpp @@ -230,7 +230,7 @@ namespace boost difference_type size() const { - return m_End - m_Begin; + return std::distance(m_Begin, m_End); } bool empty() const @@ -290,6 +290,20 @@ namespace boost return *--last; } + // pop_front() - added to model the SinglePassRangePrimitiveConcept + void pop_front() + { + BOOST_ASSERT( !empty() ); + ++m_Begin; + } + + // pop_back() - added to model the BidirectionalRangePrimitiveConcept + void pop_back() + { + BOOST_ASSERT( !empty() ); + --m_End; + } + reference operator[]( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); diff --git a/include/boost/range/metafunctions.hpp b/include/boost/range/metafunctions.hpp old mode 100755 new mode 100644 index 5b25a8f..469d9ae --- a/include/boost/range/metafunctions.hpp +++ b/include/boost/range/metafunctions.hpp @@ -16,6 +16,7 @@ #endif #include +#include #include #include #include diff --git a/include/boost/range/size.hpp b/include/boost/range/size.hpp index 2b572d4..2636905 100644 --- a/include/boost/range/size.hpp +++ b/include/boost/range/size.hpp @@ -15,6 +15,7 @@ # pragma once #endif +#include #include #include #include @@ -22,13 +23,47 @@ namespace boost { - - template< class T > - inline BOOST_DEDUCED_TYPENAME range_difference::type size( const T& r ) + namespace range_detail { - BOOST_ASSERT( (boost::end( r ) - boost::begin( r )) >= 0 && - "reachability invariant broken!" ); - return boost::end( r ) - boost::begin( r ); + template< class SinglePassRange > + inline BOOST_DEDUCED_TYPENAME range_difference::type + size_impl(const SinglePassRange& rng, boost::single_pass_traversal_tag) + { + typedef BOOST_DEDUCED_TYPENAME range_difference::type diff_t; + + // A compilation error here will often indicate that an algorithm + // is attempting to use boost::size(rng) for a range that is not a + // model of the RandomAccessRange Concept and does not have a + // member size() function. + // The solution to this issue is to add a range_calculate_size() + // function for the range type that will be found via ADL. + return static_cast(rng.size()); + } + + template< class SinglePassRange > + inline BOOST_DEDUCED_TYPENAME range_difference::type + size_impl(const SinglePassRange& rng, boost::random_access_traversal_tag) + { + BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && + "reachability invariant broken!" ); + return boost::end(rng) - boost::begin(rng); + } + } // namespace range_detail + + template + inline BOOST_DEDUCED_TYPENAME range_difference::type + range_calculate_size(const SinglePassRange& rng) + { + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iter_t; + typedef BOOST_DEDUCED_TYPENAME iterator_traversal::type traversal_tag; + return range_detail::size_impl(rng, traversal_tag()); + } + + template + inline BOOST_DEDUCED_TYPENAME range_difference::type + size(const SinglePassRange& rng) + { + return range_calculate_size(rng); } } // namespace 'boost' diff --git a/index.html b/index.html index 2a17910..29b7f42 100644 --- a/index.html +++ b/index.html @@ -11,3 +11,6 @@ Automatic redirection failed, please go to doc/html/index.html + + + diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 645f5f9..b52d869 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -137,6 +137,8 @@ test-suite range : [ range-test const_ranges ] [ range-test counting_range ] [ range-test extension_mechanism ] + [ range-test extension_size ] + [ range-test has_range_iterator ] [ range-test irange ] [ range-test istream_range ] [ range-test iterator_pair ] diff --git a/test/adaptor_test/strided.cpp b/test/adaptor_test/strided.cpp index e09e0fb..04f1f21 100644 --- a/test/adaptor_test/strided.cpp +++ b/test/adaptor_test/strided.cpp @@ -8,6 +8,9 @@ // // For more information, see http://www.boost.org/libs/range/ // +// The strided_defect_Trac5014 test case is a modified version of a test case +// contribued by Michel Morin as part of the trac ticket. +// #include #include @@ -24,35 +27,44 @@ namespace boost { namespace { - const int STRIDE_SIZE = 2; - template< class Container > - void strided_test_impl( Container& c ) + void strided_test_impl( Container& c, int stride_size ) { using namespace boost::adaptors; - BOOST_ASSERT( c.size() % STRIDE_SIZE == 0 ); + // Rationale: + // This requirement was too restrictive. It makes the use of the + // strided adaptor too dangerous, and a simple solution existed + // to make it safe, hence the strided adaptor has been modified + // and this restriction no longer applies. + //BOOST_ASSERT( c.size() % STRIDE_SIZE == 0 ); Container reference; { typedef BOOST_DEDUCED_TYPENAME Container::const_iterator iterator_t; + typedef BOOST_DEDUCED_TYPENAME Container::difference_type diff_t; + typedef BOOST_DEDUCED_TYPENAME Container::size_type size_type; iterator_t it = c.begin(); - for (iterator_t last = c.end(); - it != last; it += STRIDE_SIZE) + + iterator_t last = c.end(); + for (; it != last; ) { reference.push_back(*it); + + for (int i = 0; (it != last) && (i < stride_size); ++i) + ++it; } } Container test; - boost::push_back( test, c | strided(2) ); + boost::push_back( test, c | strided(stride_size) ); BOOST_CHECK_EQUAL_COLLECTIONS( test.begin(), test.end(), reference.begin(), reference.end() ); Container test2; - boost::push_back( test2, adaptors::stride(c, 2) ); + boost::push_back( test2, adaptors::stride(c, stride_size) ); BOOST_CHECK_EQUAL_COLLECTIONS( test2.begin(), test2.end(), reference.begin(), reference.end() ); @@ -60,41 +72,193 @@ namespace boost // Test the const versions: const Container& cc = c; Container test3; - boost::push_back( test3, cc | strided(2) ); + boost::push_back( test3, cc | strided(stride_size) ); BOOST_CHECK_EQUAL_COLLECTIONS( test3.begin(), test3.end(), reference.begin(), reference.end() ); Container test4; - boost::push_back( test4, adaptors::stride(cc, 2) ); + boost::push_back( test4, adaptors::stride(cc, stride_size) ); BOOST_CHECK_EQUAL_COLLECTIONS( test4.begin(), test4.end(), reference.begin(), reference.end() ); } template< class Container > - void strided_test_impl() + void strided_test_impl(int stride_size) { using namespace boost::assign; Container c; // Test empty - strided_test_impl(c); + strided_test_impl(c, stride_size); // Test two elements c += 1,2; - strided_test_impl(c); + strided_test_impl(c, stride_size); // Test many elements c += 1,1,1,2,2,3,4,5,6,6,6,7,8,9; - strided_test_impl(c); + strided_test_impl(c, stride_size); + + // Test an odd number of elements to determine that the relaxation + // of the requirements has been successful + // Test a sequence of length 1 with a stride of 2 + c.clear(); + c += 1; + strided_test_impl(c, stride_size); + + // Test a sequence of length 2 with a stride of 2 + c.clear(); + c += 1,2; + strided_test_impl(c, stride_size); + + // Test a sequence of length 3 with a stride of 2 + c.clear(); + c += 1,2,3; + strided_test_impl(c, stride_size); + } + + template + void strided_test_zero_stride() + { + Container c; + c.push_back(1); + + typedef boost::strided_range strided_range_t; + strided_range_t rng( boost::adaptors::stride(c, 0) ); + typedef typename boost::range_iterator::type iter_t; + + iter_t first(boost::begin(c), 0, 0, boost::size(c)); + iter_t last(boost::end(c), 0, boost::size(c), boost::size(c)); + + iter_t it = first; + for (int i = 0; i < 10; ++i, ++it) + { + BOOST_CHECK(it == first); + } + } + + template + void strided_test_impl() + { + strided_test_zero_stride< Container >(); + + const int MAX_STRIDE_SIZE = 10; + for (int stride_size = 1; stride_size <= MAX_STRIDE_SIZE; ++stride_size) + { + strided_test_impl< Container >(stride_size); + } } void strided_test() { - strided_test_impl< std::vector< int > >(); - strided_test_impl< std::deque< int > >(); + strided_test_impl< std::vector >(); + strided_test_impl< std::deque >(); + strided_test_impl< std::list >(); + } + + void strided_defect_Trac5014() + { + using namespace boost::assign; + + std::vector v; + for (int i = 0; i < 30; ++i) + v.push_back(i); + + std::vector reference; + reference += 0,4,8,12,16,20,24,28; + + std::vector output; + boost::push_back(output, v | boost::adaptors::strided(4)); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + output.begin(), output.end() ); + + BOOST_CHECK_EQUAL( output.back(), 28 ); + } + + template + class strided_mock_iterator + : public boost::iterator_adaptor< + strided_mock_iterator + , BaseIterator + , boost::use_default + , Category + > + { + typedef boost::iterator_adaptor< + strided_mock_iterator + , BaseIterator + , boost::use_default + , Category + > super_t; + public: + explicit strided_mock_iterator(BaseIterator it) + : super_t(it) + { + } + + private: + void increment() + { + ++(this->base_reference()); + } + + bool equal(const strided_mock_iterator& other) const + { + return this->base() == other.base(); + } + + BOOST_DEDUCED_TYPENAME super_t::reference dereference() const + { + return *(this->base()); + } + + friend class boost::iterator_core_access; + }; + + template + boost::iterator_range::type, Category> > + as_mock_range(Range& rng) + { + typedef BOOST_DEDUCED_TYPENAME boost::range_iterator::type range_iter_t; + typedef strided_mock_iterator mock_iter_t; + + return boost::iterator_range( + mock_iter_t(boost::begin(rng)), + mock_iter_t(boost::end(rng))); + } + + void strided_test_traversal() + { + using namespace boost::assign; + + std::vector v; + for (int i = 0; i < 30; ++i) + v.push_back(i); + + std::vector reference; + reference += 0,4,8,12,16,20,24,28; + + std::vector output; + boost::push_back(output, as_mock_range(v) | boost::adaptors::strided(4)); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + output.begin(), output.end() ); + + output.clear(); + boost::push_back(output, as_mock_range(v) | boost::adaptors::strided(4)); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + output.begin(), output.end() ); + + output.clear(); + boost::push_back(output, as_mock_range(v) | boost::adaptors::strided(4)); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + output.begin(), output.end() ); } } } @@ -106,6 +270,8 @@ init_unit_test_suite(int argc, char* argv[]) = BOOST_TEST_SUITE( "RangeTestSuite.adaptor.strided" ); test->add( BOOST_TEST_CASE( &boost::strided_test ) ); + test->add( BOOST_TEST_CASE( &boost::strided_defect_Trac5014 ) ); + test->add( BOOST_TEST_CASE( &boost::strided_test_traversal ) ); return test; } diff --git a/test/adaptors.cpp b/test/adaptors.cpp index ed2f915..ea0f503 100644 --- a/test/adaptors.cpp +++ b/test/adaptors.cpp @@ -67,9 +67,8 @@ void check_copy( Rng r ) } - template< class Rng > -void check() +void check_direct() { using namespace boost::adaptors; @@ -104,7 +103,6 @@ void check() } - template< class IndirectRng > void check_indirect() { @@ -189,8 +187,8 @@ void check_regex() void check_adaptors() { - check< std::vector >(); - check< std::list >(); + check_direct< std::vector >(); + check_direct< std::list >(); check_indirect< std::vector >(); check_indirect< std::list >(); diff --git a/test/algorithm_test/count_if.cpp b/test/algorithm_test/count_if.cpp index c3d1b8b..a2e8983 100644 --- a/test/algorithm_test/count_if.cpp +++ b/test/algorithm_test/count_if.cpp @@ -72,9 +72,9 @@ namespace boost BOOST_CHECK_EQUAL( 0u, boost::count_if(cref_cont, false_predicate()) ); BOOST_CHECK_EQUAL( 0u, boost::count_if(boost::make_iterator_range(cont), false_predicate()) ); - BOOST_CHECK_EQUAL( cont.size(), boost::count_if(cont, true_predicate()) ); - BOOST_CHECK_EQUAL( cont.size(), boost::count_if(cref_cont, true_predicate()) ); - BOOST_CHECK_EQUAL( cont.size(), boost::count_if(boost::make_iterator_range(cont), true_predicate()) ); + BOOST_CHECK_EQUAL( boost::size(cont), boost::count_if(cont, true_predicate()) ); + BOOST_CHECK_EQUAL( boost::size(cont), boost::count_if(cref_cont, true_predicate()) ); + BOOST_CHECK_EQUAL( boost::size(cont), boost::count_if(boost::make_iterator_range(cont), true_predicate()) ); } void test_count_if() diff --git a/test/algorithm_test/search_n.cpp b/test/algorithm_test/search_n.cpp index 3b0aa91..246d397 100644 --- a/test/algorithm_test/search_n.cpp +++ b/test/algorithm_test/search_n.cpp @@ -21,6 +21,104 @@ namespace { + template + inline ForwardIterator + reference_search_n(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value) + { + if (count <= 0) + return first; + else if (count == 1) + return std::find(first, last, value); + else + { + first = std::find(first, last, value); + while (first != last) + { + typename std::iterator_traits::difference_type n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && *i==value) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = std::find(++i, last, value); + } + } + return last; + } + + template + inline ForwardIterator + reference_search_n(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred) + { + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + { + while (first != last && !static_cast(pred(*first, value))) + ++first; + return first; + } + else + { + typedef typename std::iterator_traits::difference_type difference_t; + + while (first != last && !static_cast(pred(*first, value))) + ++first; + + while (first != last) + { + difference_t n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && static_cast(pred(*i, value))) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = ++i; + while (first != last && !static_cast(pred(*first, value))) + ++first; + } + } + return last; + } + + template< class Container1, class Value, class Pred > + void test_search_n_pred_impl(Container1& cont1, Value value, Pred pred) + { + typedef BOOST_DEDUCED_TYPENAME Container1::const_iterator const_iterator1_t; + typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1_t; + + const Container1& ccont1 = cont1; + + for (std::size_t n = 0; n < cont1.size(); ++n) + { + iterator1_t it = boost::search_n(cont1, n, value, pred); + BOOST_CHECK( it == boost::search_n(boost::make_iterator_range(cont1), n, value, pred) ); + BOOST_CHECK( it == reference_search_n(cont1.begin(), cont1.end(), n, value, pred) ); + + const_iterator1_t cit = boost::search_n(ccont1, n, value, pred); + BOOST_CHECK( cit == boost::search_n(boost::make_iterator_range(ccont1), n, value, pred) ); + BOOST_CHECK( cit == reference_search_n(ccont1.begin(), ccont1.end(), n, value, pred) ); + } + } + template< class Container1, class Value > void test_search_n_impl(Container1& cont1, Value value) { @@ -33,12 +131,17 @@ namespace { iterator1_t it = boost::search_n(cont1, n, value); BOOST_CHECK( it == boost::search_n(boost::make_iterator_range(cont1), n, value) ); - BOOST_CHECK( it == std::search_n(cont1.begin(), cont1.end(), n, value) ); + BOOST_CHECK( it == reference_search_n(cont1.begin(), cont1.end(), n, value) ); const_iterator1_t cit = boost::search_n(ccont1, n, value); BOOST_CHECK( cit == boost::search_n(boost::make_iterator_range(ccont1), n, value) ); - BOOST_CHECK( cit == std::search_n(ccont1.begin(), ccont1.end(), n, value) ); + BOOST_CHECK( cit == reference_search_n(ccont1.begin(), ccont1.end(), n, value) ); } + + test_search_n_pred_impl(cont1, value, std::less()); + test_search_n_pred_impl(cont1, value, std::greater()); + test_search_n_pred_impl(cont1, value, std::equal_to()); + test_search_n_pred_impl(cont1, value, std::not_equal_to()); } template< class Container1, class Container2 > diff --git a/test/extension_size.cpp b/test/extension_size.cpp new file mode 100644 index 0000000..988e557 --- /dev/null +++ b/test/extension_size.cpp @@ -0,0 +1,122 @@ +// Boost.Range library +// +// 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 +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + + +#include + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# pragma warn -8091 // supress warning in Boost.Test +# pragma warn -8057 // unused argument argc/argv in Boost.Test +#endif + +#include +#include +#include +#include +#include + +namespace boost_range_extension_size_test +{ + class FooWithoutMemberSize + { + typedef std::list impl_t; + typedef impl_t::const_iterator const_iterator; + typedef impl_t::iterator iterator; + + public: + friend inline const_iterator range_begin(const FooWithoutMemberSize& obj) { return obj.m_impl.begin(); } + friend inline iterator range_begin(FooWithoutMemberSize& obj) { return obj.m_impl.begin(); } + friend inline const_iterator range_end(const FooWithoutMemberSize& obj) { return obj.m_impl.end(); } + friend inline iterator range_end(FooWithoutMemberSize& obj){ return obj.m_impl.end(); } + + private: + impl_t m_impl; + }; + + boost::range_difference >::type + inline range_calculate_size(const FooWithoutMemberSize& rng) + { + return 2u; + } +} + +namespace boost +{ + template<> struct range_iterator + { + typedef std::list::const_iterator type; + }; + + template<> struct range_iterator< ::boost_range_extension_size_test::FooWithoutMemberSize > + { + typedef std::list::iterator type; + }; +} + +namespace +{ + +void check_size_works_with_less_than_random_access() +{ + std::list container; + container.push_back(1); + BOOST_CHECK_EQUAL( boost::size(container), 1u ); +} + +void check_size_works_with_random_access() +{ + std::vector container; + container.push_back(1); + BOOST_CHECK_EQUAL( boost::size(container), 1u ); +} + +class FooWithMemberSize +{ +public: + typedef std::list impl_t; + typedef impl_t::const_iterator const_iterator; + typedef impl_t::iterator iterator; + typedef impl_t::value_type value_type; + + std::size_t size() const { return 1u; } + const_iterator begin() const { return m_impl.begin(); } + iterator begin() { return m_impl.begin(); } + const_iterator end() const { return m_impl.end(); } + iterator end() { return m_impl.end(); } + +private: + std::list m_impl; +}; + +void check_extension_size() +{ + BOOST_CHECK_EQUAL( boost::size(FooWithMemberSize()), 1u ); + BOOST_CHECK_EQUAL( boost::size(boost_range_extension_size_test::FooWithoutMemberSize()), 2u ); +} + +} // anonymous namespace + +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( &check_size_works_with_less_than_random_access )); + test->add( BOOST_TEST_CASE( &check_size_works_with_random_access )); + test->add( BOOST_TEST_CASE( &check_extension_size ) ); + + return test; +} + + + + + diff --git a/test/has_range_iterator.cpp b/test/has_range_iterator.cpp new file mode 100644 index 0000000..eabb630 --- /dev/null +++ b/test/has_range_iterator.cpp @@ -0,0 +1,57 @@ +// 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 + +#include +#include + +#include + +namespace +{ + class MockClassWithoutIterators {}; + + template + void test_has_range_iterator_impl(const bool expected_value) + { + BOOST_CHECK_EQUAL( boost::has_range_iterator::value, expected_value ); + } + + template + void test_has_range_const_iterator_impl(const bool expected_value) + { + BOOST_CHECK_EQUAL( boost::has_range_const_iterator::value, expected_value ); + } + + void test_has_range_iterator() + { + test_has_range_iterator_impl< std::vector >(true); + test_has_range_iterator_impl< MockClassWithoutIterators >(false); + } + + void test_has_range_const_iterator() + { + test_has_range_const_iterator_impl< std::vector >(true); + test_has_range_const_iterator_impl< MockClassWithoutIterators >(false); + } +} + +boost::unit_test::test_suite* +init_unit_test_suite(int argc, char* argv[]) +{ + boost::unit_test::test_suite* test + = BOOST_TEST_SUITE( "RangeTestSuite.has_range_iterator" ); + + test->add(BOOST_TEST_CASE(&test_has_range_iterator)); + test->add(BOOST_TEST_CASE(&test_has_range_const_iterator)); + + return test; +} diff --git a/test/replace_copy.cpp b/test/replace_copy.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/test/string.cpp b/test/string.cpp index f73abb0..f838519 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -42,7 +42,7 @@ namespace typedef std::size_t size_type; typedef value_type array_t[Length]; typedef const value_type const_array_t[Length]; - + explicit test_string(const CharT literal_sz[]) { std::copy(literal_sz, literal_sz + Length, m_buffer.data()); @@ -62,35 +62,35 @@ template< class T > inline BOOST_DEDUCED_TYPENAME boost::range_iterator::type str_begin( T& r ) { - return boost::begin( boost::as_literal(r) ); + return boost::begin( boost::as_literal(r) ); } template< class T > inline BOOST_DEDUCED_TYPENAME boost::range_iterator::type str_end( T& r ) { - return boost::end( boost::as_literal(r) ); + return boost::end( boost::as_literal(r) ); } template< class T > -inline BOOST_DEDUCED_TYPENAME boost::range_size::type +inline BOOST_DEDUCED_TYPENAME boost::range_difference::type str_size( const T& r ) { - return boost::size( boost::as_literal(r) ); + return boost::size( boost::as_literal(r) ); } template< class T > inline bool str_empty( T& r ) { - return boost::empty( boost::as_literal(r) ); + return boost::empty( boost::as_literal(r) ); } template< typename Container, typename T > BOOST_DEDUCED_TYPENAME boost::range_iterator::type find( Container& c, T value ) { - return std::find( str_begin(c), str_end(c), + return std::find( str_begin(c), str_end(c), value ); } @@ -98,16 +98,16 @@ template< typename Container, typename T > BOOST_DEDUCED_TYPENAME boost::range_iterator::type find( const Container& c, T value ) { - return std::find( str_begin(c), str_end(c), + return std::find( str_begin(c), str_end(c), value ); } template< typename Container, typename T > BOOST_DEDUCED_TYPENAME boost::range_iterator::type find_mutable( Container& c, T value ) -{ +{ str_size( c ); - return std::find( str_begin(c), str_end(c), + return std::find( str_begin(c), str_end(c), value ); } @@ -116,15 +116,15 @@ BOOST_DEDUCED_TYPENAME boost::range_iterator::type find_const( const Container& c, T value ) { str_size( c ); - return std::find( str_begin(c), str_end(c), + return std::find( str_begin(c), str_end(c), value ); } -std::vector +std::vector check_rvalue_return() { - return std::vector( 10, 'm' ); + return std::vector( 10, 'm' ); } using namespace boost; @@ -132,44 +132,45 @@ using namespace boost; void check_char() { + typedef boost::range_difference::type diff_t; typedef char* char_iterator_t; typedef char char_array_t[10]; - + test_string a_string("a string"); test_string another_string("another string"); const char* char_s = a_string.const_sz(); char my_string[] = "another_string"; const char my_const_string[] = "another string"; - const unsigned my_string_length = 14; + const diff_t my_string_length = 14; char* char_s2 = a_string.mutable_sz(); - - BOOST_STATIC_ASSERT(( is_same< range_value::type, + + BOOST_STATIC_ASSERT(( is_same< range_value::type, detail::iterator_traits::value_type>::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, char_iterator_t >::value )); - BOOST_STATIC_ASSERT(( is_same< range_difference::type, + BOOST_STATIC_ASSERT(( is_same< range_difference::type, ::std::ptrdiff_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_size::type, std::size_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, char_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const char* >::value )); - - BOOST_STATIC_ASSERT(( is_same< range_value::type, + + BOOST_STATIC_ASSERT(( is_same< range_value::type, char>::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, char* >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const char* >::value )); - BOOST_STATIC_ASSERT(( is_same< range_difference::type, + BOOST_STATIC_ASSERT(( is_same< range_difference::type, ::std::ptrdiff_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_size::type, std::size_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, char* >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const char* >::value )); BOOST_CHECK_EQUAL( str_begin( char_s ), char_s ); - std::size_t sz = str_size(char_s); - const char* str_end1 = str_begin( char_s ) + sz; + const diff_t sz = str_size(char_s); + const char* str_end1 = str_begin( char_s ) + sz; BOOST_CHECK_EQUAL( str_end( char_s ), str_end1 ); BOOST_CHECK_EQUAL( str_empty( char_s ), (char_s == 0 || char_s[0] == char()) ); - BOOST_CHECK_EQUAL( sz, std::char_traits::length( char_s ) ); + BOOST_CHECK_EQUAL( sz, static_cast(std::char_traits::length(char_s)) ); BOOST_CHECK_EQUAL( str_begin( my_string ), my_string ); range_iterator::type str_end2 = str_begin( my_string ) + str_size(my_string); @@ -177,7 +178,7 @@ void check_char() BOOST_CHECK_EQUAL( str_end3, str_end2 ); BOOST_CHECK_EQUAL( str_empty( my_string ), (my_string == 0 || my_string[0] == char()) ); BOOST_CHECK_EQUAL( str_size( my_string ), my_string_length ); - BOOST_CHECK_EQUAL( str_size( my_string ), std::char_traits::length( my_string ) ); + BOOST_CHECK_EQUAL( str_size( my_string ), static_cast(std::char_traits::length(my_string)) ); char to_search = 'n'; BOOST_CHECK( find_mutable( char_s, to_search ) != str_end( char_s ) ); @@ -186,7 +187,7 @@ void check_char() BOOST_CHECK( find_mutable( my_string, to_search ) != str_end(my_string) ); BOOST_CHECK( find_const( my_string, to_search ) != str_end(my_string) ); - BOOST_CHECK( find_mutable( char_s2, to_search ) != str_end(char_s) ); + BOOST_CHECK( find_mutable( char_s2, to_search ) != str_end(char_s) ); BOOST_CHECK( find_const( char_s2, to_search ) != str_end(char_s2) ); BOOST_CHECK( find_const( as_array( my_string ), to_search ) != str_end(my_string) ); @@ -212,32 +213,33 @@ void check_char() void check_string() { check_char(); - + #ifndef BOOST_NO_STD_WSTRING typedef wchar_t* wchar_iterator_t; test_string a_wide_string(L"a wide string"); test_string another_wide_string(L"another wide string"); - + const wchar_t* char_ws = a_wide_string.const_sz(); wchar_t my_wstring[] = L"another wide string"; wchar_t* char_ws2 = a_wide_string.mutable_sz(); - - BOOST_STATIC_ASSERT(( is_same< range_value::type, + + BOOST_STATIC_ASSERT(( is_same< range_value::type, detail::iterator_traits::value_type>::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const wchar_t* >::value )); - BOOST_STATIC_ASSERT(( is_same< range_difference::type, + BOOST_STATIC_ASSERT(( is_same< range_difference::type, detail::iterator_traits::difference_type >::value )); BOOST_STATIC_ASSERT(( is_same< range_size::type, std::size_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const wchar_t* >::value )); - - std::size_t sz = str_size( char_ws ); + + typedef boost::range_difference::type diff_t; + const diff_t sz = str_size( char_ws ); BOOST_CHECK_EQUAL( str_begin( char_ws ), char_ws ); BOOST_CHECK_EQUAL( str_end(char_ws), (str_begin( char_ws ) + sz) ); BOOST_CHECK_EQUAL( str_empty( char_ws ), (char_ws == 0 || char_ws[0] == wchar_t()) ); - BOOST_CHECK_EQUAL( sz, std::char_traits::length( char_ws ) ); + BOOST_CHECK_EQUAL( sz, static_cast(std::char_traits::length(char_ws)) ); wchar_t to_search = L'n'; BOOST_CHECK( find( char_ws, to_search ) != str_end(char_ws) ); @@ -250,10 +252,10 @@ void check_string() #else boost::ignore_unused_variable_warning( my_wstring ); - -#endif + #endif - +#endif + find( check_rvalue_return(), 'n' ); } diff --git a/test/test_driver/range_return_test_driver.hpp b/test/test_driver/range_return_test_driver.hpp index eb52474..bcd2533 100644 --- a/test/test_driver/range_return_test_driver.hpp +++ b/test/test_driver/range_return_test_driver.hpp @@ -26,7 +26,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, Iterator test_it, @@ -43,7 +43,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, Iterator test_it, @@ -64,7 +64,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, Iterator test_it, @@ -93,7 +93,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, Iterator test_it, @@ -122,7 +122,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -149,7 +149,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -182,7 +182,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -212,7 +212,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -236,7 +236,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -270,7 +270,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -304,7 +304,7 @@ namespace boost struct check_results { template< class Container, class Iterator > - static void check( + static void test( Container& test, Container& reference, iterator_range test_rng, @@ -375,8 +375,8 @@ namespace boost iterator_t range_result = policy.test_iter(test); iterator_t reference_it = policy.reference(reference); - check_results::check(test, reference, - range_result, reference_it); + check_results::test(test, reference, + range_result, reference_it); } template< range_return_value result_type, class Container, class TestPolicy > @@ -394,8 +394,8 @@ namespace boost range_return_t range_result = test_range_t()(policy, test_cont); iterator_t reference_it = policy.reference(reference); - check_results::check(test_cont, reference, - range_result, reference_it); + check_results::test(test_cont, reference, + range_result, reference_it); } }; };