From e9b09a5ee7211091d8e7398471eb6265fc452e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 11 Dec 2022 20:36:28 +0100 Subject: [PATCH] Use direct-initialization since copy-initialization invokes the copy ctor in older standard versions --- src/global_resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global_resource.cpp b/src/global_resource.cpp index b3fa761..f57a572 100644 --- a/src/global_resource.cpp +++ b/src/global_resource.cpp @@ -128,7 +128,7 @@ namespace container { namespace pmr { std::atomic& default_memory_resource_instance() { - static std::atomic instance = new_delete_resource(); + static std::atomic instance(new_delete_resource()); return instance; }