Boost logo

Boost :

From: Frank Laub (frank.laub_at_[hidden])
Date: 2005-12-22 04:16:39


>
> Frank Laub wrote:
> >> Is there a particular reason why this compiler complains about the
> >> conversion whereas the others are fine with it? Would you consider
> making
> >> this change to support this compiler?
> >
> > I'm happy to make a change that supports more compilers. Thanks for
> trying
> > it out on Borland. I'll have an update soon.
>
> Actually, this is not about supporting more compilers - this about
> fixing a bug. Putting 'return false' there is a bug, plain and simple,
> and 'return optional()' is the right thing to do, whether we care about
> more compilers support or not...

I hadn't realized that this was an improper usage of optional. I returned
'false' because it felt like a 'natural' thing to return as that of a
failure. Because the compiler and my tests showed this to work, I figured
optional had a special bool constructor or something. I've noticed others
use a 'none' type. I suppose the default ctor is the preferred way?

Thanks for the heads up.

-Frank


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