From 71a7831c2d362fb5d084c7e25a3c9100adb6109a Mon Sep 17 00:00:00 2001 From: Alex Fishgait Date: Tue, 10 Oct 2023 13:23:47 +0200 Subject: [PATCH] define copy constructor for NAlloc --- tests/src/unit-allocator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-allocator.cpp b/tests/src/unit-allocator.cpp index c22f343ff..3b15cfc8c 100644 --- a/tests/src/unit-allocator.cpp +++ b/tests/src/unit-allocator.cpp @@ -283,11 +283,16 @@ struct NAlloc }; NAlloc() : - alloc(), m_alloc_size(0) + alloc() { } + NAlloc(const NAlloc&) = default; // Copy constructor + NAlloc(NAlloc&&) = default; // Move constructor + NAlloc& operator=(const NAlloc& other) = default; // Copy assignment operator + NAlloc& operator=(NAlloc&&) = default; // Move assignment operator + virtual ~NAlloc() = default; pointer allocate(std::size_t n)