Boost logo

Boost :

Subject: Re: [boost] Reimplementation of the MPL for C++11
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2013-10-18 16:47:57

Eric Niebler <eniebler <at>> writes:


> Disclaimer: I haven't looked. But knowing the forward-only nature of
> parameter packs, I wonder how you can implement a random-access sequence
> like vector without (a) instantiating O(N) templates, like tuple, or (b)
> using the preprocessor and living with arbitrary limits.
> I fear that the mpl simply cannot be implemented with variadics without
> radically changing the compile-time complexity of things.

I think there's a way to do it in O(1), but it's not implemented in the
library right now. See [1].

In my opinion, this is only a tiny part of the MPL and even if it can't be
improved, there are other areas where we benefit from C++11 in the MPL.

Do you feel like that would be a deal breaker if O(1) access was impossible?


Louis Dionne


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