[libcxx-commits] [PATCH] D65667: [libcxx] Avoid destructor call for error_category singletons

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 10 07:33:34 PDT 2022


ldionne added inline comments.


================
Comment at: libcxx/src/ios.cpp:62
+    _LIBCPP_NO_DESTROY constinit
+    static IostreamErrorHelper s;
+    return s.iostream_error_category;
----------------
Actually, since those are `constinit`, I think we could even define them at file scope and skip the function-local static. Thoughts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65667



More information about the libcxx-commits mailing list