-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The tribool interface is not very user-friendly, I saw more than once following error:
assignment:
boost::tribool v1 = boost::tribool::false_value;
boost::tribool v2 = boost::tribool::true_value;
boost::tribool v3 = boost::tribool::indeterminate_value;
comparison:
v1 == boost::tribool::false_value;
v2 == boost::tribool::true_value;
v3 == boost::tribool::indeterminate_value;
The issue is frequent because of auto completion.
Since operator==, operator safe_bool and the function indeterminate it is possible to query the status of boost::tribool, I do not think there are good reasons for the value_t to be public.
If boost::tribool::value_t is changed to private, some function like indeterminate and operator! needs to be made friends, but otherwise there should be no other issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels