Boost logo

Boost :

Subject: Re: [boost] [safebool] Can we generalize it and put it into utilities?
From: Vladimir Batov (batov_at_[hidden])
Date: 2009-03-31 06:19:31

> From: "Steven Watanabe" <watanabesj_at_[hidden]>
> I consider any speed differences to be highly unlikely.
> IMO, you should pick one interface and stick to it.
> There is no reason to provide several ways to do the
> same thing when there are only minor syntactic differences.

Thanks, Steven. This is much appreciated. In my own work I certainly strive
to provide one way to do one thing. Here with so many different opinions,
preferences, etc. I find it difficult. If we are to pick one out of the
following three:

{ return safebool<Foo>(c); }
{ return safebool<Foo>::apply(c); }
{ return make_safebool<Foo>(c); }

Then, I can't think of a reason why the user might prefer
'safebool::apply()' to just 'safebool()'. As for or 'make_safebool', then
make_pair() was introduced to simplify pair creation. Given creating
safebool is straightforward, I do not feel 'make_safebool' makes things any


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