|
Boost-Commit : |
From: Boris.Gubenko_at_[hidden]
Date: 2008-08-05 10:19:59
Author: bgubenko
Date: 2008-08-05 10:19:59 EDT (Tue, 05 Aug 2008)
New Revision: 47990
URL: http://svn.boost.org/trac/boost/changeset/47990
Log:
fix compilation errors with GCC
Text files modified:
trunk/libs/test/test/basic_cstring_test.cpp | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
Modified: trunk/libs/test/test/basic_cstring_test.cpp
==============================================================================
--- trunk/libs/test/test/basic_cstring_test.cpp (original)
+++ trunk/libs/test/test/basic_cstring_test.cpp 2008-08-05 10:19:59 EDT (Tue, 05 Aug 2008)
@@ -404,28 +404,29 @@
BOOST_TEST_CASE_TEMPLATE_FUNCTION( find_test, CharT )
{
+ typedef typename utf::basic_cstring<CharT>::size_type size;
utf::basic_cstring<CharT> bcs1( TEST_STRING );
- utf::basic_cstring<CharT>::size_type not_found = (utf::basic_cstring<CharT>::size_type)utf::basic_cstring<CharT>::npos;
+ size not_found = (size)utf::basic_cstring<CharT>::npos;
BOOST_CHECK_EQUAL( bcs1.find( utf::basic_cstring<CharT>() ), not_found );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test" ) ), (utf::basic_cstring<CharT>::size_type)0 );
- BOOST_CHECK_EQUAL( bcs1.find( TEST_STRING ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test" ) ), (size)0 );
+ BOOST_CHECK_EQUAL( bcs1.find( TEST_STRING ), (size)0 );
BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test_string " ) ), not_found );
BOOST_CHECK_EQUAL( bcs1.find( LITERAL( " test_string" ) ), not_found );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "est" ) ), (utf::basic_cstring<CharT>::size_type)1 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "t_st" ) ), (utf::basic_cstring<CharT>::size_type)3 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "ing" ) ), (utf::basic_cstring<CharT>::size_type)8 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "est" ) ), (size)1 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "t_st" ) ), (size)3 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "ing" ) ), (size)8 );
BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "tst" ) ), not_found );
BOOST_CHECK_EQUAL( bcs1.rfind( utf::basic_cstring<CharT>() ), not_found );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test" ) ), (utf::basic_cstring<CharT>::size_type)0 );
- BOOST_CHECK_EQUAL( bcs1.rfind( TEST_STRING ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test" ) ), (size)0 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( TEST_STRING ), (size)0 );
BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test_string " ) ), not_found );
BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( " test_string" ) ), not_found );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "est" ) ), (utf::basic_cstring<CharT>::size_type)1 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "t_st" ) ), (utf::basic_cstring<CharT>::size_type)3 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "ing" ) ), (utf::basic_cstring<CharT>::size_type)8 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "est" ) ), (size)1 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "t_st" ) ), (size)3 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "ing" ) ), (size)8 );
BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "tst" ) ), not_found );
}
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