copied.qbk 793 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:copied copied]
  7. [table
  8. [[Syntax] [Code]]
  9. [[Pipe] [`rng | boost::adaptors::copied(n, m)`]]
  10. [[Function] [`boost::adaptors::copy(rng, n, m)`]]
  11. ]
  12. * [*Precondition:] `0 <= n && n <= m && m < distance(rng)`
  13. * [*Returns:] A new `iterator_range` that holds the sliced range `[n,m)` of the original range.
  14. * [*Range Category:] __random_access_range__
  15. * [*Returned Range Category:] __random_access_range__
  16. [section:copied_example copied example]
  17. [import ../../../test/adaptor_test/copied_example.cpp]
  18. [copied_example]
  19. [endsect]
  20. This would produce the output:
  21. ``
  22. 2,3,4,5,
  23. ``
  24. [endsect]