refs #72, filesystem_test issues with TestAllocator

This commit is contained in:
Steffen Schuemann 2020-09-22 00:31:24 +02:00
parent a9302df045
commit f31b5baac4

View File

@ -266,17 +266,19 @@ class TestAllocator
{ {
public: public:
using value_type = T; using value_type = T;
using pointer = T*;
using const_pointer = const T*;
using reference = T&;
using const_reference = const T&;
using difference_type = ptrdiff_t;
using size_type = size_t;
TestAllocator() noexcept {} TestAllocator() noexcept {}
template <class U> template <class U>
TestAllocator(TestAllocator<U> const&) noexcept TestAllocator(TestAllocator<U> const&) noexcept
{ {
} }
value_type* allocate(std::size_t n) { return static_cast<value_type*>(::operator new(n * sizeof(value_type))); } value_type* allocate(std::size_t n) { return static_cast<value_type*>(::operator new(n * sizeof(value_type))); }
void deallocate(value_type* p, std::size_t) noexcept { ::operator delete(p); } void deallocate(value_type* p, std::size_t) noexcept { ::operator delete(p); }
template<class U> template<class U>
struct rebind { struct rebind {
typedef TestAllocator<U> other; typedef TestAllocator<U> other;