Remove non-portable hack of including <__msvc_chrono.hpp>
#30460
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.
I work on Microsoft Visual C++, where we regularly build popular open-source projects, including yours, with development builds of our compiler and libraries to detect and prevent shipping regressions that would affect you. This also allows us to provide advance notice of breaking changes, which is the case here.
I just merged microsoft/STL#5105, which revealed a conformance issue in TrinityCore.
The primary compiler error with this STL change is:
With many cascading errors - deduplicated to one per file, they are:
The problem is that 585900f introduced a non-portable hack, reaching into MSVC STL implementation details (undocumented and unsupported). After microsoft/STL#5105, this internal header no longer provides
system_clockor thechrono_literals, so you must include the full<chrono>.(We added
<__msvc_chrono.hpp>to improve the compiler throughput / build speed of<thread>etc., and we're movingsystem_clocketc. out of it in order to further improve compiler throughput. This MSVC STL internal header was never intended for users to include directly, and is not a general mechanism to "include the pre-C++20 parts of<chrono>". I recognize that it's ironic that our change to improve compiler throughput elsewhere will decrease your throughput as you have to include the full header.)As an aside, if you want to significantly improve compiler throughput, I recommend setting up precompiled headers; it takes a bit of work but it significantly improves build throughput. (C++20 header units are an alternative, but may be less easy to adopt.)