|
Boost : |
Subject: Re: [boost] variant - off topic
From: Gavin Lambert (boost_at_[hidden])
Date: 2019-04-08 07:29:52
On 8/04/2019 18:29, Robert Ramey wrote:
> LOL - Looks good to me! So now we have std::variant that is guaranteed
> to have a valid state with no double buffer BS and no extra overhead.
It's restricted to only trivial types, however, which sharply limits its
usability. (Mostly just to primitives and PODs, though that's an
oversimplification.)
Or did you mean to check is_nothrow_constructible rather than
is_trivially_constructible?
(Also, for robustness you should check assignment as well as construction.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk