No samples make use of ci::signals::slot()?

Hey Embers,

I’m curious about ci::signals::slot(): Cinder/include/cinder/Signals.h at 9348e13f4b09a7f573e8aa6dc85106d24968e7e8 · cinder/Cinder · GitHub

They seem to cover the same ground as std::bind, possibly with auto-determining parameters? But I don’t see any examples using this functionality…?



I think most samples that use signals were written in the age of boost::signals2, though since moving to our own signals impl I certainly prefer using signals::slot. I don’t see many places we use in in the cinder repo, but here is one that shows you how it is the same as using std::bind but you don’t arguments: windowTestApp.cpp.

I use signals::slot extensively in the little libraries I’ve written, such as this.


If you happen to be fortunate enough to be dancing with a compiler supporting C++20, then you may want to switch to std::bind_front():

I believe it achieves basically the same thing as cinder::signals::slot().


Lambdas have completely replaced any ::binding in my codebase, which obviates the need for signals::slot too, just as another alternative option.