Brian Silverman | 598d029 | 2018-08-04 23:56:47 -0700 | [diff] [blame^] | 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 | |
| 8 | [table |
| 9 | [[Syntax] [Code]] |
| 10 | [[Pipe] [`rng | boost::adaptors::copied(n, m)`]] |
| 11 | [[Function] [`boost::adaptors::copy(rng, n, m)`]] |
| 12 | ] |
| 13 | |
| 14 | * [*Precondition:] `0 <= n && n <= m && m < distance(rng)` |
| 15 | * [*Returns:] A new `iterator_range` that holds the sliced range `[n,m)` of the original range. |
| 16 | * [*Range Category:] __random_access_range__ |
| 17 | * [*Returned Range Category:] __random_access_range__ |
| 18 | |
| 19 | [section:copied_example copied example] |
| 20 | [import ../../../test/adaptor_test/copied_example.cpp] |
| 21 | [copied_example] |
| 22 | [endsect] |
| 23 | |
| 24 | This would produce the output: |
| 25 | `` |
| 26 | 2,3,4,5, |
| 27 | `` |
| 28 | [endsect] |
| 29 | |
| 30 | |