merged fix

[SVN r21869]
This commit is contained in:
Jeremy Siek
2004-01-21 20:03:32 +00:00
parent c90b123e7a
commit 62ecb49bb5
3 changed files with 24 additions and 47 deletions
+4 -4
View File
@@ -150,18 +150,18 @@ template <class T>
struct in_iterator
: boost::iterator_adaptor<
in_iterator<T>
, boost::input_iterator_archetype<T>
, boost::input_iterator_archetype_no_proxy<T>
>
{
private:
typedef boost::iterator_adaptor<
in_iterator<T>
, boost::input_iterator_archetype<T>
, boost::input_iterator_archetype_no_proxy<T>
> super_t;
public:
in_iterator() { }
in_iterator(boost::input_iterator_archetype<T> d) : super_t(d) { }
in_iterator(boost::input_iterator_archetype_no_proxy<T> d) : super_t(d) { }
};
template <class Iter>
@@ -309,7 +309,7 @@ main()
// check operator-> with an input iterator
{
boost::input_iterator_archetype<dummyT> input_iter;
boost::input_iterator_archetype_no_proxy<dummyT> input_iter;
typedef in_iterator<dummyT> adaptor_type;
adaptor_type i(input_iter);
int zero = 0;
+6 -5
View File
@@ -20,7 +20,7 @@
void permutation_test()
{
// Example taken from documentation of old permutation_iterator.
typedef std::vector< int > element_range_type;
typedef std::vector< double > element_range_type;
typedef std::list< int > index_type;
const int element_range_size = 10;
@@ -52,21 +52,22 @@ void permutation_test()
}
it = begin;
for( int i1 = 0; i1 < index_size - 1 ; i1+=2, it+=2 )
for( int i1 = 0; i1 < index_size - 1 ; ++++i1, ++++it )
{
index_type::iterator i_it2 = indices.begin();
std::advance( i_it2, i1 );
BOOST_CHECK( *it == elements[ *i_it2 ] );
}
it = begin + (index_size);
it = begin;
std::advance(it, index_size);
for( index_type::iterator i_it3 = indices.end(); it != begin; )
{
BOOST_CHECK( *--it == elements[ *--i_it3 ] );
}
it = begin + index_size;
it = begin;
std::advance(it, index_size);
for( int i2 = 0; i2 < index_size - 1; i2+=2, --it )
{
index_type::iterator i_it4 = --indices.end();