Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-11-28 16:15:48


Jeremy said:

> Dave Abrahams writes:
> > This is some great work.
> > I would like to see the following direction considered:
> >
> > 1. Rename fundamental components and integrate with operators.hpp:
> >
> > postfix_inc_operator<T> -> incrementable<T>
> > postfix_dec_operator<T> -> decrementable<T>
> > member_operator<T> -> dereferenceable<T>

I was trying to suggest moving incrementable, decrementable, and
dereferenceable into operators.hpp. If neccessary it would be OK to modify
the copyright as appropriate. It just seems like people will want to find
those operators all in one place.

> and how about
> random_access_operator -> randomly_accessible<T>

I was thinking that there might be a better name. After all, it isn't T that
can be randomly accessed, but what T refers to. Perhaps "indexable"?

> Hmmm, I don't see a better way to do that. It's a little bit of a
> sticky issue, but requiring the 4 associated types as arguments to the
> helpers does not seem too bad to me.

Well, it might make sense for ease-of-use to provide defaults for things
like the distance, pointer, and reference types (especially the latter two).
Unless someone is making a proxy iterator (a subject which could use some
good research), the pointer and reference types can be automatically derived
from the value type. I vote for iterator_traits<char*>::distance_type as a
default for the distance type.

-Dave

P.S. Thank you for being so receptive to my suggestions!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk