Boost logo

Boost :

From: Geoffrey Irving (irving_at_[hidden])
Date: 2006-09-21 13:53:22


On Thu, Sep 21, 2006 at 10:43:28AM -0700, Sohail Somani wrote:
> > -----Original Message-----
> > From: boost-bounces_at_[hidden]
> > [mailto:boost-bounces_at_[hidden]] On Behalf Of Geoffrey Irving
> > {assert(i<3);return (&x)[i];}
>
> Hi, when checking for an unsigned index/counter less than 3, it is
> customary to use the following comparison:
>
> assert(i<3u);

Customary? You don't need to be that polite: my code was just wrong.
Thanks for the correction.

Geoffrey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk