Boost logo

Boost :

From: Dirk Gerrits (dirkg_at_[hidden])
Date: 2002-06-04 14:02:56


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> Apologies for the highly compressed writing style.
>
> What I meant was that you can declare a pointer to an extern "C" function
> using a typedef:
>
> extern "C"
> {
> typedef void (*pf) ();
> }
>
> and then use this pointer as an argument:
>
> void g(pf f); // 'g' is not extern "C" itself
>
> but you can't do
>
> void g(extern "C" void (*f) ());
>
> Since bind uses overloads of the form
>
> template<class R> ... bind(R (*f) ());
>
> the typedef trick doesn't work.
>
> > > but we don't have typedef templates, alas.
> >
> > There's a workaround which mimics typedef templates. Can't this be used
> > here?
>
> Unfortunately not.

Ah I understand now. An unfortunate state of affairs. :(

Dirk Gerrits


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