|
Boost : |
Subject: Re: [boost] [variant] awkward recursion
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-10-31 10:36:48
on Wed Oct 31 2012, "Peter Dimov" <lists-AT-pdimov.com> wrote:
> 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.
Yeah, I thought of that. Very interesting problem space in the end.
I'm slightly tempted to think about a rewrite.
-- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk