|
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
minutes.
>> 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 http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk