[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
Mon Apr 11 09:39:22 PDT 2022
ldionne added a comment.
Thanks for reviving this! I have a few comments and I also created D123519 <https://reviews.llvm.org/D123519> to try and simplify this patch. I think i'm fine with this once it is rebased onto D123519 <https://reviews.llvm.org/D123519>.
================
Comment at: libcxx/include/__config:760-764
+#ifdef _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
+# define _LIBCPP_CONSTEXPR_WHEN_NONLEGACY
+#else
+# define _LIBCPP_CONSTEXPR_WHEN_NONLEGACY _LIBCPP_CONSTEXPR
+#endif
----------------
I think we can get rid of those definitions once D123519 lands.
================
Comment at: libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/iostream_category.pass.cpp:25
+ }
+} a;
+
----------------
Can you make this:
```
struct A { same-as-before };
static A a;
```
I initially missed the fact that you were defining `A` *and* defining `a` at the same time. I think it's a bit easier to read if you make it explicit. This applies to other patches as well.
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