Boost logo

Boost :

Subject: Re: [boost] [xint] Fifth release -- one more round of reviews, please
From: Adam Merz (adammerz_at_[hidden])
Date: 2010-06-15 06:02:32

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at