Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-05-14 09:23:45

On Monday 07 May 2001 04:40 am, you wrote:
> To whom this may concern (or just 'Hi'),
> When the to undeleteble* conversion feature of 'function'
> is used with GCC 2.95.2, it won't work in the following
> situation:
> void func(const boost::function<...> &f)
> {
> if (f) {
> ...
> }
> }
> It is solved when either 'f' is passed by value or when
> 'f' is explicitly compared to 0 (f != 0 in this case).
> I suspect it is a compiler problem, am I right?
> Anyone, does it work for a newer version of GCC?
> Geurt

It's also broken under 2.95.3, but this is a compiler bug and I wasn't able
to find a workaround (it seems that GCC just won't try the user-defined
conversions here). GCC 3.0 (prerelease) handles it correctly, however, so I
think it is safe to ignore the problem for now.


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