| 1 | /* |
|---|---|
| 2 | Copyright (c) Marshall Clow 2011-2012. |
| 3 | |
| 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | For more information, see http://www.boost.org |
| 8 | */ |
| 9 | |
| 10 | #include <iostream> |
| 11 | |
| 12 | #include <boost/config.hpp> |
| 13 | #include <boost/algorithm/gather.hpp> |
| 14 | |
| 15 | #include <string> |
| 16 | #include <vector> |
| 17 | #include <list> |
| 18 | |
| 19 | #include "iterator_test.hpp" |
| 20 | |
| 21 | namespace ba = boost::algorithm; |
| 22 | |
| 23 | bool is_ten ( int i ) { return i == 10; } |
| 24 | |
| 25 | void test_sequence1 () { |
| 26 | std::vector<int> v; |
| 27 | typedef input_iterator<std::vector<int>::iterator> II; |
| 28 | |
| 29 | // This should fail to compile, since gather doesn't work with input iterators |
| 30 | (void) ba::gather ( first: II( v.begin ()), last: II( v.end ()), pivot: II( v.begin ()), pred: is_ten ); |
| 31 | } |
| 32 | |
| 33 | |
| 34 | int main () |
| 35 | { |
| 36 | test_sequence1 (); |
| 37 | return 0; |
| 38 | } |
| 39 |
