[libcxx-commits] [PATCH] D96200: [libc++] Remove C++11 work-arounds in src.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 6 08:54:34 PST 2021


Mordante updated this revision to Diff 321943.
Mordante added a comment.

Partial revert, since one modification is still required for C++11.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96200/new/

https://reviews.llvm.org/D96200

Files:
  libcxx/src/experimental/memory_resource.cpp


Index: libcxx/src/experimental/memory_resource.cpp
===================================================================
--- libcxx/src/experimental/memory_resource.cpp
+++ libcxx/src/experimental/memory_resource.cpp
@@ -76,12 +76,7 @@
   ~ResourceInitHelper() {}
 };
 
-// When compiled in C++14 this initialization should be a constant expression.
-// Only in C++11 is "init_priority" needed to ensure initialization order.
-#if _LIBCPP_STD_VER > 11
-_LIBCPP_SAFE_STATIC
-#endif
-ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX;
+_LIBCPP_SAFE_STATIC ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX;
 
 } // end namespace
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96200.321943.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210206/ac634771/attachment.bin>


More information about the libcxx-commits mailing list