Squashed 'third_party/boostorg/range/' content from commit 4cfd4d8
Change-Id: I641c49f21039952b16f888223a952503e43a28a9
git-subtree-dir: third_party/boostorg/range
git-subtree-split: 4cfd4d8287ca949d7f29256adf3e796a0d1775ec
diff --git a/doc/reference/adaptors/adjacent_filtered.qbk b/doc/reference/adaptors/adjacent_filtered.qbk
new file mode 100644
index 0000000..312646c
--- /dev/null
+++ b/doc/reference/adaptors/adjacent_filtered.qbk
@@ -0,0 +1,32 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::adjacent_filtered(bi_pred)`]]
+ [[Function] [`boost::adaptors::adjacent_filter(rng, bi_pred)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is convertible to both argument types of `bi_pred`.
+* [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `bi_pred(x,y)` is `true`.
+* [*Throws:] Whatever the copy constructor of `bi_pred` might throw.
+* [*Range Category:] __forward_range__
+* [*Return Type:] `boost::adjacent_filtered_range<decltype(rng), decltype(bi_pred)>`
+* [*Returned Range Category:] The minimum of the range category of `rng` and __forward_range__
+
+[section:adjacent_filtered_example adjacent_filtered example]
+[import ../../../test/adaptor_test/adjacent_filtered_example.cpp]
+[adjacent_filtered_example]
+[endsect]
+
+This would produce the output:
+``
+1,2,3,4,5,6,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/copied.qbk b/doc/reference/adaptors/copied.qbk
new file mode 100644
index 0000000..2a8abcc
--- /dev/null
+++ b/doc/reference/adaptors/copied.qbk
@@ -0,0 +1,30 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::copied(n, m)`]]
+ [[Function] [`boost::adaptors::copy(rng, n, m)`]]
+]
+
+* [*Precondition:] `0 <= n && n <= m && m < distance(rng)`
+* [*Returns:] A new `iterator_range` that holds the sliced range `[n,m)` of the original range.
+* [*Range Category:] __random_access_range__
+* [*Returned Range Category:] __random_access_range__
+
+[section:copied_example copied example]
+[import ../../../test/adaptor_test/copied_example.cpp]
+[copied_example]
+[endsect]
+
+This would produce the output:
+``
+2,3,4,5,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/examples/indirected.cpp b/doc/reference/adaptors/examples/indirected.cpp
new file mode 100644
index 0000000..efb9d13
--- /dev/null
+++ b/doc/reference/adaptors/examples/indirected.cpp
@@ -0,0 +1,32 @@
+// 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 <boost/range/adaptor/indirected.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/shared_ptr.hpp>
+#include <algorithm>
+#include <iostream>
+#include <vector>
+
+int main(int argc, const char* argv[])
+{
+ using namespace boost::adaptors;
+
+ std::vector<boost::shared_ptr<int> > input;
+
+ for (int i = 0; i < 10; ++i)
+ input.push_back(boost::shared_ptr<int>(new int(i)));
+
+ boost::copy(
+ input | indirected,
+ std::ostream_iterator<int>(std::cout, ","));
+
+ return 0;
+}
+
diff --git a/doc/reference/adaptors/filtered.qbk b/doc/reference/adaptors/filtered.qbk
new file mode 100644
index 0000000..4ca3f91
--- /dev/null
+++ b/doc/reference/adaptors/filtered.qbk
@@ -0,0 +1,32 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::filtered(pred)`]]
+ [[Function] [`boost::adaptors::filter(rng, pred)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is convertible to the argument type of `pred`.
+* [*Postcondition:] For all elements `[x]` in the returned range, `pred(x)` is `true`.
+* [*Throws:] Whatever the copy constructor of `pred` might throw.
+* [*Range Category:] __singlepass_range__
+* [*Range Return Type:] `boost::filtered_range<decltype(rng)>`
+* [*Returned Range Category:] The minimum of the range category of `rng` and __bidirectional_range__
+
+[section:filtered_example filtered example]
+[import ../../../test/adaptor_test/filtered_example.cpp]
+[filtered_example]
+[endsect]
+
+This would produce the output:
+``
+2,4,6,8,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/formatted.qbk b/doc/reference/adaptors/formatted.qbk
new file mode 100644
index 0000000..9dd69c2
--- /dev/null
+++ b/doc/reference/adaptors/formatted.qbk
@@ -0,0 +1,51 @@
+[/
+ Copyright 2014 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:formatted formatted]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::formatted()`]]
+ [[Pipe] [`rng | boost::adaptors::formatted(sep)`]]
+ [[Pipe] [`rng | boost::adaptors::formatted(sep, prefix)`]]
+ [[Pipe] [`rng | boost::adaptors::formatted(sep, prefix, postfix)`]]
+ [[Function] [`boost::adaptors::format(rng)`]]
+ [[Function] [`boost::adaptors::format(rng, sep)`]]
+ [[Function] [`boost::adaptors::format(rng, sep, prefix)`]]
+ [[Function] [`boost::adaptors::format(rng, sep, prefix, postfix)`]]
+]
+
+This adaptor produces a range that can be output streamed to a
+`std::basic_ostream` to produce the output string formatted output. With the
+default paramters given numbers 1 to 5 inclusively in a range the output when
+streamed would be "{0,1,2,3,4,5}". The prefix, separator and postfix may be
+passed as parameters.
+
+The general format of the output is thus:
+<prefix><element_1><sep><element_2><sep>...<element_n><postfix>
+
+* [*Precondition:]
+ * `0 <= n`.
+ * `sep` has a type that is CopyConstructible and able to be streamed to `std::basic_ostream<Char,Traits>`
+ * `prefix` has a type that is CopyConstructible and able to be streamed to `std::basic_ostream<Char,Traits>`
+ * `postfix` has a type that is CopyConstructible and able to be streamed to `std::basic_ostream<Char,Traits>`
+* [*Returns:] `boost::range::formatted_range<Iter, Sep, Prefix, Postfix>` where
+`Iter` is `typename boost::range_iterator<Rng>::type`, `Sep` is the separator
+type, `Prefix` is the prefix type and `Postfix` is the postfix type.
+* [*Range Category:] __single_pass_range__
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:formatted_example formatted example]
+[import ../../../test/adaptor_test/formatted_example.cpp]
+[separated_example]
+[endsect]
+
+This would produce the output:
+``
+{1,2,3,4,5}
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/indexed.qbk b/doc/reference/adaptors/indexed.qbk
new file mode 100644
index 0000000..4503fe6
--- /dev/null
+++ b/doc/reference/adaptors/indexed.qbk
@@ -0,0 +1,84 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::indexed()`]]
+ [[Pipe] [`rng | boost::adaptors::indexed(start_index)`]]
+ [[Function] [`boost::adaptors::index(rng)`]]
+ [[Function] [`boost::adaptors::index(rng, start_index)`]]
+]
+
+[heading Description]
+The index within each returned `boost::range::index_value` is equal to
+`start_index` + the offset of the element from the beginning of the range. In
+the versions of the functions that omit `start_index` the starting index is
+taken to be `0`.
+
+* [*Purpose:] Adapt `rng` to return elements that have the corresponding value
+from `rng` and a numeric index.
+* [*Returns:] A range adapted to return both the element and the associated
+index. The returned range has elements of type:
+
+``
+boost::range::index_value<
+ typename boost::range_reference<decltype(rng)>::type,
+ typename boost::range_difference<decltype(rng)>::type
+>
+``
+
+The synopsis of index_value is as follows:
+``
+template<class T, class Indexable=std::ptrdiff_t>
+class index_value : public boost::tuple<Indexable, T>
+{
+public:
+
+ typedef ...unspecified... index_type;
+ typedef ...unspecified... const_index_type;
+
+ typedef ...unspecified... value_type;
+ typedef ...unspecified... const_value_type;
+
+ // ...unspecified... constructors
+
+ index_type index();
+ const_index_type index() const;
+
+ value_type value();
+ const_value_type value() const;
+};
+``
+
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::indexed_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng` if and only if `rng`
+is not a __bidirectional_range__. If `rng` is a __bidirectional_range__ then the
+returned range category is __forward_range__. The rationale for the demotion of
+__bidirectional_range__ inputs to __forward_range__ is to avoid slow calculation
+of indices for `boost::end(rng)`.
+
+[section:indexed_example indexed example]
+[import ../../../test/adaptor_test/indexed_example.cpp]
+[indexed_example]
+[endsect]
+
+This would produce the output:
+``
+Element = 10 Index = 0
+Element = 20 Index = 1
+Element = 30 Index = 2
+Element = 40 Index = 3
+Element = 50 Index = 4
+Element = 60 Index = 5
+Element = 70 Index = 6
+Element = 80 Index = 7
+Element = 90 Index = 8
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/indirected.qbk b/doc/reference/adaptors/indirected.qbk
new file mode 100644
index 0000000..3d6f416
--- /dev/null
+++ b/doc/reference/adaptors/indirected.qbk
@@ -0,0 +1,31 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::indirected`]]
+ [[Function] [`boost::adaptors::indirect(rng)`]]
+]
+
+* [*Precondition:] The `value_type` of the range defines unary `operator*()`
+* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `*y` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::indirected_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`
+
+[section:indirected_example indirected example]
+[import ../../../test/adaptor_test/indirected_example.cpp]
+[indirected_example]
+[endsect]
+
+This would produce the output:
+``
+0,1,2,3,4,5,6,7,8,9,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/map_keys.qbk b/doc/reference/adaptors/map_keys.qbk
new file mode 100644
index 0000000..e70b4b8
--- /dev/null
+++ b/doc/reference/adaptors/map_keys.qbk
@@ -0,0 +1,31 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::map_keys`]]
+ [[Function] [`boost::adaptors::keys(rng)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
+* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.first` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::select_first_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:map_keys_example map_keys example]
+[import ../../../test/adaptor_test/map_keys_example.cpp]
+[map_keys_example]
+[endsect]
+
+This would produce the output:
+``
+0,1,2,3,4,5,6,7,8,9,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/map_values.qbk b/doc/reference/adaptors/map_values.qbk
new file mode 100644
index 0000000..845c9e8
--- /dev/null
+++ b/doc/reference/adaptors/map_values.qbk
@@ -0,0 +1,31 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::map_values`]]
+ [[Function] [`boost::adaptors::values(rng)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
+* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] for constant ranges, `boost::select_second_const<decltype(rng)>` otherwise `boost:select_second_mutable<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:map_values_example map_values example]
+[import ../../../test/adaptor_test/map_values_example.cpp]
+[map_values_example]
+[endsect]
+
+This would produce the output:
+``
+0,10,20,30,40,50,60,70,80,90,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/ref_unwrapped.qbk b/doc/reference/adaptors/ref_unwrapped.qbk
new file mode 100644
index 0000000..156ad67
--- /dev/null
+++ b/doc/reference/adaptors/ref_unwrapped.qbk
@@ -0,0 +1,32 @@
+[/
+ Copyright 2015 Robin Eckert
+ Distributed under the 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:ref_unwrapped ref_unwrapped]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::ref_unwrapped`]]
+ [[Function] [`boost::adaptors::ref_unwrap(rng)`]]
+]
+
+This adaptor produces a range than applies `.get()` on all values in
+the range. It is useful for iterating ranges of
+`std::reference_wrapper` values or values using similar semantics.
+
+The adaptor is C++11 (and above) only.
+
+* [*Precondition:] The `value_type` of the range has a `.get() const`.
+* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.get()` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::unwrap_ref_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:ref_unwrapped_example ref_unwrapped example]
+[import ../../../test/adaptor_test/ref_unwrapped_example.cpp]
+[ref_unwrapped_example]
+[endsect]
+
+This would produce the output `123`.
+[endsect]
diff --git a/doc/reference/adaptors/replaced.qbk b/doc/reference/adaptors/replaced.qbk
new file mode 100644
index 0000000..1c34ab9
--- /dev/null
+++ b/doc/reference/adaptors/replaced.qbk
@@ -0,0 +1,33 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::replaced(old_value, new_value)`]]
+ [[Function] [`boost::adaptors::replace(rng, old_value, new_value)`]]
+]
+
+* [*Precondition:]
+ * `new_value` is convertible to the `value_type` of the range.
+ * `old_value` is convertible to the `value_type` of the range.
+* [*Postcondition:] For all elements `x` in the returned range, the value `x` is equal to the value of `(y == old_value) ? new_value : y` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::replaced_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:replaced_example replaced example]
+[import ../../../test/adaptor_test/replaced_example.cpp]
+[replaced_example]
+[endsect]
+
+This would produce the output:
+``
+1,10,3,10,5,10,7,10,9,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/replaced_if.qbk b/doc/reference/adaptors/replaced_if.qbk
new file mode 100644
index 0000000..99c1ed8
--- /dev/null
+++ b/doc/reference/adaptors/replaced_if.qbk
@@ -0,0 +1,33 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::replaced_if(pred, new_value)`]]
+ [[Function] [`boost::adaptors::replace_if(rng, pred, new_value)`]]
+]
+
+* [*Precondition:]
+ * The range `value_type` is convertible to the argument type of `pred`.
+ * `new_value` is convertible to the `value_type` of the range.
+* [*Postconditions:] For all elements `x` in the returned range, the value `x` is equal to the value of `pred(y) ? new_value : y` where `y` is the corresponding element in the original range.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::replaced_if_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:replaced_if_example replaced_if example]
+[import ../../../test/adaptor_test/replaced_if_example.cpp]
+[replaced_if_example]
+[endsect]
+
+This would produce the output:
+``
+1,10,3,10,5,10,7,10,9,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/reversed.qbk b/doc/reference/adaptors/reversed.qbk
new file mode 100644
index 0000000..8fe813f
--- /dev/null
+++ b/doc/reference/adaptors/reversed.qbk
@@ -0,0 +1,30 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::reversed`]]
+ [[Function] [`boost::adaptors::reverse(rng)`]]
+]
+
+* [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`.
+* [*Range Category:] __bidirectional_range__
+* [*Range Return Type:] `boost::reversed_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:reversed_example reversed example]
+[import ../../../test/adaptor_test/reversed_example.cpp]
+[reversed_example]
+[endsect]
+
+This would produce the output:
+``
+9,8,7,6,5,4,3,2,1,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/sliced.qbk b/doc/reference/adaptors/sliced.qbk
new file mode 100644
index 0000000..81b4a16
--- /dev/null
+++ b/doc/reference/adaptors/sliced.qbk
@@ -0,0 +1,31 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::sliced(n, m)`]]
+ [[Function] [`boost::adaptors::slice(rng, n, m)`]]
+]
+
+* [*Precondition:] `0 <= n && n <= m && m < distance(rng)`
+* [*Returns:] `make_range(rng, n, m)`
+* [*Range Category:] __random_access_range__
+* [*Range Return Type:] `boost::sliced_range<decltype(rng)>`
+* [*Returned Range Category:] __random_access_range__
+
+[section:sliced_example sliced example]
+[import ../../../test/adaptor_test/sliced_example.cpp]
+[sliced_example]
+[endsect]
+
+This would produce the output:
+``
+3,4,5,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/strided.qbk b/doc/reference/adaptors/strided.qbk
new file mode 100644
index 0000000..a672e3d
--- /dev/null
+++ b/doc/reference/adaptors/strided.qbk
@@ -0,0 +1,30 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::strided(n)`]]
+ [[Function] [`boost::adaptors::stride(rng, n)`]]
+]
+
+* [*Precondition:] `0 <= n`.
+* [*Returns:] A new range based on `rng` where traversal is performed in steps of `n`.
+* [*Range Category:] __single_pass_range__
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:strided_example strided example]
+[import ../../../test/adaptor_test/strided_example.cpp]
+[strided_example]
+[endsect]
+
+This would produce the output:
+``
+1,3,5,7,9,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/tokenized.qbk b/doc/reference/adaptors/tokenized.qbk
new file mode 100644
index 0000000..2105323
--- /dev/null
+++ b/doc/reference/adaptors/tokenized.qbk
@@ -0,0 +1,67 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [
+ [Pipe]
+ [
+ ``
+ rng | boost::adaptors::tokenized(regex)
+ rng | boost::adaptors::tokenized(regex, i)
+ rng | boost::adaptors::tokenized(regex, rndRng)
+ rng | boost::adaptors::tokenized(regex, i, flags)
+ rng | boost::adaptors::tokenized(regex, rndRng, flags)
+ ``
+ ]
+ ]
+ [
+ [Function]
+ [
+ ``
+ boost::adaptors::tokenize(rng, regex)
+ boost::adaptors::tokenize(rng, regex, i)
+ boost::adaptors::tokenize(rng, regex, rndRng)
+ boost::adaptors::tokenize(rng, regex, i, flags)
+ boost::adaptors::tokenize(rng, regex, rndRng, flags)
+ ``
+ ]
+ ]
+]
+
+* [*Precondition:]
+ * Let `T` denote `typename range_value<decltype(rng)>::type`, then `regex` has the type `basic_regex<T>` or is implicitly convertible to one of these types.
+ * `i` has the type `int`.
+ * the `value_type` of `rndRng` is `int`.
+ * `flags` has the type `regex_constants::syntax_option_type`.
+* [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `regex_token_iterator`. The first iterator in the range would be constructed by forwarding all the arguments of `tokenized()` to the `regex_token_iterator` constructor.
+* [*Throws:] Whatever constructing and copying equivalent `regex_token_iterator`s might throw.
+* [*Range Category:] __random_access_range__
+* [*Range Return Type:] `boost::tokenized_range<decltype(rng)>`
+* [*Returned Range Category:] __random_access_range__
+
+[section:tokenized_example tokenized_example]
+[import ../../../test/adaptor_test/tokenized_example.cpp]
+[tokenized_example]
+[endsect]
+
+This would produce the output:
+``
+a
+b
+c
+d
+e
+f
+g
+hijklmnopqrstuvwxyz
+
+``
+
+[endsect]
+
+
diff --git a/doc/reference/adaptors/transformed.qbk b/doc/reference/adaptors/transformed.qbk
new file mode 100644
index 0000000..0c71e8d
--- /dev/null
+++ b/doc/reference/adaptors/transformed.qbk
@@ -0,0 +1,32 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::transformed(fun)`]]
+ [[Function] [`boost::adaptors::transform(rng, fun)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is convertible to the argument type of `fun`.
+* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `fun(y)` where `y` is the corresponding element in the original range.
+* [*Throws:] Whatever the copy-constructor of `fun` might throw.
+* [*Range Category:] __single_pass_range__
+* [*Range Return Type:] `boost::transformed_range<decltype(rng)>`
+* [*Returned Range Category:] The range category of `rng`.
+
+[section:transformed_example transformed example]
+[import ../../../test/adaptor_test/transformed_example.cpp]
+[transformed_example]
+[endsect]
+
+This would produce the output:
+``
+2,4,6,8,10,12,14,16,18,20,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/type_erased.qbk b/doc/reference/adaptors/type_erased.qbk
new file mode 100644
index 0000000..e55ff66
--- /dev/null
+++ b/doc/reference/adaptors/type_erased.qbk
@@ -0,0 +1,65 @@
+[/
+ 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:type_erased type_erased]
+
+[table
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::type_erased<Value, Traversal, Reference, Difference, Buffer>()`]]
+ [[Function] [`boost::adaptors::type_erase(rng, boost::adaptors::type_erased<Value, Traversal, Reference, Difference, Buffer>)`]]
+]
+
+Please note that it is frequently unnecessary to use the `type_erased` adaptor. It is often better to use the implicit conversion to `any_range`.
+
+Let `Rng` be the type of `rng`.
+
+* [*Template parameters:]
+ * `Value` is the `value_type` for the `any_range`. If this is set to boost::use_default, `Value` will be calculated from the
+ range type when the adaptor is applied.
+ * `Traversal` is the tag used to identify the traversal of the resultant range. Frequently it is desirable to set a traversal category lower than the source container or range to maximize the number of ranges that can convert to the `any_range`. If this is left as boost::use_default then `Traversal` will be `typename boost::iterator_traversal<boost::range_iterator<Rng>::type>::type`
+ * `Reference` is the `reference` for the `any_range`. `boost::use_default` will equate to `typename range_reference<Rng>::type`.
+ * `Difference` is the `difference_type` for the any_range. `boost::use_default` will equate to `typename boost::range_difference<Rng>::type`
+ * `Buffer` is the storage used to allocate the underlying iterator wrappers. This can typically be ignored, but is available as a template parameter for customization. Buffer must be a model of the `AnyIteratorBufferConcept`.
+* [*Precondition:] `Traversal` is one of `{ boost::use_default, boost::single_pass_traversal_tag, boost::forward_traversal_tag, boost::bidirectional_traversal_tag, boost::random_access_traversal_tag }`
+* [*Returns:] The returned value is the same as `typename any_range_type_generator< Rng, Value, Traversal, Reference, Difference, Buffer >` that represents `rng` in a type-erased manner.
+* [*Range Category:] __single_pass_range__
+* [*Returned Range Category:] if `Traversal` was specified as `boost::use_default` then `typename boost::iterator_traversal<boost::range_iterator<Rng>::type>::type`, otherwise `Traversal`.
+
+[heading AnyIteratorBufferConcept]
+``
+class AnyIteratorBufferConcept
+{
+public:
+ AnyIteratorBufferConcept();
+ ~AnyIteratorBufferConcept();
+
+ // bytes is the requested size to allocate. This function
+ // must return a pointer to an adequate area of memory.
+ // throws: bad_alloc
+ //
+ // The buffer will only ever have zero or one
+ // outstanding memory allocations.
+ void* allocate(std::size_t bytes);
+
+ // deallocate this buffer
+ void deallocate();
+};
+``
+
+[section:type_erased_example type-erased example]
+[import ../../../test/adaptor_test/type_erased_example.cpp]
+[type_erased_example]
+[endsect]
+
+This would produce the output:
+``
+1,2,3,4,5,
+6,7,8,9,10,
+11,12,13,14,15,
+11,12,13,14,15,
+``
+[endsect]
+
+
diff --git a/doc/reference/adaptors/uniqued.qbk b/doc/reference/adaptors/uniqued.qbk
new file mode 100644
index 0000000..3fb38d7
--- /dev/null
+++ b/doc/reference/adaptors/uniqued.qbk
@@ -0,0 +1,31 @@
+[/
+ 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
+ [[Syntax] [Code]]
+ [[Pipe] [`rng | boost::adaptors::uniqued`]]
+ [[Function] [`boost::adaptors::unique(rng)`]]
+]
+
+* [*Precondition:] The `value_type` of the range is comparable with `operator==()`.
+* [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `x==y` is false.
+* [*Range Category:] __forward_range__
+* [*Range Return Type:] `boost::uniqued_range<decltype(rng)>`
+* [*Returned Range Category:] The minimum of the range concept of `rng` and __forward_range__.
+
+[section:uniqued_example uniqued example]
+[import ../../../test/adaptor_test/uniqued_example.cpp]
+[uniqued_example]
+[endsect]
+
+This would produce the output:
+``
+1,2,3,4,5,6,
+``
+[endsect]
+
+