|
Boost Users : |
Subject: Re: [Boost-users] signals/slots and boost::functions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-12-10 16:13:00
AMDG
david.weber_at_[hidden] wrote:
> <snip>
>
>
>> target returns a pointer to the function object. If TargetType is
>> void(*)() target
>> will return an object of type void(**)().
>>
>>
>
>
> So, I modfied my function to:
>
> unsigned long long slotAddr = (unsigned long long)slot.target<
> void(*)() >();
> LOG4CXX_DEBUG(logger_, "*** slotAddr = " + (boost::format("%016X") %
> slotAddr).str());
>
Sorry, I was unclear. void(*)() was just intended
as an illustration of what happens to function pointers when you call
target.
Try dereferencing the result of target.
const TargetType* target = slot.target<TargetType>();
(unsigned long long)(*target);
In Christ,
Steven Watanabe
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