"Eric Friedman" <[EMAIL PROTECTED]> 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 > http://aspn.activestate.com/ASPN/Mail/Message/boost/1311813. >> > >> > 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 > guess.
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. Absolutely. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost