forked from boostorg/range
v2 upgrade
[SVN r34011]
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
//#include <boost/range/as_array.hpp>
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
@ -16,7 +17,6 @@
|
||||
# pragma warn -8057 // unused argument argc/argv in Boost.Test
|
||||
#endif
|
||||
|
||||
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/functions.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
|
||||
void check_reference_type();
|
||||
|
||||
void check_iterator_range()
|
||||
@ -65,6 +65,12 @@ void check_iterator_range()
|
||||
BOOST_CHECK_EQUAL( distance( r.begin(), r.end() ),
|
||||
distance( begin( r2 ), end( r2 ) ) );
|
||||
cout << r << r2;
|
||||
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
wcout << make_iterator_range( wstring( L"a wide string" ) )
|
||||
<< make_iterator_range( L"another wide string" );
|
||||
#endif
|
||||
|
||||
string res = copy_range<string>( r );
|
||||
BOOST_CHECK( equal( res.begin(), res.end(), r.begin() ) );
|
||||
@ -94,7 +100,7 @@ void check_iterator_range()
|
||||
rrr = make_iterator_range( rrr, -1, 1 );
|
||||
BOOST_CHECK( rrr == str );
|
||||
|
||||
check_reference_type();
|
||||
check_reference_type();
|
||||
}
|
||||
|
||||
|
||||
@ -121,13 +127,13 @@ test_suite* init_unit_test_suite( int argc, char* argv[] )
|
||||
template< class Container >
|
||||
int test_iter_range( Container& a_cont )
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME range_result_iterator<Container>::type citer_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME range_iterator<Container>::type citer_type;
|
||||
typedef iterator_range<citer_type> riter_type;
|
||||
riter_type a_riter( make_iterator_range( a_cont ) );
|
||||
a_riter.front();
|
||||
a_riter.back();
|
||||
int i = a_riter[0];
|
||||
return i;
|
||||
a_riter.front();
|
||||
a_riter.back();
|
||||
int i = a_riter[0];
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user