Boost logo

Boost Users :

From: Simon Buchan (simon_at_[hidden])
Date: 2005-09-14 23:02:02


Bruno Martínez wrote:
> Hi.
>
> When using pointers to functions with bind, the particular function
> doesn't play a part in the return value's type of bind. That is
>
> void func1();
> void func2();
>
> typeid(boost::bind(&func1)) == typeid(boost::bind(&func1)) // this is true
>
> I need the types to be different to store bind objects with the
> serialization library. The C++ Templates book proposes an adaptor that
> takes the pointer to function as a template parameter. However, this
> adaptor is particular to a given signature, and I don't know how to
> rewrite it more generally. Is this possible? Can I more easily make
> boost::bind do what I want?
>
> Bruno
You may be making more work for yourself than you need to, why
do you need to serialize bind objects? I haven't used the
serialization lib, but a quick look-through doesn't really bring
any times to mind where I would want to serialize a boost::bind
functor!


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