[libcxx-commits] [PATCH] D65667: [libcxx] Early-initialize error_category singletons
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 16 14:49:33 PDT 2019
mclow.lists added inline comments.
================
Comment at: libcxx/src/system_error.cpp:202
+union GenericAndSystemErrorHelper {
+ struct {
+ __generic_error_category new_generic_error_category;
----------------
Why do you overlay both of these in a single structure?
Is your intent that a program only calls either `generic_category` or `system_category` in any particular run of the program? Otherwise, don't you get UB?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65667/new/
https://reviews.llvm.org/D65667
More information about the libcxx-commits
mailing list