Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-08-12 08:47:44


From: David Abrahams <dave_at_[hidden]>
> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
>
> > The boost iterators new iterator traits has this naming scheme:
> >
> > iterator_value<T>::type
> > iterator_difference<T>::type
> >
> > I have used this scheme (originally proposed by Peter Dimov)
> >
> > iterator_of<T>::type
> > value_type_of<T>::type.
> >
> > The question is now if the range librray should do as the iterator
> > library, ie, prefix everyhitng with "range_":
> >
> > range_iterator<T>::type
> > range_value_type<T>::type
>
> We chose "iterator_value" et al because we couldn't be sure that
> someone wouldn't need to make another concept Q in boost that had its
> own, separate notion of an value_type. If you then had a type X that
> fulfilled both the Iterator and Q concepts, how would you specialize
> value_type_of?

It "iterator_of" and "value_type_of" were in separate namespaces
for the separate concepts, then they could be qualified or not as
the user sees fit using namespace aliases, using directives, and
full qualification. That would yield common names across
concepts with the qualification -- like much of the other related
code for the concepts -- the differentiator.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

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