Boost logo

Boost :

Subject: Re: [boost] [variant2] documentation request
From: Peter Dimov (lists_at_[hidden])
Date: 2019-03-03 03:17:38

> Andrzej Krzemienski wrote:
> > For instance, the variant's move assignment will sometimes use T's move
> > assignment rather than move constructor when changing the variant's
> > type, as in the following example:
> >
> >
> Interesting.
> Since the destructors and the move assignments are trivial, this variant
> has a pseudo-trivial move constructor, that is, it does the equivalent of
> memcpy.
> This however doesn't quite match the specification.
> I need to look into the latest changes to std::variant to see how it
> handles triviality in this case.

Not surprisingly std::variant gets this correct and only trivially assigns
when trivially constructible too. Should be fixed in,

Boost list run by bdawes at, gregod at, cpdaniel at, john at