cxx: Add event_cb_add functions to events
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 10 Nov 2017 10:04:23 +0000 (19:04 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 5 Dec 2017 01:09:58 +0000 (10:09 +0900)
commit258a214e0f88915fce7651d4de595a2863716e40
tree09c6e9383968b63ef922d001d118797ffc3ba513
parentdb8227a34ad616db95d319430d270c6372485e86
cxx: Add event_cb_add functions to events

This enables a syntax like:

  button.clicked_event_cb_add([]() { std::cout << "Hello" << std::endl; });

I could not manage to pass the std::placeholders inside the template,
depending on whether the lambda has arguments or not. Not sure if
that's even possible.
src/lib/eolian_cxx/grammar/class_definition.hpp