"Duane Murphy"
--- At Mon, 3 Jun 2002 14:09:07 -0400, David Abrahams wrote:
Take a look at the documentation and implementation where it talks about default_iterator_policies. This shows you the functions that have to be implemented by your base iterator class.
This statement is a bit misleading. It shows the functions that your Policies class must implement.
Ah, what I was meaning was to look at the implementations of the functions in default_iterator_policies. The implementation shows what this policy calls and what default_iterator_policies expectes the base iterator to be able to do. I have found it easier to write a simple "iterator like" class and use the default_iterator_policies than to write both an iterator and a policy.
That's a pretty wacky idea! You're putting the behaviors in the Base object, but the library "intends" for behaviors to be specified by the Policies. In other words, the "normal" approach is to treat the Base object as raw data, and while the policies implement the operations on that data. -Dave