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 did verify the behavior you were seeing, has to do with the bool being in a wrapper, so the field is interpreted as an integer in the flag which implies a counting of the number flags for historical reasons and to support some particular use cases. In any case as part of that it assigns a zero to the variable. I am looking into possible solutions.
Using a recent (2021-12-27) 9ec0ba7 build, under msvc14.1x64 (2017)
I want to represent a
std::optional<bool>
flag so I triedbut
opt_bool.has_value()
is alwaystrue
afteradd_flag(..)
I can work around this via
opt->count() > 0
to reset the optional orbut was wondering if the first approach was meant to work as I had hoped?
Here's a simple project that demonstrates it: https://godbolt.org/z/cxzaY3o3s
The text was updated successfully, but these errors were encountered: