aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindings/eina_cxx/eina_type_traits.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/eina_cxx/eina_type_traits.hh')
-rw-r--r--src/bindings/eina_cxx/eina_type_traits.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bindings/eina_cxx/eina_type_traits.hh b/src/bindings/eina_cxx/eina_type_traits.hh
index 9e8628ad90..ff8bfbbff9 100644
--- a/src/bindings/eina_cxx/eina_type_traits.hh
+++ b/src/bindings/eina_cxx/eina_type_traits.hh
@@ -64,6 +64,22 @@ struct if_ : if_c<U::value, T, F>
{
};
+template <typename T>
+struct container_value_type
+{
+ typedef typename std::conditional<
+ std::is_void<T>::value
+ , T*, T>::type type;
+};
+
+template <typename T>
+struct nonconst_container_value_type
+{
+ typedef typename std::conditional<
+ std::is_void<T>::value
+ , T*, typename std::remove_const<T>::type>::type type;
+};
+
/**
* @}
*/