summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:25:02 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-01-18 22:47:04 -0200
commita1f2db255b22052050baf0c04bb72146b22a6e99 (patch)
tree8499c057a7a0054f75fe3ab4719b2cc3659949d5 /src/bindings
parent7f148feea8275d4ae3a366e5aead8170498089a6 (diff)
downloadefl-a1f2db255b22052050baf0c04bb72146b22a6e99.tar.gz
cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order of includes and creating forward declarations.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh12
-rw-r--r--src/bindings/cxx/eo_cxx/eo_cxx_interop.hh6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh b/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh
new file mode 100644
index 0000000000..f2aa9e1a2c
--- /dev/null
+++ b/src/bindings/cxx/eldbus_cxx/Eldbus_Model.hh
@@ -0,0 +1,12 @@
+#ifndef EFL_CXX_ELDBUS_MODEL_HH
+#define EFL_CXX_ELDBUS_MODEL_HH
+
+#include <Eldbus_Model.h>
+
+#ifdef EFL_BETA_API_SUPPORT
+
+#include <Eldbus_Model.eo.hh>
+
+#endif
+#endif
+
diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index 524863e418..7a2f8fb765 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -279,11 +279,11 @@ T convert_to_c(V&& object);
namespace impl {
-template <typename U, typename T>
+template <typename U, typename T, typename V>
auto convert_to_c_impl
-(T&& v, tag<U, U>, typename std::enable_if<std::is_same<typename std::remove_reference<T>::type, U>::value>::type* =0) -> decltype(std::forward<T>(v))
+(V&& v, tag<U, T>, typename std::enable_if<std::is_same<typename std::remove_reference<T>::type, U>::value>::type* =0) -> decltype(std::forward<V>(v))
{
- return std::forward<T>(v);
+ return std::forward<V>(v);
}
template <typename T>