summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2014-02-26 12:09:26 -0300
committerCedric Bail <cedric.bail@free.fr>2014-02-26 12:18:26 -0300
commit1fb3822893a414b123f81f4b4ae4faa105e4fdc4 (patch)
tree11392801a85ee06cc1e6bb82fc71d1cc75737ba6 /src
parent2d520158233b35c408677e61da79e8beda17c41c (diff)
eina_cxx: fix build on 32bits systems.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina_cxx/eina_value.hh41
1 files changed, 25 insertions, 16 deletions
diff --git a/src/lib/eina_cxx/eina_value.hh b/src/lib/eina_cxx/eina_value.hh
index aee5b853c2..378c344f91 100644
--- a/src/lib/eina_cxx/eina_value.hh
+++ b/src/lib/eina_cxx/eina_value.hh
@@ -8,28 +8,15 @@
8 8
9namespace efl { namespace eina { 9namespace efl { namespace eina {
10 10
11template <typename T, typename Enable = void>
12struct _eina_value_traits;
13
11template <typename T> 14template <typename T>
12struct _eina_value_traits_base; 15struct _eina_value_traits_base;
13 16
14template <typename T> 17template <typename T>
15struct _eina_value_traits_aux; 18struct _eina_value_traits_aux;
16 19
17// Indirection for uint64_t. uint64_t can be a typedef for unsigned
18// long, so we can't specialize on the same template
19template <>
20struct _eina_value_traits_aux<uint64_t>
21{
22 static ::Eina_Value_Type const* value_type()
23 {
24 return EINA_VALUE_TYPE_UINT64;
25 }
26};
27
28template <typename T, typename Enable = void>
29struct _eina_value_traits : _eina_value_traits_aux<T>
30{
31};
32
33template <typename T> 20template <typename T>
34struct _eina_value_traits_base 21struct _eina_value_traits_base
35{ 22{
@@ -62,6 +49,23 @@ struct _eina_value_traits_base
62 } 49 }
63}; 50};
64 51
52// Indirection for uint64_t. uint64_t can be a typedef for unsigned
53// long, so we can't specialize on the same template
54template <>
55struct _eina_value_traits_aux<uint64_t>
56 : _eina_value_traits_base<uint64_t>
57{
58 static ::Eina_Value_Type const* value_type()
59 {
60 return EINA_VALUE_TYPE_UINT64;
61 }
62};
63
64template <typename T, typename Enable>
65struct _eina_value_traits : _eina_value_traits_aux<T>
66{
67};
68
65template <> 69template <>
66struct _eina_value_traits<unsigned char> 70struct _eina_value_traits<unsigned char>
67 : _eina_value_traits_base<unsigned char> 71 : _eina_value_traits_base<unsigned char>
@@ -241,6 +245,11 @@ public:
241 : _raw(_eina_value_traits<char>::create()) 245 : _raw(_eina_value_traits<char>::create())
242 { 246 {
243 } 247 }
248 template <typename T>
249 eina_value(T v)
250 {
251 primitive_init(v);
252 }
244 eina_value(char v) 253 eina_value(char v)
245 { 254 {
246 primitive_init(v); 255 primitive_init(v);