
31 Oct
2012
31 Oct
'12
10:49 a.m.
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.