You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found a strange behavior using the optional class.
If I use the move assignment operator of the optional, the resulting object has always valid flag set and the storage is moved.
Was that intended?
Here is a small example:
Dear John,
I've found a strange behavior using the
optional
class.If I use the move assignment operator of the optional, the resulting object has always
valid
flag set and thestorage
is moved.Was that intended?
Here is a small example:
The program results in the output:
I expected the move assignment to move both
valid
andstorage
.The text was updated successfully, but these errors were encountered: