3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // For more information, see http://www.boost.org/libs/range/
10 #include <boost/range/adaptor/adjacent_filtered.hpp>
11 #include <boost/range/algorithm/copy.hpp>
12 #include <boost/assign.hpp>
18 int main(int argc, const char* argv[])
20 using namespace boost::assign;
21 using namespace boost::adaptors;
23 std::vector<int> input;
24 input += 1,1,2,2,2,3,4,5,6;
27 input | adjacent_filtered(std::not_equal_to<int>()),
28 std::ostream_iterator<int>(std::cout, ","));