libzypp
13.10.6
|
Comparing two TriBool values is not as easy as it might look like, because the TriBool::operator==
and TriBool::operator!=
return a TriBool.
For example is (indeterminate==indeterminate)
not true
, but indeterminate
. That's why the following snippet does not do what the author expected:
You find that get()
returns false
as long as the option is unset, and not true
as the code suggests. That's because (_value==indeterminate)
returns indeterminate
.
indeterminate(_value)
to test whether a TriBools value is indeterminate: