Skip to content

Instantly share code, notes, and snippets.

@mer30hamid
Created June 22, 2014 19:44
Show Gist options
  • Save mer30hamid/1aa4352dabf160e2820e to your computer and use it in GitHub Desktop.
Save mer30hamid/1aa4352dabf160e2820e to your computer and use it in GitHub Desktop.
use lambda, a new feature of C++11, for event answering
fm.make_event<events::click>([]{
//When the form is clicked, the object created
//by this lambda will be “called”.
});
//or
fm.make_event<events::click>([](const eventinfo& ei){
//When the form is clicked, the object created
//by this lambda will be “called”, and I can
//read the parameter.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment