]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/range/test/pointer_as_iterator.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / range / test / pointer_as_iterator.cpp
1 // Boost.Range library
2 //
3 // Copyright Neil Groves 2010. 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)
7 //
8 //
9 // For more information, see http://www.boost.org/libs/range/
10 //
11 #include <boost/range/iterator_range.hpp>
12 #include <boost/range/begin.hpp>
13 #include <boost/range/end.hpp>
14 #include <boost/array.hpp>
15 #include <boost/test/test_tools.hpp>
16 #include <boost/test/unit_test.hpp>
17 #include <iostream>
18 #include <vector>
19
20 namespace
21 {
22 void test_pointer_as_iterator()
23 {
24 boost::array<int,3> arr;
25 boost::iterator_range<const int*> r(arr.begin(), arr.end());
26 r[0];
27 }
28 } // anonymous namespace
29
30 boost::unit_test::test_suite*
31 init_unit_test_suite(int argc, char* argv[])
32 {
33 boost::unit_test::test_suite* test
34 = BOOST_TEST_SUITE( "RangeTestSuite.pointer_as_iterator" );
35
36 test->add(BOOST_TEST_CASE( &test_pointer_as_iterator ));
37
38 return test;
39 }