jackdanielz pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b71612eb20a707994839491ef211b3f8def6585c
commit b71612eb20a707994839491ef211b3f8def6585c Author: Daniel Zaoui <daniel.za...@yahoo.com> Date: Thu Sep 7 01:24:52 2017 +0300 cxx: generate a constructor with a parent and a lambda function Until now, one could not invoke functions into the constructor of a widget possessing a parent. It is needed for widgets such as Efl.Ui.Check where style is needed during construction. @fix T5980 --- src/lib/eolian_cxx/grammar/class_definition.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp index 0b26d7c78c..c05ea6d0bf 100644 --- a/src/lib/eolian_cxx/grammar/class_definition.hpp +++ b/src/lib/eolian_cxx/grammar/class_definition.hpp @@ -64,6 +64,10 @@ struct class_definition_generator << scope_tab << "{\n" << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, ::efl::eo::concrete{nullptr}, _eo_class(), f);\n" << scope_tab << "}\n" + << scope_tab << "template <typename F> " << string << "( ::efl::eo::concrete parent, F f, typename ::std::enable_if< ::efl::eolian::is_callable<F>::value>::type* = 0)\n" + << scope_tab << "{\n" + << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, parent, _eo_class(), f);\n" + << scope_tab << "}\n" // << scope_tab << "explicit " << string << "( ::efl::eo::concrete const& parent)\n" // << scope_tab << scope_tab << ": ::efl::eo::concrete( ::efl::eo::do_eo_add(parent)) {}\n" // << scope_tab << "template <typename F>\n" --