14 Jun
2017
14 Jun
'17
1:27 p.m.
Andrzej Krzemienski wrote:
So, you mean -- unless I am using the special "valueless" type -- all assignments/emplacements/swaps are strong (possibly at the expense of double buffering in some cases)? That is, there is no "get C upon unsuccessful assignment of A to B"?
The only situation in which you get a C is when C is the special `valueless` type, yes. This does not mean that all assignments are strong. In variant<vector<string>> v1, v2; v1 = v2; the assignment is basic, because that's the guarantee vector<string>::operator= gives.