From 2f7c78a515c39bf1032bdf4217a57718e788a94e Mon Sep 17 00:00:00 2001 From: Cameron DaCamara Date: Tue, 22 Sep 2020 17:45:02 -0700 Subject: [PATCH] mark `memory_resource` dtor as `default` to enable constant destruction in derived classes [This is a dual of internal [MSVC-PR-276531](https://devdiv.visualstudio.com/DevDiv/_git/msvc/pullrequest/276531)] --- stl/inc/xpolymorphic_allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/xpolymorphic_allocator.h b/stl/inc/xpolymorphic_allocator.h index 4aa55864f94..63bece9c8ed 100644 --- a/stl/inc/xpolymorphic_allocator.h +++ b/stl/inc/xpolymorphic_allocator.h @@ -140,7 +140,7 @@ namespace pmr { // CLASS memory_resource class __declspec(novtable) memory_resource { public: - virtual ~memory_resource() noexcept {} + virtual ~memory_resource() noexcept = default; _NODISCARD __declspec(allocator) void* allocate(_CRT_GUARDOVERFLOW const size_t _Bytes, const size_t _Align = alignof(max_align_t)) { // allocate _Bytes bytes of memory with alignment _Align