summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2014-02-26 12:12:21 -0300
committerCedric Bail <cedric.bail@free.fr>2014-02-26 12:18:26 -0300
commit97ede98b5df45c3ba0da5aec3cf8fbcd30f6bd44 (patch)
tree06eecc8e9c5dc0e2d1da931078444c92da77dbc2 /src
parent1fb3822893a414b123f81f4b4ae4faa105e4fdc4 (diff)
eina_cxx: fix build with clang.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina_cxx/eina_clone_allocators.hh2
-rw-r--r--src/lib/eina_cxx/eina_inarray.hh3
-rw-r--r--src/lib/eina_cxx/eina_ptrarray.hh8
-rw-r--r--src/lib/eina_cxx/eina_ptrlist.hh12
-rw-r--r--src/lib/eina_cxx/eina_thread.hh14
-rw-r--r--src/lib/eina_cxx/eina_value.hh5
6 files changed, 25 insertions, 19 deletions
diff --git a/src/lib/eina_cxx/eina_clone_allocators.hh b/src/lib/eina_cxx/eina_clone_allocators.hh
index 6f7aba49eb..459b6356cd 100644
--- a/src/lib/eina_cxx/eina_clone_allocators.hh
+++ b/src/lib/eina_cxx/eina_clone_allocators.hh
@@ -46,7 +46,7 @@ struct view_clone_allocator
46 return const_cast<T*>(&v); 46 return const_cast<T*>(&v);
47 } 47 }
48 template <typename T> 48 template <typename T>
49 static void deallocate_clone(T* p) 49 static void deallocate_clone(T*)
50 { 50 {
51 } 51 }
52}; 52};
diff --git a/src/lib/eina_cxx/eina_inarray.hh b/src/lib/eina_cxx/eina_inarray.hh
index 3619358bad..4b59be6e0d 100644
--- a/src/lib/eina_cxx/eina_inarray.hh
+++ b/src/lib/eina_cxx/eina_inarray.hh
@@ -375,7 +375,8 @@ public:
375 } 375 }
376 for(size_type i = 0;i != n;++i) 376 for(size_type i = 0;i != n;++i)
377 new (&*first++) T(t); 377 new (&*first++) T(t);
378 assert(last - first == _array->len - index - n); 378 std::size_t diff = last - first;
379 assert(diff == _array->len - index - n);
379 while(first != last) 380 while(first != last)
380 { 381 {
381 new (&*first++) T(*old_first); 382 new (&*first++) T(*old_first);
diff --git a/src/lib/eina_cxx/eina_ptrarray.hh b/src/lib/eina_cxx/eina_ptrarray.hh
index 7b0e88b6ed..85ed8b607b 100644
--- a/src/lib/eina_cxx/eina_ptrarray.hh
+++ b/src/lib/eina_cxx/eina_ptrarray.hh
@@ -233,10 +233,10 @@ public:
233 } 233 }
234 void push_back(pointer p) 234 void push_back(pointer p)
235 { 235 {
236 std::auto_ptr<value_type> p1(p); 236 std::unique_ptr<value_type> p1(p);
237 push_back(p1); 237 push_back(p1);
238 } 238 }
239 void push_back(std::auto_ptr<T>& p) 239 void push_back(std::unique_ptr<T>& p)
240 { 240 {
241 if(eina_array_push(this->_impl._array, p.get())) 241 if(eina_array_push(this->_impl._array, p.get()))
242 p.release(); 242 p.release();
@@ -253,10 +253,10 @@ public:
253 } 253 }
254 iterator insert(iterator i, pointer pv) 254 iterator insert(iterator i, pointer pv)
255 { 255 {
256 std::auto_ptr<value_type> p(pv); 256 std::unique_ptr<value_type> p(pv);
257 return insert(i, p); 257 return insert(i, p);
258 } 258 }
259 iterator insert(iterator i, std::auto_ptr<value_type>& p) 259 iterator insert(iterator i, std::unique_ptr<value_type>& p)
260 { 260 {
261 std::size_t j 261 std::size_t j
262 = i.native_handle() - this->_impl._array->data 262 = i.native_handle() - this->_impl._array->data
diff --git a/src/lib/eina_cxx/eina_ptrlist.hh b/src/lib/eina_cxx/eina_ptrlist.hh
index b9132872b7..0ae0319a1f 100644
--- a/src/lib/eina_cxx/eina_ptrlist.hh
+++ b/src/lib/eina_cxx/eina_ptrlist.hh
@@ -225,10 +225,10 @@ public:
225 } 225 }
226 void push_back(pointer p) 226 void push_back(pointer p)
227 { 227 {
228 std::auto_ptr<value_type> p1(p); 228 std::unique_ptr<value_type> p1(p);
229 push_back(p1); 229 push_back(p1);
230 } 230 }
231 void push_back(std::auto_ptr<T>& p) 231 void push_back(std::unique_ptr<T>& p)
232 { 232 {
233 Eina_List* new_list = eina_list_append(this->_impl._list, p.get()); 233 Eina_List* new_list = eina_list_append(this->_impl._list, p.get());
234 if(new_list) 234 if(new_list)
@@ -245,10 +245,10 @@ public:
245 } 245 }
246 void push_front(pointer p) 246 void push_front(pointer p)
247 { 247 {
248 std::auto_ptr<value_type> p1(p); 248 std::unique_ptr<value_type> p1(p);
249 push_front(p1); 249 push_front(p1);
250 } 250 }
251 void push_front(std::auto_ptr<T>& p) 251 void push_front(std::unique_ptr<T>& p)
252 { 252 {
253 Eina_List* new_list = eina_list_prepend(this->_impl._list, p.get()); 253 Eina_List* new_list = eina_list_prepend(this->_impl._list, p.get());
254 if(new_list) 254 if(new_list)
@@ -273,10 +273,10 @@ public:
273 } 273 }
274 iterator insert(iterator i, pointer pv) 274 iterator insert(iterator i, pointer pv)
275 { 275 {
276 std::auto_ptr<value_type> p(pv); 276 std::unique_ptr<value_type> p(pv);
277 return insert(i, p); 277 return insert(i, p);
278 } 278 }
279 iterator insert(iterator i, std::auto_ptr<value_type>& p) 279 iterator insert(iterator i, std::unique_ptr<value_type>& p)
280 { 280 {
281 this->_impl._list = _eina_list_prepend_relative_list 281 this->_impl._list = _eina_list_prepend_relative_list
282 (this->_impl._list, p.get(), i.native_handle()); 282 (this->_impl._list, p.get(), i.native_handle());
diff --git a/src/lib/eina_cxx/eina_thread.hh b/src/lib/eina_cxx/eina_thread.hh
index bb630a5d27..84bd0e53e7 100644
--- a/src/lib/eina_cxx/eina_thread.hh
+++ b/src/lib/eina_cxx/eina_thread.hh
@@ -167,6 +167,13 @@ struct thread_id
167 } 167 }
168private: 168private:
169 Eina_Thread _raw; 169 Eina_Thread _raw;
170
171 template <typename charT, typename Traits>
172 friend std::basic_ostream<charT, Traits>&
173 operator<<(std::basic_ostream<charT, Traits>& out, thread_id id)
174 {
175 return out << id._raw;
176 }
170}; 177};
171 178
172inline bool operator<=(thread_id lhs, thread_id rhs) 179inline bool operator<=(thread_id lhs, thread_id rhs)
@@ -182,13 +189,6 @@ inline bool operator>=(thread_id lhs, thread_id rhs)
182 return !(lhs < rhs); 189 return !(lhs < rhs);
183} 190}
184 191
185template <typename charT, typename Traits>
186std::basic_ostream<charT, Traits>&
187operator<<(std::basic_ostream<charT, Traits>& out, thread_id id)
188{
189 return out << id._raw;
190}
191
192namespace _detail { 192namespace _detail {
193 193
194struct arguments 194struct arguments
diff --git a/src/lib/eina_cxx/eina_value.hh b/src/lib/eina_cxx/eina_value.hh
index 378c344f91..b202f2e63e 100644
--- a/src/lib/eina_cxx/eina_value.hh
+++ b/src/lib/eina_cxx/eina_value.hh
@@ -232,6 +232,11 @@ struct _eina_value_traits<T[], typename eina::enable_if<eina::is_pod<T>::value>:
232 } 232 }
233}; 233};
234 234
235class eina_value;
236
237template <typename T>
238T get(eina_value const& v);
239
235class eina_value 240class eina_value
236{ 241{
237 template <typename T> 242 template <typename T>