[SVN r35102]
This commit is contained in:
Dave Abrahams 2006-09-13 22:36:10 +00:00
parent 0237e49a17
commit bca372da18
2 changed files with 15 additions and 0 deletions

View File

@ -50,6 +50,11 @@ private:
typename super_t::reference dereference() const
{ return *(m_elt_iter + *this->base()); }
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
template <class,class> friend class permutation_iterator;
#else
public:
#endif
ElementIterator m_elt_iter;
};

View File

@ -9,6 +9,8 @@
#include <boost/iterator/permutation_iterator.hpp>
#include <boost/static_assert.hpp>
#include <boost/iterator/iterator_concepts.hpp>
#include <boost/concept/assert.hpp>
#include <vector>
#include <list>
@ -40,6 +42,14 @@ void permutation_test()
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 );