-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Refactor <limits>
usage
#4634
Merged
Merged
Refactor <limits>
usage
#4634
Commits on Apr 27, 2024
-
Avoid including <limits> to improve throughput
Based on microsoft#4627 fixup that extracts `_In_range` This also makes some place dirctly using `_In_range`, but mostly `_Max_limit` is used
Configuration menu - View commit details
-
Copy full SHA for 5b7d561 - Browse repository at this point
Copy the full SHA 5b7d561View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ed2d06 - Browse repository at this point
Copy the full SHA 7ed2d06View commit details -
Configuration menu - View commit details
-
Copy full SHA for 362cb22 - Browse repository at this point
Copy the full SHA 362cb22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04fee98 - Browse repository at this point
Copy the full SHA 04fee98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 228b235 - Browse repository at this point
Copy the full SHA 228b235View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5adceae - Browse repository at this point
Copy the full SHA 5adceaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e123f28 - Browse repository at this point
Copy the full SHA e123f28View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd292a8 - Browse repository at this point
Copy the full SHA dd292a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 61a2844 - Browse repository at this point
Copy the full SHA 61a2844View commit details
Commits on Apr 28, 2024
-
Co-authored-by: A. Jiang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6e66be7 - Browse repository at this point
Copy the full SHA 6e66be7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f80b87 - Browse repository at this point
Copy the full SHA 2f80b87View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5894028 - Browse repository at this point
Copy the full SHA 5894028View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07a711a - Browse repository at this point
Copy the full SHA 07a711aView commit details
Commits on Apr 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e5d63d3 - Browse repository at this point
Copy the full SHA e5d63d3View commit details
Commits on May 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 85900ec - Browse repository at this point
Copy the full SHA 85900ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d3e8ad - Browse repository at this point
Copy the full SHA 8d3e8adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 516e1f3 - Browse repository at this point
Copy the full SHA 516e1f3View commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8fdf232 - Browse repository at this point
Copy the full SHA 8fdf232View commit details
Commits on May 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4c623a5 - Browse repository at this point
Copy the full SHA 4c623a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2a6ab1 - Browse repository at this point
Copy the full SHA f2a6ab1View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd59736 - Browse repository at this point
Copy the full SHA bd59736View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82344d2 - Browse repository at this point
Copy the full SHA 82344d2View commit details -
in_range
: Use it in<semaphore>
with bonus cleanups.* This was unnecessarily asserting *strictly* less than `ULONG_MAX`, not that it mattered. * We can/should use Standard `in_range` because `<semaphore>` is C++20. * We control `_Ten_days`, so this should be an `_STL_INTERNAL_STATIC_ASSERT`. * As a scalar, `_Ten_days` doesn't need to be `static constexpr`, it can/should be plain `constexpr`.
Configuration menu - View commit details
-
Copy full SHA for 40fd472 - Browse repository at this point
Copy the full SHA 40fd472View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90651a6 - Browse repository at this point
Copy the full SHA 90651a6View commit details -
_Meow_limit
: Use it in_Could_compare_equal_to_value_type
.We know `is_integral_v<_Elem>` and `is_signed_v<_Elem>` so this is definitely ok.
Configuration menu - View commit details
-
Copy full SHA for 4b70a7e - Browse repository at this point
Copy the full SHA 4b70a7eView commit details -
_Max_limit
: Use it in_Mul_overflow
.This is `_Integer_like _Int`, which is ok because we handle `_Signed128` and `_Unsigned128`. The first case is simple: `_Int` is known to be unsigned, and we want the maximum. The second case requires a bit of thought. `_Int` is known to be signed, and `_UInt` is its unsigned counterpart. This code wants the maximum `_Int`, stored in `_UInt` type. The new function makes this clearer than the old math.
Configuration menu - View commit details
-
Copy full SHA for 6040623 - Browse repository at this point
Copy the full SHA 6040623View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1461144 - Browse repository at this point
Copy the full SHA 1461144View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a62472 - Browse repository at this point
Copy the full SHA 5a62472View commit details -
Be daring, part 3: Add an escape hatch.
The following headers are no longer including `<limits>`: * C++14 `<xmemory>` * C++20 `<format>` * C++23 `<mdspan>` The installed base of C++20/23 code is far smaller, and far more modern. We don't need escape hatches for them. However, we should have an escape hatch for the `<xmemory>` change, as I expect that this will otherwise be too disruptive.
Configuration menu - View commit details
-
Copy full SHA for 8af943a - Browse repository at this point
Copy the full SHA 8af943aView commit details -
GH 4646 <xutility>: unify min/max limit
Co-authored-by: Alex Guteniev <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5440892 - Browse repository at this point
Copy the full SHA 5440892View commit details
Commits on May 18, 2024
-
Be less daring, comment why, partially resurrect GH 3631 "Don't inclu…
…de `<cwchar>` in `<limits>`". Co-authored-by: A. Jiang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 942ccef - Browse repository at this point
Copy the full SHA 942ccefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0841c99 - Browse repository at this point
Copy the full SHA 0841c99View commit details
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.