Boost logo

Boost :

From: Baptiste Lepilleur (blepctc_at_[hidden])
Date: 2003-05-20 14:17:55

Please ignore the previous patch, it was buggy (operator bool was
implemented in term of operator !). This is fixed & tested now.

----- Original Message -----
From: "Daniel Frey" <daniel.frey_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, May 16, 2003 10:29 AM
Subject: [boost] Re: Patch for smart_ptr with Sun CC 5.3 to avoid compiler
internal error

> Baptiste Lepilleur wrote:
> > Sun CC 5.3 as a problem with the safe bool idiom, which result in a
> > compiler internal error when bool conversion is used.
> >
> > The attached patch (based on boost 1.30) implements the work-around
> > by Boost.Function library for Sun CC 5.3 (implement a simple bool
> > operator).
> >
> > There is probably other libraries in boost that could use that
> > work-around.
> Maybe you want to add a private declaration for an operator int() with
> no definition in the work-around. I don't know if the SunCC accepts

I'll look into that. Though, but this will have to wait a bit since we are
quite busy at the moment (boost 1.30 shared_ptr implementation seems to push
sun linker beyond its limits. We're still looking into that).

> this, but I guess it should not stress the compiler too much. This will
> give you the same level of safety like the safe-bool-idiom, thus
> creating a really compatible work-around at the cost of some ugly error
> messages in case the users tries to convert to int, double or something.
> See also the bool_testable-implementation in the operators library and
> the according discussion in the list's archive.

Adding a dependency to boost_testable should be a library designer decision,
not mine.


> Regards, Daniel
> --
> Daniel Frey

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