Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-04-07 22:21:58


AMDG

John wrote:
> I'm trying to get boost range and iterator to work. I've got so many questions,
> I don't know where to start. So, rather than post a specific compiler error,
> let's go back to square one. How about a concrete example of fitting a UDT with
> Boost.Range?
>
> <snip>
>

What you have is close.

> // An arbitrary container-esque class.
> class Foo {
> public:
>

Missing typedefs value_type, difference_type, size_type.

> class iterator : public boost::iterator_facade <
> <snip>
> };
>

Add typedef iterator const_iterator;

> <snip>
>

In Christ,
Steven Watanabe


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