merged from HEAD

[SVN r35152]
This commit is contained in:
Dave Abrahams
2006-09-18 02:38:38 +00:00
parent b258a435cc
commit 8a53abc1e8

View File

@ -18,6 +18,23 @@
#include <algorithm> #include <algorithm>
// This test checks for convertibility/interoperability among similar
// permutation iterators. We're not using container iterators
// underneath, as in permutation_test, because of bugs in GCC-3.3's
// __normal_iterator that make is_convertible choke when testing
// convertibility.
void iterop_test()
{
typedef boost::permutation_iterator< double*, int const* > permutation_type;
typedef boost::permutation_iterator< double const*, int const* > permutation_const_type;
boost::function_requires<
boost_concepts::InteroperableIteratorConcept<
permutation_type
, permutation_const_type
> >();
}
void permutation_test() void permutation_test()
{ {
// Example taken from documentation of old permutation_iterator. // Example taken from documentation of old permutation_iterator.
@ -42,14 +59,6 @@ void permutation_test()
permutation_type it = begin; permutation_type it = begin;
permutation_type end = boost::make_permutation_iterator( elements.begin(), indices.end() ); permutation_type end = boost::make_permutation_iterator( elements.begin(), indices.end() );
typedef boost::permutation_iterator< element_range_type::const_iterator, index_type::iterator > permutation_const_type;
boost::function_requires<
boost_concepts::InteroperableIteratorConcept<
permutation_type
, permutation_const_type
> >();
BOOST_CHECK( it == begin ); BOOST_CHECK( it == begin );
BOOST_CHECK( it != end ); BOOST_CHECK( it != end );