forked from boostorg/iterator
Many changes from Oxford
[SVN r1137]
This commit is contained in:
@@ -67,16 +67,6 @@ typedef RA_CONTAINER<int> storage;
|
||||
typedef RA_CONTAINER<int*> pointer_ra_container;
|
||||
typedef std::set<storage::iterator> iterator_set;
|
||||
|
||||
// Something has to be done about putting this in the lib
|
||||
template <class Iter>
|
||||
struct indirect_const_iterator_traits
|
||||
: boost::detail::indirect_defaults<Iter>
|
||||
{
|
||||
typedef boost::detail::indirect_defaults<Iter> base;
|
||||
typedef typename base::value_type const& reference;
|
||||
typedef typename base::value_type const* pointer;
|
||||
};
|
||||
|
||||
template <class Container>
|
||||
struct indirect_iterator_pair_generator
|
||||
{
|
||||
@@ -84,7 +74,7 @@ struct indirect_iterator_pair_generator
|
||||
|
||||
typedef boost::indirect_iterator<
|
||||
typename Container::iterator
|
||||
, indirect_const_iterator_traits<typename Container::const_iterator>
|
||||
, typename iterator::value_type const
|
||||
> const_iterator;
|
||||
};
|
||||
|
||||
@@ -114,8 +104,10 @@ namespace boost { namespace detail
|
||||
}}
|
||||
#endif
|
||||
|
||||
|
||||
void more_indirect_iterator_tests()
|
||||
{
|
||||
# if 0
|
||||
storage store(1000);
|
||||
std::generate(store.begin(), store.end(), rand);
|
||||
|
||||
@@ -163,8 +155,8 @@ void more_indirect_iterator_tests()
|
||||
typedef boost::indirect_iterator<iterator_set::iterator> indirect_set_iterator;
|
||||
typedef boost::indirect_iterator<
|
||||
iterator_set::iterator
|
||||
, indirect_const_iterator_traits<iterator_set::const_iterator>
|
||||
> const_indirect_set_iterator;
|
||||
, iterator_set::iterator::value_type const
|
||||
> const_indirect_set_iterator;
|
||||
|
||||
indirect_set_iterator sb(iter_set.begin());
|
||||
indirect_set_iterator se(iter_set.end());
|
||||
@@ -185,6 +177,7 @@ void more_indirect_iterator_tests()
|
||||
|
||||
boost::bidirectional_iterator_test(boost::next(sb), store[1], store[2]);
|
||||
assert(std::equal(db, de, store.begin()));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
@@ -210,8 +203,8 @@ main()
|
||||
|
||||
typedef boost::indirect_iterator<
|
||||
shared_t::iterator
|
||||
, indirect_const_iterator_traits<shared_t::const_iterator>
|
||||
> c_iter_t;
|
||||
, boost::iterator_value<shared_t::iterator>::type const
|
||||
> c_iter_t;
|
||||
|
||||
# ifndef NO_MUTABLE_CONST_RA_ITERATOR_INTEROPERABILITY
|
||||
boost::function_requires< boost_concepts::InteroperableConcept<iter_t, c_iter_t> >();
|
||||
@@ -229,7 +222,7 @@ main()
|
||||
|
||||
typedef boost::indirect_iterator<dummyT**> indirect_iterator;
|
||||
|
||||
typedef boost::indirect_iterator<dummyT**, indirect_const_iterator_traits<dummyT* const*> >
|
||||
typedef boost::indirect_iterator<dummyT**, dummyT const>
|
||||
const_indirect_iterator;
|
||||
|
||||
indirect_iterator i(ptr);
|
||||
|
||||
Reference in New Issue
Block a user