Boost logo

Boost :

From: Darren Cook (darren_at_[hidden])
Date: 2004-03-28 19:08:15


>>I mentioned before I want to lose one of the "type" words from:
>> index_type<C,T>::type
>
> Yes, me too. I have proposed in a response to Gary
> Powell an alternative that I like myself:
>
> template<int N> struct nth_index;
> template<typename Tag> struct index;
> template<int N> struct nth_index_iterator;
> template<int N> struct nth_index_const_iterator;
> template<typename Tag> struct index_iterator;
> template<typename Tag> struct index_const_iterator;

I currently have (C is indexed_set container type, c is instance of that
container, T is index tag):
   const typename index_type<C,T>::type& myindex=get<T>(c);
   typename index_type<C,T>::type::const_iterator i=myindex.begin();

Does this become this?
   const typename index<C,T>& myindex=get<T>(c);
   typename index_const_iterator<C,T> i=myindex.begin();

Those are both shorter and more readable, so I like them.

Darren


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