summaryrefslogtreecommitdiff
path: root/src/memory.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory.hh')
-rw-r--r--src/memory.hh22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/memory.hh b/src/memory.hh
index fe6f70ea..b25e687d 100644
--- a/src/memory.hh
+++ b/src/memory.hh
@@ -89,13 +89,6 @@ template<typename T, MemoryDomain domain>
struct Allocator
{
using value_type = T;
- // TODO: remove that once we have a c++11 compliant stdlib
- using pointer = T*;
- using const_pointer = const T*;
- using reference = T&;
- using const_reference = const T&;
- using size_type = std::size_t;
- using difference_type = std::ptrdiff_t;
Allocator() = default;
template<typename U>
@@ -117,27 +110,16 @@ struct Allocator
on_dealloc(domain, size);
::operator delete(ptr);
}
-
- template<class U, class... Args>
- [[gnu::always_inline]]
- void construct(U* p, Args&&... args)
- {
- new ((void*)p) U(std::forward<Args>(args)...);
- }
-
- template<class U>
- [[gnu::always_inline]]
- void destroy(U* p) { p->~U(); }
};
template<typename T1, MemoryDomain d1, typename T2, MemoryDomain d2>
-bool operator==(const Allocator<T1, d1>& lhs, const Allocator<T2, d2>& rhs)
+constexpr bool operator==(const Allocator<T1, d1>&, const Allocator<T2, d2>&)
{
return d1 == d2;
}
template<typename T1, MemoryDomain d1, typename T2, MemoryDomain d2>
-bool operator!=(const Allocator<T1, d1>& lhs, const Allocator<T2, d2>& rhs)
+constexpr bool operator!=(const Allocator<T1, d1>&, const Allocator<T2, d2>&)
{
return d1 != d2;
}