From: David Abrahams (dave_at_[hidden])
Date: 2003-09-02 06:44:55
"Eric Friedman" <ebf_at_[hidden]> writes:
> Alexander Nasonov wrote:
>> Eric Friedman wrote:
>> > If I understand you correctly, earlier versions of variant did precisely
>> > what you describe. Unfortunately, the "assumption" you make is false in
>> > general. See
>> > Eric
>> Well, is_polymorphic<T> based on compiler properties beyond the standrad.
>> Why not optimize variant for compilers which safely memcpy forth and back?
> I'm not sure how we would know... It seems to be a very bad idea to simply
Don't guess. Test on many platforms and enable the optimization where
possible. FWIW, it's almost always possible. I can't think of a
platform where it will fail.
> Plus, for compilers where it is in fact not allowed, we still need a
> workable, defined solution.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk