GCC-3.3.x workarounds

[SVN r35151]
This commit is contained in:
Dave Abrahams
2006-09-18 02:34:18 +00:00
parent e7843bdea3
commit 7243852b0a

View File

@ -18,6 +18,23 @@
#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_CONCEPT_ASSERT((
boost_concepts::InteroperableIteratorConcept<
permutation_type
, permutation_const_type
>));
}
void permutation_test()
{
// Example taken from documentation of old permutation_iterator.
@ -41,14 +58,6 @@ void permutation_test()
permutation_type begin = boost::make_permutation_iterator( elements.begin(), indices.begin() );
permutation_type it = begin;
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_CONCEPT_ASSERT((
boost_concepts::InteroperableIteratorConcept<
permutation_type
, permutation_const_type
>));
BOOST_CHECK( it == begin );
BOOST_CHECK( it != end );