|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61025 - trunk/libs/range/test
From: neil_at_[hidden]
Date: 2010-04-03 15:31:43
Author: neilgroves
Date: 2010-04-03 15:31:43 EDT (Sat, 03 Apr 2010)
New Revision: 61025
URL: http://svn.boost.org/trac/boost/changeset/61025
Log:
Boost.Range fixed C++0x problem due to accidental argument dependent lookup in the const_ranges unit test.
Text files modified:
trunk/libs/range/test/const_ranges.cpp | 33 +++++++++++++--------------------
1 files changed, 13 insertions(+), 20 deletions(-)
Modified: trunk/libs/range/test/const_ranges.cpp
==============================================================================
--- trunk/libs/range/test/const_ranges.cpp (original)
+++ trunk/libs/range/test/const_ranges.cpp 2010-04-03 15:31:43 EDT (Sat, 03 Apr 2010)
@@ -21,9 +21,6 @@
#include <boost/test/unit_test.hpp>
#include <string>
-using namespace boost;
-using namespace std;
-
template< class T >
const T& as_const( const T& r )
{
@@ -33,27 +30,23 @@
void check_const_ranges()
{
std::string foo( "foo" );
- const std::string bar( "bar" );
-
- BOOST_CHECK( const_begin( foo ) == begin( as_const( foo ) ) );
- BOOST_CHECK( const_end( foo ) == end( as_const( foo ) ) );
- BOOST_CHECK( const_rbegin( foo ) == rbegin( as_const( foo ) ) );
- BOOST_CHECK( const_rend( foo ) == rend( as_const( foo ) ) );
-
- BOOST_CHECK( const_begin( bar ) == begin( as_const( bar ) ) );
- BOOST_CHECK( const_end( bar ) == end( as_const( bar ) ) );
- BOOST_CHECK( const_rbegin( bar ) == rbegin( as_const( bar ) ) );
- BOOST_CHECK( const_rend( bar ) == rend( as_const( bar ) ) );
-
-}
+ const std::string bar( "bar" );
+ BOOST_CHECK( boost::const_begin( foo ) == boost::begin( as_const( foo ) ) );
+ BOOST_CHECK( boost::const_end( foo ) == boost::end( as_const( foo ) ) );
+ BOOST_CHECK( boost::const_rbegin( foo ) == boost::rbegin( as_const( foo ) ) );
+ BOOST_CHECK( boost::const_rend( foo ) == boost::rend( as_const( foo ) ) );
+
+ BOOST_CHECK( boost::const_begin( bar ) == boost::begin( as_const( bar ) ) );
+ BOOST_CHECK( boost::const_end( bar ) == boost::end( as_const( bar ) ) );
+ BOOST_CHECK( boost::const_rbegin( bar ) == boost::rbegin( as_const( bar ) ) );
+ BOOST_CHECK( boost::const_rend( bar ) == boost::rend( as_const( bar ) ) );
+}
-using boost::unit_test::test_suite;
-
-test_suite* init_unit_test_suite( int argc, char* argv[] )
+boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] )
{
- test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
+ boost::unit_test::test_suite* test = BOOST_TEST_SUITE( "Range Test Suite" );
test->add( BOOST_TEST_CASE( &check_const_ranges ) );
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk