On Mar 6, 1:39 pm, John Harrison <john_androni...@hotmail.com> wrote:
> toton wrote:
> > Hi,
> > I am developing one container of my own, which has iterators.
> > the iterator is not derived from boost iterator facade (for some
> > other reason), instead it is manually designed.
> > Now when I am interfacing it with other boost libraries (like
> > permutation_iterator, sub_range etc), I get a few errors related to
> > iterator traits.
> > Now my question
> > 1) What are the traits needed for iterator (and const iterator) ?
> > any addition/deletion from the list ?
> > 1) size_type
> > 2) reference
> > 3) pointer
> > 4) value_type
> > 5) iterator_category
> > 6) difference_type
>
> size_type is not required.
>
>
>
> > 2) For const_iterator what are the type of the following in a
> > iterator ?
> > 1)value_type T or const T ?
> > 2) reference T& or const T&
> > 3) pointer T* or const T*
>
> T, const T& and const T*
>
> john
>
>
>
> > Thanks
> > abir
Many thanks. ow it solved the problem, and the code's are working with
all of the boost library.
|