summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-09-14 15:06:10 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-09-14 15:06:33 -0300
commit44c0199f4213a1b600569674ff3d6bc3d9395704 (patch)
treebe2180b90f88921031513d07bd2feb04a28bb5a9 /src
parent761e6a304ca0d6e89e3a5ffff62d2cf53fbc96cb (diff)
eolian-cxx: Fix instantiate constructor with lambda after disambiguation patch
Diffstat (limited to 'src')
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp2
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_binding.cc11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 2e53b6e6a7..71808a3a48 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -73,7 +73,7 @@ struct class_definition_generator
73 << scope_tab << "{\n" 73 << scope_tab << "{\n"
74 << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, ::efl::eo::concrete{nullptr}, _eo_class(), f);\n" 74 << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, ::efl::eo::concrete{nullptr}, _eo_class(), f);\n"
75 << scope_tab << "}\n" 75 << scope_tab << "}\n"
76 << scope_tab << "template <typename F> " << string << "( ::efl::eo::instantiate_t, ::efl::eo::concrete parent, F f, typename ::std::enable_if< ::efl::eolian::is_callable<F>::value>::type* = 0)\n" 76 << scope_tab << "template <typename T, typename F> " << string << "( ::efl::eo::instantiate_t, T&& parent, F f, typename ::std::enable_if< ::efl::eolian::is_callable<F>::value && ::efl::eo::is_eolian_object<T>::value>::type* = 0)\n"
77 << scope_tab << "{\n" 77 << scope_tab << "{\n"
78 << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, parent, _eo_class(), f);\n" 78 << scope_tab << scope_tab << "::efl::eolian::do_eo_add( ::efl::eo::concrete::_eo_raw, parent, _eo_class(), f);\n"
79 << scope_tab << "}\n" 79 << scope_tab << "}\n"
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
index 489a308493..90f880e319 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
@@ -44,6 +44,17 @@ START_TEST(eolian_cxx_test_binding_constructor_all_optionals)
44 } 44 }
45 ); 45 );
46 46
47 nonamespace::Generic g2
48 (efl::eo::instantiate, g,
49 [&]
50 {
51 g.required_ctor_a(2);
52 g.required_ctor_b(4);
53 g.optional_ctor_a(3);
54 g.optional_ctor_b(5);
55 }
56 );
57
47 fail_if(2 != g.req_ctor_a_value_get()); 58 fail_if(2 != g.req_ctor_a_value_get());
48 fail_if(3 != g.opt_ctor_a_value_get()); 59 fail_if(3 != g.opt_ctor_a_value_get());
49 fail_if(4 != g.req_ctor_b_value_get()); 60 fail_if(4 != g.req_ctor_b_value_get());