|
Boost : |
From: Oleksandr Yefremov (oleksandr.yefremov_at_[hidden])
Date: 2006-07-05 12:26:42
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk