AMDG On 4/29/19 2:28 PM, Matt Calabrese wrote:
On Mon, Apr 29, 2019 at 4:23 PM Matt Calabrese
wrote: <snip> Stressing that, as Steven points out, this wouldn't violate the never-empty guarantee *if* after stealing you were able to default-construct something on the right-hand side and update the discriminator accordingly
Continuing on this thought, you don't necessarily have to default-construct on the right-hand side to satisfy the never-empty guarantee here. If the left-hand side also happens to currently contain a recursive_wrapper, or something that is nothrow-move-constructible, it can be moved into or swapped with rhs.
That's true, but it doesn't help much, because it only applies to assignment, not construction. In Christ, Steven Watanabe