Boost logo

Boost :

Subject: Re: [boost] [function_types] is there an equivalent for functors?
From: Sohail Somani (sohail_at_[hidden])
Date: 2010-07-05 17:11:36


On 10-07-05 5:06 PM, Edd Dawson wrote:
> On 7/5/2010 9:39 PM, Sohail Somani wrote:
>> On 10-07-05 4:14 PM, Edd Dawson wrote:
>>> Yeah. I've got an optional check using QMetaObject::checkConnectArgs
>>> that the signal/slot parameters do indeed match. I composed the slot
>>> signature string using some std::type_info/demangling hackery for the
>>> platforms I'm interested in.
>>
>> Is that necessary? I'm not sure.
>
> Well, what's to stop you connecting a Qt signal with signature
> "itemChanged(const QString &)" to something like a function<void (int)>
> otherwise (and casting a QString* to an int* in the process)?

Oh, whoops, I meant using platform-specific stuff. Just a vector of
typeids should be enough?

Will take a look at your implementation, thanks!


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