[range] small clarification in documentation for how to write a range adaptor

[SVN r82315]
This commit is contained in:
Nathan Ridge
2013-01-02 08:05:30 +00:00
parent 61979ff421
commit 958b4fbf6e
3 changed files with 11 additions and 1 deletions

View File

@ -225,6 +225,10 @@ 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]