Skip to content

Instantly share code, notes, and snippets.

@joseph-montanez
Created March 11, 2013 21:40
Show Gist options
  • Save joseph-montanez/5138025 to your computer and use it in GitHub Desktop.
Save joseph-montanez/5138025 to your computer and use it in GitHub Desktop.
function<Fl_Event_Handler> fn;
fn = [data] (int event) -> int {
return on_event(event, data);
};
Fl::add_handler(fn);
// error: aggregate ‘std::function<int (*)(int)> fn’ has incomplete type and cannot be defined
// Fl_Event_Handle siganture is "int (*)(int)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment