2 Mar
2019
2 Mar
'19
12:18 p.m.
Hi Peter, Given that the never-empty guarantee appears to be at the heart of the motivation for boost::variant2, I would suggest to: 1. put in the documentation some motivation behind pursuing the never-empty guarantee. 2. Make it clear that never-empty guarantee is not a strong exception-safety guarantee. 3. Describe the algorithm for achieving the guarantee. The current description does not seem to cover all interesting cases, and I found the behavior quite surprising. 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: https://wandbox.org/permlink/GDRyS54bpdLP7GVa Regards, Andrzej