]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/range/test/ticket_6944.cpp
3 // Copyright Neil Groves 2011. 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)
9 // For more information, see http://www.boost.org/libs/range/
11 #include <boost/concept_check.hpp>
12 #include <boost/iterator/iterator_adaptor.hpp>
13 #include <boost/range/concepts.hpp>
14 #include <boost/range/iterator_range.hpp>
16 #include <boost/test/test_tools.hpp>
17 #include <boost/test/unit_test.hpp>
23 typedef std::vector
<int>::iterator iter_base
;
24 struct iter
: boost::iterator_adaptor
<iter
, iter_base
, int, boost::use_default
, int> {}; // will be deduced as random-access traversal but input category
25 typedef boost::iterator_range
<iter
> iter_range
;
29 // Ticket 6944 - Some Range concepts use the incorrect Iterator concept
30 void test_ticket_6944()
32 BOOST_CONCEPT_ASSERT(( boost::RandomAccessRangeConcept
<iter_range
> ));
37 boost::unit_test::test_suite
*
38 init_unit_test_suite(int argc
, char* argv
[])
40 boost::unit_test::test_suite
* test
41 = BOOST_TEST_SUITE( "RangeTestSuite.ticket_6944" );
43 test
->add( BOOST_TEST_CASE( &boost::test_ticket_6944
) );