Repository navigation
Include instead of - #1405
Include instead of #1405Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
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 thatprovides. 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.
Casey Carter (CaseyCarter)
left a comment
There was a problem hiding this comment.
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_VERexceeds this value. (Also, the MSVC-internal build always uses the latest.)stl/inc, consistently includeinstead of. Previously, we had approximately 42 includes ofand 26 of, so this reduces inconsistency. There should be essentially no throughput cost (especially because in many cases,was already being included through another path). There is also a slight user experience benefit to consistently using- while unrelated to any Standard guarantee, it is less surprising if we always drag in::meowandstd::meowsimultaneously._CSTDto access names.cassert,cctype,cerrno,cfenv,cinttypes,clocale,csetjmp,csignal,cstdarg,cstring,ctime,cuchar,cwctype.xstoul.cppandxstoull.cppbecause they're now including only core C wrapper headers, yet they're using the DLL export macro. Therefore, they should directly includeyvals.h.doesn't need to include.provides.providesuses_allocatorandallocator_arg.xstol.cpp,xstoll.cpp,xstoul.cpp.xstol.cppdoesn't needxmath.hpp, which is for floating-point.xstoll.cppdoesn't needxmath.hppeither, but will needyvals.h.xstoul.cpphad a leftover "macros" comment. Also, remove an empty line and move the "valid digits" comment to be more consistent withxstoull.cpp.