Subject: Re: [boost] [variant] awkward recursion
From: Peter Dimov (lists_at_[hidden])
Date: 2012-10-31 06:49:03


Steven Watanabe wrote:
> I believe that I've seen tickets in trac indicating
> that at least one STL implementation checks that
> the element type is complete, so we can't even
> assume that it works in practice.

The variant could perhaps define some dummy complete type X and allocate
space for vector<X>, betting on the fact that vector<Y> would have the same
size. And if it doesn't, well, the heap is it then.