12 Jun
2017
12 Jun
'17
3:36 p.m.
On Wed, Jun 7, 2017 at 10:28 AM, Peter Dimov via Boost
Gottlob Frege wrote:
Agreed. But I don't see much value in the never-empty guarantee if it doesn't give you the strong guarantee.
I'm not sure I understand this fully; could you please explain from what expressions, and under what conditions, you expect the strong guarantee?
variant
v1, v2; X x; v1= v2; // do you expect strong guarantee here? v1 = std::move(v2); // here? v1 = x; // here? v1 = std::move(x); // here? v1.emplace<X>(); // here?
How about "all of the above"? At least when X and Y each offer the strong guarantee? ie allow variant to be as strong as its components. ? Tony