Boost logo

Boost Users :

From: Erzengel Des Lichtes (erzengel.des.lichtes_at_[hidden])
Date: 2008-07-30 22:50:54


Ah, I see. That does make sense, in the twisted way C++ tends to.

Thank you, it is working now. That was tremendously frustrating...

On Wed, Jul 30, 2008 at 5:15 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> Erzengel Des Lichtes wrote:
>>
>> int __cdecl main(int argc, char* argv[], char* envp[])
>> {
>> boost::function<void(*)(int*)> MyFunc;
>> }
>>
>> I get the following error message:
>>
>> (Project Directory)\boostfunctest.cpp(11) : error C2079: 'MyFunc' uses
>> undefined class 'boost::function'
>> with
>> [
>> Signature=void (__stdcall *)(int *)
>> ]
>>
>
> boost::function requires a function signature.
> If you have a function pointer, you need to use
>
> #include <boost/type_traits/remove_pointer.hpp>
>
> template<class FunctionPointerType>
> void foo() {
> boost::function<typename boost::remove_pointer<FunctionPointerType>::type>
> f;
> }
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

--
Erzengel des Lichtes
光の大天使 (Hikari no Daitenshi)
Archangel of Light

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net