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 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 @@ -117,27 +110,16 @@ struct Allocator on_dealloc(domain, size); ::operator delete(ptr); } - - template - [[gnu::always_inline]] - void construct(U* p, Args&&... args) - { - new ((void*)p) U(std::forward(args)...); - } - - template - [[gnu::always_inline]] - void destroy(U* p) { p->~U(); } }; template -bool operator==(const Allocator& lhs, const Allocator& rhs) +constexpr bool operator==(const Allocator&, const Allocator&) { return d1 == d2; } template -bool operator!=(const Allocator& lhs, const Allocator& rhs) +constexpr bool operator!=(const Allocator&, const Allocator&) { return d1 != d2; }