-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Even more various cleanups #2656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Even more various cleanups #2656
Conversation
CaseyCarter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all suggestions, mostly reflecting personal style preference - feel free to ignore.
|
Pushed comment changes as requested! |
|
Also pushed a conflict-free merge with |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
This essentially works towards #189 (replacing "specialization dispatch" with |
More things I've noticed while modularizing the STL, updating the toolset, and reviewing code.
<fstream>and<random>don't need to suppress warning C4127 "conditional expression is constant" anymore. I believe we've already converted the affected code to useif constexpr.<codecvt>, finish converting all_Mymodetests to useif constexprso we can drop the C4127 suppression.(_Mymode & generate_header) != 0at compile-time first, potentially skipping the runtime test of*_Pstate == 0uwhich has no side effects.<regex>, convert_Cl_names::_Get()to useif constexpr. Also add_NODISCARDandnoexcept.<xlocnum>, useif constexprinstead of_Hex_float_precisionspecializations.13hexits, but I've kept the existing structure since it explains what's happening. (This may also affect the 80-bitlong doubles that we don't officially support but also avoid gratuitously breaking.)<xlocmon>access control:public:in_Mpunct.money_getandmoney_putshould sayprivate:explicitly.<variant>'sget()andget_if().<xlocale>'s definition oflocale.ATOMIC_FLAG_INIT.inline constexprconsistently in<execution>.abort()to avoid assertion crash dialogs.msvc_stdlib_force_include.hoverrides_CRT_SECURE_INVALID_PARAMETERto callabort(). However,_STL_VERIFYshouldn't emit long strings for function names #2054 changedyvals.hto sometimes bypass_CRT_SECURE_INVALID_PARAMETERand call::_invalid_parameter()directly. For reasons I don't currently understand, when my work machine upgraded to VS 2022 17.2 Preview 3, this emits assertion crash dialogs (whereas my home machine still doesn't). This happens when a few XFAILed libcxx tests have failing_STL_ASSERTs. I considered updating libcxx's force-included header to also override the new layer_STL_CRT_SECURE_INVALID_PARAMETER, but that's a fair amount of logistical effort - and I noticed that tests/std and tests/tr1 are also affected, including our header units test which doesn't want macros defined by force-included headers. Thus, I am simply introducing a new object-like macro that the 3 test suites can define on the command line._RPTF0(_CRT_ASSERT, mesg)to report the message. (Perhaps this does nothing for UI programs that don't have a console or file for such output?) Specifically, I wonder whether we should simply alwaysabort()here. However, I don't want to perform such a significant change right now.msvc_stdlib_force_include.h, notmsvc_stdlib_force_include.hpp.structured_bindings.pass.cppwas XFAILed due to DevCom-1559808. Again for reasons I don't currently understand, when my work machine upgraded to VS 2022 17.2 Preview 3, this consistently emits an ICE (fatal error C1001) with a compiler crash dialog, which is extremely annoying. I'd like to mark this as SKIPPED, even though this will make it harder to notice if/when the compiler bug is finally fixed.