[boost][range] - Resolved Trace 5162 - boost::iterator_range<T*> is unsafe.

[SVN r70852]
This commit is contained in:
Neil Groves
2011-04-02 13:05:26 +00:00
parent d490a84c8d
commit 126e6861d7
4 changed files with 33 additions and 2 deletions

View File

@ -200,6 +200,15 @@ namespace iterator_range_test_detail
}
}
}
void check_iterator_range_from_array()
{
double source[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 };
boost::iterator_range<double*> rng = boost::make_iterator_range(source);
BOOST_CHECK_EQUAL_COLLECTIONS( rng.begin(), rng.end(),
source, source + 6 );
}
} // namespace iterator_range_test_detail
template<typename Pred>