Displaying 1 result from an estimated 1 matches for "tribool".
Did you mean:
rbool
2018 Aug 09
2
ArgList flag values
...ne thing, if it is false I
want to do something else and if it is unspecified I want to do nothing.
ArgList::hasFlag is a convenient way to check true/false with a default
value. An ArgList::hasFlag that returned Optional<bool> would allow
checking the unspecified case. Returning some kind Tribool class object
would allow the same.
Both Optional<bool> and Tribool are somewhat overkill for this kind of
thing as I really wouldn't need to do comparisons and logical operations
on the value. A three-state enum (class) would do just as well.
Is there an existing way to handle this kin...