Boost logo

Boost :

Subject: Re: [boost] [function_types] is there an equivalent for functors?
From: Edd Dawson (lists_at_[hidden])
Date: 2010-07-05 17:27:57

On 7/5/2010 10:11 PM, Sohail Somani wrote:
> 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?

typeid(T).name() is a mangled name on all my g++ based implementations, so I
can't generate an accurate call signature for the slot without doing some g++
specific stuff there.

Did you manage to do a compatability check some other way?


Boost list run by bdawes at, gregod at, cpdaniel at, john at