]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/utility/generator_iterator_test.cpp
2 // Copyright 2014 Peter Dimov
4 // Distributed under the Boost Software License, Version 1.0.
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
9 #include <boost/generator_iterator.hpp>
10 #include <boost/detail/lightweight_test.hpp>
21 typedef int result_type
;
33 template<class InputIterator
, class Size
, class OutputIterator
> OutputIterator
copy_n( InputIterator first
, Size n
, OutputIterator result
)
46 boost::generator_iterator
<X
> in( &x
);
53 BOOST_TEST_EQ( v
[0], 1 );
54 BOOST_TEST_EQ( v
[1], 2 );
55 BOOST_TEST_EQ( v
[2], 3 );
56 BOOST_TEST_EQ( v
[3], 4 );
62 return boost::report_errors();