
From: David Abrahams <dave@boost-consulting.com>
"Thorsten Ottosen" <nesotto@cs.auc.dk> 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@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;