iterator_adaptor const iterator question
I have now built a couple of iterators using boost::iterator_adaptor. These are not adapted iterators but rather iterators developed to iterate over interfaces that have not iterators. I havent found a good example of how to declare the equivalent of a const_iterator like in vector. What would the declartion look like? If the definition of an iterator is: typedef boost::iterator_adaptor< Base, Policy > iterator; What would the declartion for a const_iterator look like? Thanks for the help. ..Duane
--- In Boost-Users@y..., Duane Murphy
I have now built a couple of iterators using boost::iterator_adaptor. These are not adapted iterators but rather iterators developed to iterate over interfaces that have not iterators.
I havent found a good example of how to declare the equivalent of a const_iterator like in vector. What would the declartion look like?
If the definition of an iterator is:
typedef boost::iterator_adaptor< Base, Policy > iterator;
What would the declartion for a const_iterator look like?
depending on your compiler and requirements, it might look like:
boost::iterator_adaptor
participants (2)
-
dave_abrahams
-
Duane Murphy