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.
The tribool interface is not very user-friendly, I saw more than once following error:
assignment:
comparison:
The issue is frequent because of auto completion.
Since
operator==,operator safe_booland the functionindeterminateit is possible to query the status ofboost::tribool, I do not think there are good reasons for thevalue_tto be public.If
boost::tribool::value_tis changed to private, some function likeindeterminateandoperator!needs to be made friends, but otherwise there should be no other issues.