-
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
Various cleanups #2140
Various cleanups #2140
Conversation
@@ -95,7 +95,7 @@ _NODISCARD inline int stoi(const string& _Str, size_t* _Idx = nullptr, int _Base | |||
_Xinvalid_argument("invalid stoi argument"); | |||
} | |||
|
|||
if (_Errno_ref == ERANGE || _Ans < INT_MIN || INT_MAX < _Ans) { |
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.
will this break icc? I mean I don't care, but that may be why we checked this in the first place
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.
Good question (as we try to avoid gratuitous breaks). It shouldn't - the Intel C++ Compiler issues we've encountered have involved 80-bit long double
(and occasionally new compiler intrinsics). AFAIK, there are no issues with our LLP64 assumption that sizeof(int)
equals sizeof(long)
equals 4
(that assumption is widespread throughout our codebase).
This was originally being checked because MSVC's STL was licensed from Dinkumware, where the upstream source code was portable to many platforms.
I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed. |
This is a collection of unrelated cleanups, structured as a series of commits for easier reviewing. I've separated out the pure comments/formatting cleanups (#2136), test fixes (#2137), and product fixes (#2138, #2139), leaving these commits which alter syntax but don't significantly change behavior. The user-visible changes are to
<stdatomic.h>
and (almost invisibly)<experimental/coroutine>
.__DOUBLE_EXPONENT_BITS
/__FLOAT_EXPONENT_BITS
.<Windows.h>
now.typename CharT
toclass CharT
.exception_ptr
operators; provide only necessary ones for C++20.size() == 0
toempty()
forstring
s.(b.func) (b.data)
.auto
.tests.py
should map/std:c++latest
to'c++2b'
#2001 is fixed).stdatomic.h
as C.<stdatomic.h>
breaks the CoreCLR build dotnet/runtime#57618 .stoi()
:int
andlong
are the same size for us.<experimental/coroutine>
(improves syntax highlighting).yvals_core.h
, or numbering them.<xthreads.h>
size/alignment constants._Ugly
instead of_UGLY_MACROS
. There are other macro constants but I didn't want to perform invasive renamings for them at this time.