Problematic std::distance removed

[SVN r25008]
This commit is contained in:
Pavol Droba
2004-09-10 13:23:32 +00:00
parent 4d346d43ad
commit 3542f868a0
2 changed files with 50 additions and 50 deletions

View File

@ -42,13 +42,13 @@ static void find_test()
// basic tests
nc_result=find_regex( str1, rx );
BOOST_CHECK(
(std::distance<string::const_iterator>( str1.begin(),nc_result.begin()) == 3) &&
(std::distance<string::const_iterator>( str1.begin(),nc_result.end()) == 6) );
( (nc_result.begin()-str1.begin()) == 3) &&
( (nc_result.end()-str1.begin()) == 6) );
cv_result=find_regex( str1, rx );
BOOST_CHECK(
(std::distance<string::const_iterator>( str1.begin(),cv_result.begin()) == 3) &&
(std::distance<string::const_iterator>( str1.begin(),cv_result.end()) == 6) );
( (cv_result.begin()-str1.begin()) == 3) &&
( (cv_result.end()-str1.begin()) == 6) );
ch_result=find_regex( pch1, rx );
BOOST_CHECK(( (ch_result.begin() - pch1 ) == 3) && ( (ch_result.end() - pch1 ) == 6 ) );
@ -56,13 +56,13 @@ static void find_test()
// multi-type comparison test
nc_vresult=find_regex( vec1, rx );
BOOST_CHECK(
(std::distance<vector<int>::const_iterator>( vec1.begin(),nc_vresult.begin()) == 3) &&
(std::distance<vector<int>::const_iterator>( vec1.begin(),nc_vresult.end()) == 6) );
( (nc_result.begin()-str1.begin()) == 3) &&
( (nc_result.end()-str1.begin()) == 6) );
cv_vresult=find_regex( vec1, rx );
BOOST_CHECK(
(std::distance<vector<int>::const_iterator>( vec1.begin(),cv_vresult.begin()) == 3) &&
(std::distance<vector<int>::const_iterator>( vec1.begin(),cv_vresult.end()) == 6) );
( (cv_result.begin()-str1.begin()) == 3) &&
( (cv_result.end()-str1.begin()) == 6) );
// find_all_regex test
find_all_regex( tokens, str1, rx );