Even more various cleanups#2656
Merged
StephanTLavavej merged 15 commits intomicrosoft:mainfrom Apr 16, 2022
Merged
Conversation
CaseyCarter
approved these changes
Apr 15, 2022
Contributor
CaseyCarter
left a comment
There was a problem hiding this comment.
These are all suggestions, mostly reflecting personal style preference - feel free to ignore.
Member
Author
|
Pushed comment changes as requested! |
Member
Author
|
Also pushed a conflict-free merge with |
Member
Author
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
CaseyCarter
approved these changes
Apr 16, 2022
Member
Author
|
This essentially works towards #189 (replacing "specialization dispatch" with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.