Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-07-19 14:16:35


----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, July 19, 2002 8:44 PM
Subject: Re: [boost] boost::function< R (*) (A1, A2) >

> I've implemented this capability in Boost.Function; it's in CVS now. The
class
> template boost::function now effectively has a dual signature:

I might be wrong, but your implementation just seems to check if the first
template parameter is a pointer-to-function type. Doesn't this break old
code that define a function<> returning a function pointer?

void (*)(int) MyFunc(void)
{ ... }

function<void (*)(int)> a = MyFunc; // now it's broken!

Giovanni Bajo


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