|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-10-26 09:10:02
Hi Bernard,
Thanks for the comments about integer_range. I've changed the
iterator_range's iterator to return by reference.
One comment about your append_iterator_traits: it is probably
more correct to use typename::Traits::reference as the
reference type instead of value_type&. This also would have avoided
the problem.
template< typename FirstIter, typename SecondIter, typename
Traits=std::iterat\
or_traits< FirstIter>, typename Traits2=std::iterator_traits< SecondIter>
>
struct append_iterator_traits {
// should make some checks et decide category as greatest common factor
#if 1
typedef const typename boost::remove_reference<typename
Traits::value_type>\
::type value_type;
typedef value_type& reference;
#else
typedef typename Traits::value_type value_type;
typedef typename Traits::reference reference;
#endif
typedef value_type* pointer;
typedef typename Traits::difference_type difference_type;
typedef typename Traits::iterator_category iterator_category;
};
Ciao,
Jeremy
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate email: jsiek_at_[hidden]
Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk