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

Casey's miscellaneous changes, definitive edition #5014

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Commits on Oct 13, 2024

  1. Improve formatting of _Default_allocate_traits

    Define a new macro instead of conditionally inserting `_CONSTEXPR20`.
    
    Drive-by: Combine nested conditionals.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    356a733 View commit details
    Browse the repository at this point in the history
  2. Fix TRANSITION comment for disabled EDG config in `P1502R1_standard…

    …_library_header_units`
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    9b9746c View commit details
    Browse the repository at this point in the history
  3. Annotate Clang workaround TRANSITION, Clang 19

    Discovered this has been fixed in 19.1.0 after reducing a repro to file.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    d714722 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8b66c5e View commit details
    Browse the repository at this point in the history
  5. Simplify unreachable_sentinel_t

    We had to workaround the fact that hidden friends aren't hidden in permissive mode by stuffing `unreachable_sentinel_t`'s `operator==` into a detail namespace. Now that the changes to C++20 relational expressions are implemented, we can use a member `operator==` instead of a `friend` to more simply achieve the same effect. See https://godbolt.org/z/x5ffjdxYf for a proof-of-concept.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    0a20ee8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5d34647 View commit details
    Browse the repository at this point in the history
  7. Cleanup some iterator definitions

    * Remove nested type names that are extraneous in C++20 to help us avoid depending on the existence of said nested type names.
    * Always declare the "nested 5 iterator traits" (or the subset of them a given iterator provides) in canonical order at the top of the first public section in a class body.
    * When the "nested 5 iterator traits" _are_ available, use their names in the semantically appropriate places in member function declarations. For example, `reference operator*() const`.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    a1f56a6 View commit details
    Browse the repository at this point in the history
  8. Rename _Merge_move to _Merge_move_unchecked

    For consistency with other algorithms that take unwrapped iterators.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    5df1935 View commit details
    Browse the repository at this point in the history
  9. Improve detection of library-defined array specializations

    `_Unchecked_begin`/`_Unchecked_end` are semi-documented, so their presence doesn't necessarily indicate a specialization is library-defined. Use our `_Is_from_primary` tech, and remove the now-unused `_Has_unchecked_begin_end`.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    9edaef9 View commit details
    Browse the repository at this point in the history
  10. Add some internal checks to internal algorithms

    `_Uninitialized_copy`, `_Uninitialized_copy_n`, and `_Uninitialized_move` in `<xmemory>` are internal-only, and trust that the caller has passed arguments that denote a valid range. I am not so trusting.
    
    `_STL_INTERNAL_CHECK((_STD _Adl_verify_range(_First, _Last), true))` feels like a bit of a hack - I could be convinced to simply wrap the `_Adl_verify_range` call in `#ifdef _ENABLE_STL_INTERNAL_CHECK`.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    cd2726d View commit details
    Browse the repository at this point in the history
  11. Verify that arguments to subrange's iter/sentinel constructors deno…

    …te a range
    
    They must per N4988 [range.subrange.ctor] para 1 and 3. As a rule, we never verify that `[begin(meow), end(meow))` for a range `meow` actually denotes a range, so `subrange`'s constructors are the only chance we have to verify these user-supplied values.
    CaseyCarter committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    503f161 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. STL's review comments

    CaseyCarter committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    3a576af View commit details
    Browse the repository at this point in the history