Skip to content

Instantly share code, notes, and snippets.

@thiagomg
Last active August 27, 2015 18:25
Show Gist options
  • Save thiagomg/0d15b70d53aa72ecdbc0 to your computer and use it in GitHub Desktop.
Save thiagomg/0d15b70d53aa72ecdbc0 to your computer and use it in GitHub Desktop.
Lambda - Parser example
fix_parser parser;
msg_transport::received_msg(transport, [&m](auto &data) {
message m = parser.get_msg(data);
processor.new_msg(m);
});
msg_transport::received_cmd(transport, [&m](auto &data) {
command c = parser.get_msg(data);
admin.new_msg(c);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment