Skip to content

Instantly share code, notes, and snippets.

@JakubOboza
Created December 12, 2008 19:18
Show Gist options
  • Save JakubOboza/35234 to your computer and use it in GitHub Desktop.
Save JakubOboza/35234 to your computer and use it in GitHub Desktop.
struct HelloWorld
{
void operator()() const
{
std::cout << "Hello, World!" << std::endl;
}
};
// ...
// Signal with no arguments and a void return value
boost::signal<void ()> sig;
// Connect a HelloWorld slot
HelloWorld hello;
sig.connect(hello);
// Call all of the slots
sig();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment