
15 Jun
2010
15 Jun
'10
10:02 a.m.
A quick request: can you give integer_t a safe bool conversion operator? integer_t's comparison operators don't have overloads to compare directly to primitive integral types (which *would* be nice to have, but I'm not formally requesting that), so checking for a value with 'if (i != 0) { ... }' creates a temporary. Since integer_t has operator! but no bool conversion operator, I've been using 'if (!!i) { ... }' to avoid creation of a temporary, which looks a bit silly.