Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-09-02 08:59:19

"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>> MPL vectors contain optimizations that a naive type vector (and
>> _especially_ a typelist) does not
> Just out of curiosity, what's a "naive type vector"?

A type vector you might implement after thinking about it for 5

>> 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.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at