Boost logo

Boost :

From: Dirk Gerrits (dirk_at_[hidden])
Date: 2002-11-21 15:49:00


Fernando Cacciola wrote:

[snip]

> void recieve_async_message()
> {
> optional rcv ;
> while ( !!(rcv = get_async_input()) && !timeout() )
> output(*rcv);
> }

[snip]

Maybe it's a minor point, but I think the !! is really ugly. Have you
considered the safe_bool idiom that's used in some other Boost
libraries? (smart_ptr to name one.)

Regards,
Dirk Gerrits


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