]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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:uniqued uniqued] | |
7 | ||
8 | [table | |
9 | [[Syntax] [Code]] | |
10 | [[Pipe] [`rng | boost::adaptors::uniqued`]] | |
11 | [[Function] [`boost::adaptors::unique(rng)`]] | |
12 | ] | |
13 | ||
14 | * [*Precondition:] The `value_type` of the range is comparable with `operator==()`. | |
15 | * [*Postcondition:] For all adjacent elements `[x,y]` in the returned range, `x==y` is false. | |
16 | * [*Range Category:] __forward_range__ | |
17 | * [*Range Return Type:] `boost::uniqued_range<decltype(rng)>` | |
18 | * [*Returned Range Category:] The minimum of the range concept of `rng` and __forward_range__. | |
19 | ||
20 | [section:uniqued_example uniqued example] | |
21 | [import ../../../test/adaptor_test/uniqued_example.cpp] | |
22 | [uniqued_example] | |
23 | [endsect] | |
24 | ||
25 | This would produce the output: | |
26 | `` | |
27 | 1,2,3,4,5,6, | |
28 | `` | |
29 | [endsect] | |
30 | ||
31 |