Skip to content
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 32 commits into from
May 20, 2024
Merged

Commits on Apr 27, 2024

  1. 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
    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    5b7d561 View commit details
    Browse the repository at this point in the history
  2. expect test failures

    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    7ed2d06 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    362cb22 View commit details
    Browse the repository at this point in the history
  4. one more skip

    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    04fee98 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    228b235 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5adceae View commit details
    Browse the repository at this point in the history
  7. one more skip

    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    e123f28 View commit details
    Browse the repository at this point in the history
  8. restrict to <tr1common>

    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    dd292a8 View commit details
    Browse the repository at this point in the history
  9. upstream knows

    AlexGuteniev committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    61a2844 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2024

  1. Update stl/inc/xlocnum

    Co-authored-by: A. Jiang <[email protected]>
    AlexGuteniev and frederick-vs-ja committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    6e66be7 View commit details
    Browse the repository at this point in the history
  2. Revert "restrict to <tr1common>" +

    This reverts commit dd292a8.
    AlexGuteniev committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    2f80b87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5894028 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    07a711a View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    e5d63d3 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Avoid breaking old code

    and actually improving throughput
    AlexGuteniev committed May 1, 2024
    Configuration menu
    Copy the full SHA
    85900ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d3e8ad View commit details
    Browse the repository at this point in the history
  3. unexpect test failures

    AlexGuteniev committed May 1, 2024
    Configuration menu
    Copy the full SHA
    516e1f3 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Some tests still fail

    AlexGuteniev committed May 2, 2024
    Configuration menu
    Copy the full SHA
    8fdf232 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. Configuration menu
    Copy the full SHA
    4c623a5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2a6ab1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd59736 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    82344d2 View commit details
    Browse the repository at this point in the history
  5. 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`.
    StephanTLavavej committed May 17, 2024
    Configuration menu
    Copy the full SHA
    40fd472 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    90651a6 View commit details
    Browse the repository at this point in the history
  7. _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.
    StephanTLavavej committed May 17, 2024
    Configuration menu
    Copy the full SHA
    4b70a7e View commit details
    Browse the repository at this point in the history
  8. _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.
    StephanTLavavej committed May 17, 2024
    Configuration menu
    Copy the full SHA
    6040623 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1461144 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5a62472 View commit details
    Browse the repository at this point in the history
  11. 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.
    StephanTLavavej committed May 17, 2024
    Configuration menu
    Copy the full SHA
    8af943a View commit details
    Browse the repository at this point in the history
  12. GH 4646 <xutility>: unify min/max limit

    Co-authored-by: Alex Guteniev <[email protected]>
    StephanTLavavej and AlexGuteniev committed May 17, 2024
    Configuration menu
    Copy the full SHA
    5440892 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2024

  1. Be less daring, comment why, partially resurrect GH 3631 "Don't inclu…

    …de `<cwchar>` in `<limits>`".
    
    Co-authored-by: A. Jiang <[email protected]>
    StephanTLavavej and frederick-vs-ja committed May 18, 2024
    Configuration menu
    Copy the full SHA
    942ccef View commit details
    Browse the repository at this point in the history
  2. No more libcxx FAILs.

    StephanTLavavej committed May 18, 2024
    Configuration menu
    Copy the full SHA
    0841c99 View commit details
    Browse the repository at this point in the history