Re: [gtkmm] libsigc++ 2 API changes



On Wednesday 18 February 2004 17:34, Chris Vine wrote:
> On Friday 13 February 2004 20:23, Murray Cumming wrote:

> Leaving this aside, sigc::ptr_fun appears to do the same thing that
> std::ptr_fun does, namely to convert a non-member function or static member
> function to a function object.  If there is a standard library adaptor
> which will do the job, it doesn't seem to me to be desirable to duplicate
> it - or does sigc::ptr_fun to something that std::ptr_fun doesn't, and if
> so what?

If I can be forgiven for answering my own question, on looking at the 
documentation I see that sigc::ptr_fun is not limited to unary and binary 
pointers to function, for very good reasons: it is not concerned only with 
providing an interface for function pointers for such things as binders and 
negators for the standard algorithms (although it could be used for that).

It can accept functions with up to 7 or no arguments.  std:ptr_fun is in 
effect a subset of sigc::ptr_fun.

Chris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]