On Fri, Jul 26, 2013 at 7:03 AM, Murray Cumming <murr...@murrayc.com> wrote:

> C+11 has std::function<> which is a bit like sigc::slot, though C++11
> doesn't have anything like sigc::signal<>. I played with that here:
>
> http://www.murrayc.com/permalink/2013/07/08/c-in-glom-shared_ptr-and-slotsfunctions/
>
> I've noticed that std::function<> works with libsigc++, as in the code
> below, but I wonder why it works. Can anyone explain?
>
>
I have used boost::function with sigc++, and my guess when it worked is
that sigc++::slot (like boost slots and other similar libraries, including
our own that we use for ardour) only requires an operator()() (i.e. functor
invocation), which std::function also provides. last time i looked,
sigc::slot is heavily templated, so any class that provides the required
(minimal) API will work.

what made you expect that it would *not* work?
_______________________________________________
libsigc-list mailing list
libsigc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/libsigc-list

Reply via email to