Hi,
I'm currently trying to wrap (or forward) a call to
boost::signal::connect(), to - amongst other things -
insulate users from using boost::bind.
So what I have is something like this:
template< typename Signature, class Reciever >
void connect( const signal_id& id,
const Signature& sig,
const Reciever* rcv
)
{
typedef ???? AdaptedSignature;
get_signal< AdaptedSignature > ( id ) -> connect(boost::bind(sig, rcv,
_1));
}
now this code is supposed to be called like this:
connect( some_signal_id, &SomeClass::some_member, someClass_instance );
where SomeClass::some_member has the same function signature as the
signal which is associated with some_signal_id.
e.g.
boost::signal signal;
struct SomeClass {
void some_member(bool b);
};
So my question is how can I construct the "AdaptedSignature" type from
the template deduced "Signature"?
From what I gather from the documentation, boost function_types might
hold the answer to my question, but I cannot figure out how.
So is what I am trying to do possible, and is function_types the right tool?
TIA
Fabio