[C++-sig] const_iterator type

Alex Leach beamesleach at gmail.com
Fri Mar 29 13:04:01 CET 2013


The iterator I'm wrapping comes from a 3rd party library, over which I have
no control. However, I have been able to add those missing types to the
derived inheritor class, by also inheriting from 'iterator_facade', as per
a suggestion on StackOverflow.
Thanks for the reply btw; I have no clue when it comes to C++
standards-compliance, so all the tips and pointers are appreciated!

Cheers,
Alex


On Thu, Mar 28, 2013 at 6:52 PM, Stefan Ring <stefanrin at gmail.com> wrote:

> > I couldn't find any examples using const_iterator in the test directory,
> or
> > elsewhere, so can't find anything to go by. I thought to manually add
> those
> > typedef's the compilers complaining about, to a Python wrapper class
> derived
> > from MyIterator. Is there another class I can inherit from, in boost or
> the
> > STL, to do this for me?
>
> Wy can't you add them to the iterator itself? That's where they belong.
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20130329/6b70656c/attachment.html>


More information about the Cplusplus-sig mailing list