Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-09-02 09:12:32


"David Abrahams" <dave_at_[hidden]> wrote

> > Just out of curiosity, what's a "naive type vector"?
>
> A type vector you might implement after thinking about it for 5
> minutes.

Sorry, I mistakingly read it as a "NATIVE type vector" :)

> >> You mean iterators? What makes you think their presence is going
> >> to cause compilation to slow down?
> >
> > Well, iterators are separate templates, and require to be
> > instantiated...
>
> Only if used. The template does need to be parsed, but that's not a
> big hit. mpl::at<some_mpl_vector, N>::type doesn't use iterators.
>
> > Also if you dereference them through meta-function,
> > like mpl::dereference<Iter>::type, that's one more instantiation.
>
> Of course, but only if you use iterators.

Of course, if used. What I meant is that if you want to get all elements of
an mpl::vector<> it _might_ be faster to get them by index rather then
through iterators...

Regards,
Arkadiy


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