Skip to content

Commit

Permalink
refs #72, filesystem_test issues with TestAllocator
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Sep 21, 2020
1 parent a9302df commit f31b5ba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/filesystem_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,19 @@ class TestAllocator
{
public:
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 {}
template <class U>
TestAllocator(TestAllocator<U> const&) noexcept
{
}

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); }

template<class U>
struct rebind {
typedef TestAllocator<U> other;
Expand Down

0 comments on commit f31b5ba

Please sign in to comment.