I'm working with some basic signal code, and I can't figure out how this function is passed in as an argument. I came across this code in the libsigc++ tutorial:
AlienDetector mydetector;
mydetector.signal_detected.connect( sigc::ptr_fun(warn_people) );
AlienDetector has this member variable:
sigc::signal<void> signal_detected;
And warn_people is a function with a simple print statement:
void warn_people() { printf("They're here!\n"); }
Is there an example in the standard library of using a function like this? How does the compiler understand to "look for" the function that is being passed in?