forked from enlightenment/efl
eina_cxx: fix build with clang.
This commit is contained in:
parent
1fb3822893
commit
97ede98b5d
|
@ -46,7 +46,7 @@ struct view_clone_allocator
|
|||
return const_cast<T*>(&v);
|
||||
}
|
||||
template <typename T>
|
||||
static void deallocate_clone(T* p)
|
||||
static void deallocate_clone(T*)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
|
@ -375,7 +375,8 @@ public:
|
|||
}
|
||||
for(size_type i = 0;i != n;++i)
|
||||
new (&*first++) T(t);
|
||||
assert(last - first == _array->len - index - n);
|
||||
std::size_t diff = last - first;
|
||||
assert(diff == _array->len - index - n);
|
||||
while(first != last)
|
||||
{
|
||||
new (&*first++) T(*old_first);
|
||||
|
|
|
@ -233,10 +233,10 @@ public:
|
|||
}
|
||||
void push_back(pointer p)
|
||||
{
|
||||
std::auto_ptr<value_type> p1(p);
|
||||
std::unique_ptr<value_type> p1(p);
|
||||
push_back(p1);
|
||||
}
|
||||
void push_back(std::auto_ptr<T>& p)
|
||||
void push_back(std::unique_ptr<T>& p)
|
||||
{
|
||||
if(eina_array_push(this->_impl._array, p.get()))
|
||||
p.release();
|
||||
|
@ -253,10 +253,10 @@ public:
|
|||
}
|
||||
iterator insert(iterator i, pointer pv)
|
||||
{
|
||||
std::auto_ptr<value_type> p(pv);
|
||||
std::unique_ptr<value_type> p(pv);
|
||||
return insert(i, p);
|
||||
}
|
||||
iterator insert(iterator i, std::auto_ptr<value_type>& p)
|
||||
iterator insert(iterator i, std::unique_ptr<value_type>& p)
|
||||
{
|
||||
std::size_t j
|
||||
= i.native_handle() - this->_impl._array->data
|
||||
|
|
|
@ -225,10 +225,10 @@ public:
|
|||
}
|
||||
void push_back(pointer p)
|
||||
{
|
||||
std::auto_ptr<value_type> p1(p);
|
||||
std::unique_ptr<value_type> p1(p);
|
||||
push_back(p1);
|
||||
}
|
||||
void push_back(std::auto_ptr<T>& p)
|
||||
void push_back(std::unique_ptr<T>& p)
|
||||
{
|
||||
Eina_List* new_list = eina_list_append(this->_impl._list, p.get());
|
||||
if(new_list)
|
||||
|
@ -245,10 +245,10 @@ public:
|
|||
}
|
||||
void push_front(pointer p)
|
||||
{
|
||||
std::auto_ptr<value_type> p1(p);
|
||||
std::unique_ptr<value_type> p1(p);
|
||||
push_front(p1);
|
||||
}
|
||||
void push_front(std::auto_ptr<T>& p)
|
||||
void push_front(std::unique_ptr<T>& p)
|
||||
{
|
||||
Eina_List* new_list = eina_list_prepend(this->_impl._list, p.get());
|
||||
if(new_list)
|
||||
|
@ -273,10 +273,10 @@ public:
|
|||
}
|
||||
iterator insert(iterator i, pointer pv)
|
||||
{
|
||||
std::auto_ptr<value_type> p(pv);
|
||||
std::unique_ptr<value_type> p(pv);
|
||||
return insert(i, p);
|
||||
}
|
||||
iterator insert(iterator i, std::auto_ptr<value_type>& p)
|
||||
iterator insert(iterator i, std::unique_ptr<value_type>& p)
|
||||
{
|
||||
this->_impl._list = _eina_list_prepend_relative_list
|
||||
(this->_impl._list, p.get(), i.native_handle());
|
||||
|
|
|
@ -167,6 +167,13 @@ struct thread_id
|
|||
}
|
||||
private:
|
||||
Eina_Thread _raw;
|
||||
|
||||
template <typename charT, typename Traits>
|
||||
friend std::basic_ostream<charT, Traits>&
|
||||
operator<<(std::basic_ostream<charT, Traits>& out, thread_id id)
|
||||
{
|
||||
return out << id._raw;
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator<=(thread_id lhs, thread_id rhs)
|
||||
|
@ -182,13 +189,6 @@ inline bool operator>=(thread_id lhs, thread_id rhs)
|
|||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
template <typename charT, typename Traits>
|
||||
std::basic_ostream<charT, Traits>&
|
||||
operator<<(std::basic_ostream<charT, Traits>& out, thread_id id)
|
||||
{
|
||||
return out << id._raw;
|
||||
}
|
||||
|
||||
namespace _detail {
|
||||
|
||||
struct arguments
|
||||
|
|
|
@ -232,6 +232,11 @@ struct _eina_value_traits<T[], typename eina::enable_if<eina::is_pod<T>::value>:
|
|||
}
|
||||
};
|
||||
|
||||
class eina_value;
|
||||
|
||||
template <typename T>
|
||||
T get(eina_value const& v);
|
||||
|
||||
class eina_value
|
||||
{
|
||||
template <typename T>
|
||||
|
|
Loading…
Reference in New Issue