aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings/eina_cxx/eina_tuple_c.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/eina_cxx/eina_tuple_c.hh')
-rw-r--r--src/bindings/eina_cxx/eina_tuple_c.hh24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bindings/eina_cxx/eina_tuple_c.hh b/src/bindings/eina_cxx/eina_tuple_c.hh
new file mode 100644
index 0000000000..64d67c49a9
--- /dev/null
+++ b/src/bindings/eina_cxx/eina_tuple_c.hh
@@ -0,0 +1,24 @@
+#ifndef EFL_EINA_EINA_TUPLE_C_HH_
+#define EFL_EINA_EINA_TUPLE_C_HH_
+
+#include <tuple>
+
+namespace efl { namespace eina { namespace _mpl {
+
+template <typename T, T... Ts>
+using tuple_c = std::tuple<std::integral_constant<T, Ts>...>;
+
+template <typename T, T... Ts>
+constexpr std::size_t tuple_c_size(tuple_c<T, Ts...> const&)
+{
+ return sizeof...(Ts);
+}
+
+constexpr std::size_t tuple_c_size(std::tuple<> const&)
+{
+ return 0;
+}
+
+} } }
+
+#endif