|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-24 17:54:37
----- Original Message -----
From: "Jens Maurer" <Jens.Maurer_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, January 24, 2002 5:14 PM
Subject: Re: [boost] function/bind with extern "C"?
> David Abrahams wrote:
> >
> > Beg pardon, but do function and bind work with extern "C" functions?
> > That would be extremely useful to me.
>
> Unless bind has special precautions to handle "extern C" functions,
> it probably should not work, because an "extern C" function pointer
> and an ordinary "extern C++" function pointer are different types
> language-wise (in particular, different calling conventions might
> apply). I don't believe that linkage specifications are "deduced"
> by template argument deduction.
Does that mean you can't pass an extern "C" function pointer through an
ordinary value parameter?
extern "C" void f();
template <class T> int g(T);
int x = g(f); // illegal?
> I agree it would be useful to add the required overloads.
But probably very disruptive if the above is illegal :(
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk