Re: Alternative to sigc::mem_fun



On Tue, 19 Jun 2018 17:00:35 +0100
Daniel Boles via gtkmm-list <gtkmm-list gnome org> wrote:
I still don't see the problem. There is an overload that takes a reference
instead and should be in each case.

So, for

*sigc::mem_fun * *(* *T_obj * * *_A_obj*,


*T_return(T_obj2::*)(T_arg1, T_arg2) * *_A_func*

*)*

you should substitute

*sigc::mem_fun * *(* *T_obj & * *_A_obj*,


*T_return(T_obj2::*)(T_arg1) * *_A_func*

*)*


These are immediately adjacent in the docs:
https://developer.gnome.org/libsigc++/stable/group__mem__fun.html#ga0df7af9f32990cc624c4bb60782b4f78

or did I miss something else and this doesn't work for you somehow?

The poster is confusing sigc::mem_fun() with std::mem_fun().

To the OP: from C++11 onwards, in place of std::mem_fun() use either
std::bind or a lambda expression.  None of this affects sigc::mem_fun().


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