diff --git a/test/sub_range.cpp b/test/sub_range.cpp index 3fc1974..017613d 100755 --- a/test/sub_range.cpp +++ b/test/sub_range.cpp @@ -22,6 +22,7 @@ #include #include #include +#include // This should be included before "using namespace boost", // otherwise gcc headers will be confused with boost::iterator @@ -90,9 +91,11 @@ void check_iterator_range() string res = copy_range( r ); BOOST_CHECK( equal( res.begin(), res.end(), r.begin() ) ); - res = transform_range( r, add_one() ); - BOOST_CHECK( res[0] == 'i' ); - BOOST_CHECK( *res.rbegin() == 'e' ); + + typedef vector string_type; + string_type res2 = transform_range( r, add_one() ); + BOOST_CHECK( res2[0] == 'i' ); + BOOST_CHECK( *res2.rbegin() == 'e' ); r.empty(); s.empty();