Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-12-01 05:51:40


David A. Greene wrote:
> Is it possible to have an MPL vector of MPL vectors?

Sure. MPL sequences are polymorphic regarding their elements; everything
that is a type can be put into a sequence, and everything in MPL is a type
:).

> When I try this, the compiler (g++ 3.2) complains about an incomplete
> type for push_back_traits:

[snip code]

The error is not related to the fact that you are trying to create a "vector
of vectors"; if you try to 'push_back' an 'int' into a vector, you'll get
the same diagnostics. Basically, what compiler is trying to say here is that
'push_back' on 'vector' is currently not implemented, - sorry! I know it
differs from what the docs say, and it's on my to do list. Meanwhile, if you
switch to using 'push_front' instead, everything will work just fine.
Sometimes 'push'-ing backwards (i.e. at front) makes things much
harder/messy than they could be, though, so let me know if that's the case
here.

Aleksey


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