From 6020739552b54feeef14545d4aaeed97c57f6128 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sat, 9 Sep 2023 11:22:30 +0800 Subject: [PATCH] [MSVC 19] error C2259: 'pmr::allocator::holder_mr': cannot instantiate abstract class. --- include/libpmr/allocator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libpmr/allocator.h b/include/libpmr/allocator.h index f12eca2..0655a7c 100644 --- a/include/libpmr/allocator.h +++ b/include/libpmr/allocator.h @@ -54,6 +54,10 @@ class LIBIMP_EXPORT allocator { public: holder_mr(MR *p_mr) noexcept : res_(p_mr) {} + + // [MSVC 19] error C2259: 'pmr::allocator::holder_mr': cannot instantiate abstract class. + void *alloc(std::size_t s, std::size_t a) const override { return nullptr; } + void dealloc(void *p, std::size_t s, std::size_t a) const override {} }; /**