-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Include <cmeow> instead of <meow.h> #1405
Include <cmeow> instead of <meow.h> #1405
Conversation
I will need to revise this - we've discovered that some |
Clarifying the distinction: "core" headers don't require linking to the DLL(s) to function, so they don't include the pragma that directs the linker to link in msvcp (nor any other C++ DLL). We annotate them by adding |
We also have a whole wiki page about them: https://github.com/microsoft/STL/wiki/The-Difference-Between-Core-And-Non-Core-Headers |
These are now core: cassert, cctype, cerrno, cfenv, cinttypes, clocale, csetjmp, csignal, cstdarg, cstring, ctime, cuchar, cwctype. We need to change xstoul.cpp and xstoull.cpp because they're now including only core C wrapper headers, yet they're using the DLL export macro. Therefore, they should directly include yvals.h.
It doesn't mention anything that <new> provides. <xutility> provides uses_allocator and allocator_arg.
xstol.cpp doesn't need xmath.hpp, which is for floating-point. xstoll.cpp doesn't need xmath.hpp either, but will need yvals.h. xstoul.cpp had a leftover "macros" comment. Also, remove an empty line and move the "valid digits" comment to be more consistent with xstoull.cpp.
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.
Approved with suggestions.
STL/stl/inc/xatomic.h
Lines 14 to 16 in 5f736ef
as VS 2019 16.8 Preview 5 contains this change, and its
_MSC_FULL_VER
exceeds this value. (Also, the MSVC-internal build always uses the latest<intrin0.h>
.)stl/inc
, consistently include<cmeow>
instead of<meow.h>
. Previously, we had approximately 42 includes of<cmeow>
and 26 of<meow.h>
, so this reduces inconsistency. There should be essentially no throughput cost (especially because in many cases,<cmeow>
was already being included through another path). There is also a slight user experience benefit to consistently using<cmeow>
- while unrelated to any Standard guarantee, it is less surprising if we always drag in::meow
andstd::meow
simultaneously._CSTD
to access names.cassert
,cctype
,cerrno
,cfenv
,cinttypes
,clocale
,csetjmp
,csignal
,cstdarg
,cstring
,ctime
,cuchar
,cwctype
.xstoul.cpp
andxstoull.cpp
because they're now including only core C wrapper headers, yet they're using the DLL export macro. Therefore, they should directly includeyvals.h
.<tuple>
doesn't need to include<new>
.<new>
provides.<xutility>
providesuses_allocator
andallocator_arg
.xstol.cpp
,xstoll.cpp
,xstoul.cpp
.xstol.cpp
doesn't needxmath.hpp
, which is for floating-point.xstoll.cpp
doesn't needxmath.hpp
either, but will needyvals.h
.xstoul.cpp
had a leftover "macros" comment. Also, remove an empty line and move the "valid digits" comment to be more consistent withxstoull.cpp
.