|
Boost : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-03-29 01:41:07
Hi Darren
Darren Cook ha escrito:
> >>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();
>
Not exactly. It'd be
const typename index<C,T>::type& myindex=get<T>(c);
typename index_const_iterator<C,T>::type i=myindex.begin();
The "_type" is omitted, but the "::type" cannot be eliminated.
BTW, there are alternative wordings to the lines above:
const typename C::index<T>::type& myindex=get<T>(c);
typename C::index_const_iterator<T>::type i=myindex.begin();
Regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk