Boost logo

Boost Users :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-07-01 17:30:26


Mark Ruzon wrote:
> In the private part of my own iterator adaptor called skip_iterator, I would
> like to write the following:
>
> private:
> typedef typename skip_iterator::iterator_adaptor_::difference_type
> difference_type;
> void advance(difference_type n);
> difference_type distance_to(const skip_iterator& x) const;
>
> because it looks nice. What I get from gcc 3.4.6 is strange:

You seemed to redefine difference_type as private,
then it is inaccessible from iterator users.

You might want to place it in public or use a "different" name.

private:
   typedef typename skip_iterator::iterator_adaptor_::difference_type diff_t;
   void advance(diff_t n);

-- 
Shunsuke Sogame

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net