diff --git a/src/util/memory_manager.h b/src/util/memory_manager.h index 053816449..a50d03ac3 100644 --- a/src/util/memory_manager.h +++ b/src/util/memory_manager.h @@ -131,6 +131,10 @@ void dealloc_svect(T * ptr) { template struct std_allocator { using value_type = T; + // the constructors must be proveded according to cpp docs + std_allocator() = default; + template constexpr std_allocator(const std_allocator&) noexcept {} + T* allocate(std::size_t n) { return static_cast(memory::allocate(n * sizeof(T))); @@ -141,6 +145,12 @@ struct std_allocator { } }; +// the comparison operators must be proveded according to cpp docs +template +bool operator==(const std_allocator&, const std_allocator&) { return true; } +template +bool operator!=(const std_allocator&, const std_allocator&) { return false; } + struct mem_stat { }; diff --git a/src/util/vector.h b/src/util/vector.h index 9ca9a1103..55b52d745 100644 --- a/src/util/vector.h +++ b/src/util/vector.h @@ -42,7 +42,7 @@ Revision History: #endif template -class std_vector : public std::vector> {}; +using std_vector = std::vector>; #if 0