[range] Merge Boost.Range bug fixes to release branch (fixes #6944; fixes #7407; fixes #7408; fixes #7731; fixes #7827; fixes #8338; fixes #8453).

[SVN r84823]
This commit is contained in:
Nathan Ridge
2013-06-18 02:22:07 +00:00
parent 58d57f9b7b
commit 43d2ca8549
13 changed files with 115 additions and 26 deletions

View File

@ -19,15 +19,15 @@
namespace
{
// Test an integer range with a step size of 1.
void test_istream_range()
template <typename CharT>
void test_istream_range_impl()
{
std::stringstream s;
std::basic_stringstream<CharT> s;
std::vector<int> reference;
for (int i = 0; i < 10; ++i)
{
reference.push_back(i);
s << i << " ";
s << i << CharT(' ');
}
std::vector<int> target;
@ -36,6 +36,13 @@ namespace
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
target.begin(), target.end() );
}
// Test an istream range.
void test_istream_range()
{
test_istream_range_impl<char>();
test_istream_range_impl<wchar_t>();
}
} // namespace anonymous namespace