[Tribool] Comparation tribool value with indeterminate constant

Hello, I have proposal to make small change to the Tribool library. Now it is possible to write following code tribool b = indeterminate ; if (indeterminate (b)) { // process indeterminate case } if (b == indeterminate) { // this always false and should never be used in real code } I propose to change following operators to get compiler errors in above code fragment: tribool operator==(indeterminate_keyword_t, tribool); tribool operator==(tribool, indeterminate_keyword_t); tribool operator!=(indeterminate_keyword_t, tribool); tribool operator!=(tribool, indeterminate_keyword_t); change returning value type to void like this. void operator==(indeterminate_keyword_t, tribool); void operator==(tribool, indeterminate_keyword_t); void operator!=(indeterminate_keyword_t, tribool); void operator!=(tribool, indeterminate_keyword_t); -- Best regards, Oleksandr Yefremov
participants (1)
-
Oleksandr Yefremov