mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-22 17:07:16 +02:00
GCC-3.3.x workarounds
[SVN r35151]
This commit is contained in:
@ -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_CONCEPT_ASSERT((
|
||||||
|
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.
|
||||||
@ -41,14 +58,6 @@ void permutation_test()
|
|||||||
permutation_type begin = boost::make_permutation_iterator( elements.begin(), indices.begin() );
|
permutation_type begin = boost::make_permutation_iterator( elements.begin(), indices.begin() );
|
||||||
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_CONCEPT_ASSERT((
|
|
||||||
boost_concepts::InteroperableIteratorConcept<
|
|
||||||
permutation_type
|
|
||||||
, permutation_const_type
|
|
||||||
>));
|
|
||||||
|
|
||||||
BOOST_CHECK( it == begin );
|
BOOST_CHECK( it == begin );
|
||||||
BOOST_CHECK( it != end );
|
BOOST_CHECK( it != end );
|
||||||
|
Reference in New Issue
Block a user