Boost logo

Boost :

Subject: Re: [boost] safe bool operator
From: Neil Groves (neil_at_[hidden])
Date: 2010-05-18 08:30:32


On Fri, Mar 5, 2010 at 9:18 AM, Domagoj Saric <
domagoj.saric_at_[hidden]> wrote:

>
> "Joel Falcou" <joel.falcou_at_[hidden]> wrote in message
> news:4B8FAD36.1020500_at_lri.fr...
> > User testimonial: in my own boost absed library when i have a pointer
> like
> > class and i want the safe bool conversion, I make it so my members are
> named
> > in such a way tha including the shared_ptr safe_bool header is all I
> need.
> > Never had any problem
>
> Isn't that actually yet another 'pointer' that a clean, public, reusable
> utility
> component is needed for this 'age old' idiom?
>
>
>
Yes, it is more supporting data that we need a reusable bool conversion
mechanism. I am finding that I need this in Boost.Range (since the
implementation in here is sub-optimal). I am also finding in my other
application development that a general utility for providing such a
mechanism would be extremely useful.

I intend to develop such a reusable Boost-ified macro and get it into the
core of Boost.

Any objections, or comments?

Regards,
Neil Groves


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