forked from boostorg/regex
More Sunpro std::distance fixes.
Changed Dr John Maddock to John Maddock [SVN r26793]
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2003
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -86,7 +86,7 @@ int main()
|
||||
regex_traits_tester_type1
|
||||
>
|
||||
>();
|
||||
#ifndef __MWERKS__ // MWCW tries to instantiate std::basic_string<boost::char_architype>, not sure whose bug this is....
|
||||
#if !defined(__MWERKS__) && !defined(__SUNPRO_CC) // MWCW tries to instantiate std::basic_string<boost::char_architype>, not sure whose bug this is....
|
||||
typedef boost::basic_regex<boost::char_architype, boost::regex_traits_architype<boost::char_architype> > regex_traits_tester_type2;
|
||||
boost::function_requires<
|
||||
boost::BaseRegexConcept<
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2003
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2003
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -46,7 +46,7 @@ void compare_result(const MR1& w1, const MR2& w2, boost::mpl::int_<2> const*)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Matched mismatch in match_results class", UChar32);
|
||||
}
|
||||
if((w1.position(i) != std::distance(iterator_type(w2.prefix().first), iterator_type(w2[i].first))) || (w1.length(i) != std::distance(iterator_type(w2[i].first), iterator_type(w2[i].second))))
|
||||
if((w1.position(i) != boost::re_detail::distance(iterator_type(w2.prefix().first), iterator_type(w2[i].first))) || (w1.length(i) != boost::re_detail::distance(iterator_type(w2[i].first), iterator_type(w2[i].second))))
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Iterator mismatch in match_results class", UChar32);
|
||||
}
|
||||
@ -74,7 +74,7 @@ void compare_result(const MR1& w1, const MR2& w2, boost::mpl::int_<1> const*)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Matched mismatch in match_results class", UChar32);
|
||||
}
|
||||
if((w1.position(i) != std::distance(iterator_type(w2.prefix().first), iterator_type(w2[i].first))) || (w1.length(i) != std::distance(iterator_type(w2[i].first), iterator_type(w2[i].second))))
|
||||
if((w1.position(i) != boost::re_detail::distance(iterator_type(w2.prefix().first), iterator_type(w2[i].first))) || (w1.length(i) != boost::re_detail::distance(iterator_type(w2[i].first), iterator_type(w2[i].second))))
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Iterator mismatch in match_results class", UChar32);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -170,21 +170,21 @@ void test_mfc(const char&, const test_regex_search_tag&)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
if(std::distance(s.GetString(), tstart2->first) != last_end2)
|
||||
if(boost::re_detail::distance(s.GetString(), tstart2->first) != last_end2)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of start of field split, found: "
|
||||
<< std::distance(s.GetString(), tstart2->first)
|
||||
<< boost::re_detail::distance(s.GetString(), tstart2->first)
|
||||
<< ", expected: "
|
||||
<< last_end2
|
||||
<< ".", char);
|
||||
}
|
||||
int expected_end = static_cast<int>(answer_table[0] < 0 ? s.GetLength() : answer_table[0]);
|
||||
if(std::distance(s.GetString(), tstart2->second) != expected_end)
|
||||
if(boost::re_detail::distance(s.GetString(), tstart2->second) != expected_end)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of end2 of field split, found: "
|
||||
<< std::distance(s.GetString(), tstart2->second)
|
||||
<< boost::re_detail::distance(s.GetString(), tstart2->second)
|
||||
<< ", expected: "
|
||||
<< expected_end
|
||||
<< ".", char);
|
||||
@ -348,21 +348,21 @@ void test_mfc(const wchar_t&, const test_regex_search_tag&)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
if(std::distance(s.GetString(), tstart2->first) != last_end2)
|
||||
if(boost::re_detail::distance(s.GetString(), tstart2->first) != last_end2)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of start of field split, found: "
|
||||
<< std::distance(s.GetString(), tstart2->first)
|
||||
<< boost::re_detail::distance(s.GetString(), tstart2->first)
|
||||
<< ", expected: "
|
||||
<< last_end2
|
||||
<< ".", wchar_t);
|
||||
}
|
||||
int expected_end = static_cast<int>(answer_table[0] < 0 ? s.GetLength() : answer_table[0]);
|
||||
if(std::distance(s.GetString(), tstart2->second) != expected_end)
|
||||
if(boost::re_detail::distance(s.GetString(), tstart2->second) != expected_end)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of end2 of field split, found: "
|
||||
<< std::distance(s.GetString(), tstart2->second)
|
||||
<< boost::re_detail::distance(s.GetString(), tstart2->second)
|
||||
<< ", expected: "
|
||||
<< expected_end
|
||||
<< ".", wchar_t);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -47,18 +47,18 @@ void test_sub_match(const boost::sub_match<BidirectionalIterator>& sub, Bidirect
|
||||
}
|
||||
else
|
||||
{
|
||||
if(std::distance(base, sub.first) != answer_table[2*i])
|
||||
if(boost::re_detail::distance(base, sub.first) != answer_table[2*i])
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in start location of sub-expression "
|
||||
<< i << ", found " << std::distance(base, sub.first)
|
||||
<< i << ", found " << boost::re_detail::distance(base, sub.first)
|
||||
<< ", expected " << answer_table[2*i] << ".", charT);
|
||||
}
|
||||
if(std::distance(base, sub.second) != answer_table[1+ 2*i])
|
||||
if(boost::re_detail::distance(base, sub.second) != answer_table[1+ 2*i])
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in end location of sub-expression "
|
||||
<< i << ", found " << std::distance(base, sub.second)
|
||||
<< i << ", found " << boost::re_detail::distance(base, sub.second)
|
||||
<< ", expected " << answer_table[1 + 2*i] << ".", charT);
|
||||
}
|
||||
}
|
||||
@ -238,21 +238,21 @@ void test_regex_token_iterator(boost::basic_regex<charT, traits>& r)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
if(std::distance(search_text.begin(), start2->first) != last_end2)
|
||||
if(boost::re_detail::distance(search_text.begin(), start2->first) != last_end2)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of start of field split, found: "
|
||||
<< std::distance(search_text.begin(), start2->first)
|
||||
<< boost::re_detail::distance(search_text.begin(), start2->first)
|
||||
<< ", expected: "
|
||||
<< last_end2
|
||||
<< ".", charT);
|
||||
}
|
||||
int expected_end = static_cast<int>(answer_table[0] < 0 ? search_text.size() : answer_table[0]);
|
||||
if(std::distance(search_text.begin(), start2->second) != expected_end)
|
||||
if(boost::re_detail::distance(search_text.begin(), start2->second) != expected_end)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of end2 of field split, found: "
|
||||
<< std::distance(search_text.begin(), start2->second)
|
||||
<< boost::re_detail::distance(search_text.begin(), start2->second)
|
||||
<< ", expected: "
|
||||
<< expected_end
|
||||
<< ".", charT);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -47,18 +47,18 @@ void test_sub_match(const boost::sub_match<BidirectionalIterator>& sub, Bidirect
|
||||
}
|
||||
else
|
||||
{
|
||||
if(std::distance(base, sub.first) != answer_table[2*i])
|
||||
if(boost::re_detail::distance(base, sub.first) != answer_table[2*i])
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in start location of sub-expression "
|
||||
<< i << ", found " << std::distance(base, sub.first)
|
||||
<< i << ", found " << boost::re_detail::distance(base, sub.first)
|
||||
<< ", expected " << answer_table[2*i] << ".", charT);
|
||||
}
|
||||
if(std::distance(base, sub.second) != answer_table[1+ 2*i])
|
||||
if(boost::re_detail::distance(base, sub.second) != answer_table[1+ 2*i])
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in end location of sub-expression "
|
||||
<< i << ", found " << std::distance(base, sub.second)
|
||||
<< i << ", found " << boost::re_detail::distance(base, sub.second)
|
||||
<< ", expected " << answer_table[1 + 2*i] << ".", charT);
|
||||
}
|
||||
}
|
||||
@ -238,21 +238,21 @@ void test_regex_token_iterator(boost::basic_regex<charT, traits>& r)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
if(std::distance(search_text.begin(), start2->first) != last_end2)
|
||||
if(boost::re_detail::distance(search_text.begin(), start2->first) != last_end2)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of start of field split, found: "
|
||||
<< std::distance(search_text.begin(), start2->first)
|
||||
<< boost::re_detail::distance(search_text.begin(), start2->first)
|
||||
<< ", expected: "
|
||||
<< last_end2
|
||||
<< ".", charT);
|
||||
}
|
||||
int expected_end = static_cast<int>(answer_table[0] < 0 ? search_text.size() : answer_table[0]);
|
||||
if(std::distance(search_text.begin(), start2->second) != expected_end)
|
||||
if(boost::re_detail::distance(search_text.begin(), start2->second) != expected_end)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR(
|
||||
"Error in location of end2 of field split, found: "
|
||||
<< std::distance(search_text.begin(), start2->second)
|
||||
<< boost::re_detail::distance(search_text.begin(), start2->second)
|
||||
<< ", expected: "
|
||||
<< expected_end
|
||||
<< ".", charT);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* Dr John Maddock
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
@ -93,14 +93,18 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
v16.clear();
|
||||
std::copy(u32to16type(v.begin()), u32to16type(v.end()), std::back_inserter(v16));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(u32to16type(v.begin()), u32to16type(v.end())), v16.size());
|
||||
#endif
|
||||
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
v32.assign(u16to32type(v16.begin()), u16to32type(v16.end()));
|
||||
#else
|
||||
v32.clear();
|
||||
std::copy(u16to32type(v16.begin()), u16to32type(v16.end()), std::back_inserter(v32));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(u16to32type(v16.begin()), u16to32type(v16.end())), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
i = v.begin();
|
||||
j = i;
|
||||
@ -115,10 +119,14 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
//
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR)
|
||||
v16.assign(ru32to16type(u32to16type(v.end())), ru32to16type(u32to16type(v.begin())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(ru32to16type(u32to16type(v.end())), ru32to16type(u32to16type(v.begin()))), v16.size());
|
||||
#endif
|
||||
std::reverse(v16.begin(), v16.end());
|
||||
v32.assign(ru16to32type(u16to32type(v16.end())), ru16to32type(u16to32type(v16.begin())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(ru16to32type(u16to32type(v16.end())), ru16to32type(u16to32type(v16.begin()))), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
std::reverse(v32.begin(), v32.end());
|
||||
i = v.begin();
|
||||
@ -139,14 +147,18 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
v8.clear();
|
||||
std::copy(u32to8type(v.begin()), u32to8type(v.end()), std::back_inserter(v8));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(u32to8type(v.begin()), u32to8type(v.end())), v8.size());
|
||||
#endif
|
||||
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
v32.assign(u8to32type(v8.begin()), u8to32type(v8.end()));
|
||||
#else
|
||||
v32.clear();
|
||||
std::copy(u8to32type(v8.begin()), u8to32type(v8.end()), std::back_inserter(v32));
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(u8to32type(v8.begin()), u8to32type(v8.end())), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
i = v.begin();
|
||||
j = i;
|
||||
@ -161,10 +173,14 @@ void test(const std::vector< ::boost::uint32_t>& v)
|
||||
//
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR)
|
||||
v8.assign(ru32to8type(u32to8type(v.end())), ru32to8type(u32to8type(v.begin())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(ru32to8type(u32to8type(v.end())), ru32to8type(u32to8type(v.begin()))), v8.size());
|
||||
#endif
|
||||
std::reverse(v8.begin(), v8.end());
|
||||
v32.assign(ru8to32type(u8to32type(v8.end())), ru8to32type(u8to32type(v8.begin())));
|
||||
#ifndef BOOST_NO_STD_DISTANCE
|
||||
BOOST_CHECK_EQUAL(std::distance(ru8to32type(u8to32type(v8.end())), ru8to32type(u8to32type(v8.begin()))), v32.size());
|
||||
#endif
|
||||
BOOST_CHECK_EQUAL(v.size(), v32.size());
|
||||
std::reverse(v32.begin(), v32.end());
|
||||
i = v.begin();
|
||||
|
Reference in New Issue
Block a user