reversed.qbk 835 B

123456789101112131415161718192021222324252627282930
  1. [/
  2. Copyright 2010 Neil Groves
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. /]
  6. [section:reversed reversed]
  7. [table
  8. [[Syntax] [Code]]
  9. [[Pipe] [`rng | boost::adaptors::reversed`]]
  10. [[Function] [`boost::adaptors::reverse(rng)`]]
  11. ]
  12. * [*Returns:] A range whose iterators behave as if they were the original iterators wrapped in `reverse_iterator`.
  13. * [*Range Category:] __bidirectional_range__
  14. * [*Range Return Type:] `boost::reversed_range<decltype(rng)>`
  15. * [*Returned Range Category:] The range category of `rng`.
  16. [section:reversed_example reversed example]
  17. [import ../../../test/adaptor_test/reversed_example.cpp]
  18. [reversed_example]
  19. [endsect]
  20. This would produce the output:
  21. ``
  22. 9,8,7,6,5,4,3,2,1,
  23. ``
  24. [endsect]