[range] docs for writing adaptors: removed clarification added in r82315 (it was redundant); fixed typos that messed up numbering

[SVN r82326]
This commit is contained in:
Nathan Ridge
2013-01-03 01:01:55 +00:00
parent 17e4f7024d
commit 36843ccdba
4 changed files with 9 additions and 38 deletions

View File

@ -225,10 +225,6 @@ namespace
const detail::reverse_forwarder reversed = detail::reverse_forwarder();
}
``
Note that this last step only applies if the adaptor takes no arguments. If the adaptor takes arguments
(such as `indexed`), then there is no need for a variable. Instead, give the tag type a
constructor that takes the arguments (and store those arguments in the tag object). A usage
of the adaptor will then involve construction of an object of the tag type.
[endsect]
@ -285,9 +281,7 @@ public:
``
# Implement a holder class to hold the arguments required to construct the RangeAdaptor.
The holder combines multiple parameters into one that can be passed as the right operand of `operator|()`.
``
template<typename T>
class replace_holder : public boost::range_detail::holder2<T>
@ -302,14 +296,12 @@ private:
``
# Define an instance of the holder with the name of the adaptor
``
static boost::range_detail::forwarder2<replace_holder>
replaced = boost::range_detail::forwarder2<replace_holder>();
``
# Define `operator|`
``
template<typename SinglePassRange>
inline replace_range<SinglePassRange>