|
Boost : |
Subject: Re: [boost] [MPL][vector] Is there interest in mpl::vector using variadic templates?
From: Peter Dimov (lists_at_[hidden])
Date: 2017-03-03 16:58:23
Bruno Dutra wrote:
> OTOH the void* trick requires that a pack of M void pointers be
> instantiated when the element at position M is retrieved from a list, so,
> for a list of N elements, the compiler must instantiate N *distinct* packs
> of void pointers, because each of these packs have a different size and is
> thus a distinct type.
Not just that, but the helper function that is required to obtain the Mth
element is a template instantiation as well.
Saying that we shouldn't use map_from_list because it consumes memory for
the instantiation is misleading; the alternatives consume memory for
instantiations as well. Except for __type_pack_element, of course.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk