Skip to content

P3230 R2 views::unchecked_(take|drop) #1876

@wg21bot

Description

@wg21bot
Collaborator

P3230R0 views::(take|drop)_exactly (Hewill Kang)

Activity

added this to the 2024-telecon milestone on Apr 17, 2024
dhollman

dhollman commented on Jun 28, 2024

@dhollman
Collaborator

SG9 St. Louis

SG9 saw this paper in St. Louis. We took the following polls, and we intend to follow up with mailing list discussion and electronic polling once the author makes the suggested revisions.


SG9 would like to see something in the name to indicate that the bounds are unchecked since this presents a significant safety and correctness concern.

Unanimous consent.


SG9 thinks that a checked version of (take|drop)_exactly with semantics of producing an error on overrun would be useful enough to merit a separate paper in addition to the unchecked version (that should be named differently).

SF F N A SA
1 2 3 1 2

No consensus for change
10 attending, author SA


take_while(expensive_predicate) | take_unchecked(N) gives us a useful performance example that does not require benchmarks.

Despite this example, SG9 still believes that benchmarks would significantly improve the case for this paper in LEWG and would be worth the author's time to collect.

SF F N A SA
2 4 1 1 1

SA: semantic use cases that involve fewer invocations of user-defined predicates have already been presented as performance arguments in other cases (as_input, cache_one). This is not substantially different from those discussions.
10 in the room, author A


With unchecked instead of exactly and benchmarks added, we are comfortable with mailing list review and electronic poll to forward this paper to LEWG. (We do not see significant additional SG9-specific discussion unless the benchmark results are controversial on the mailing list.)

SF F N A SA
3 3 2 0 0

SG9 also reviewed wording and the author will work offline to make several changes.

There was also discussion about whether empty_view should be special-cased to return the same type, just as with take. We will continue that discussion on the mailing list review.

wg21bot

wg21bot commented on Dec 18, 2024

@wg21bot
CollaboratorAuthor

P3230R1 views::unchecked_(take|drop) (Hewill Kang)

13 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B3 - additionBucket 3 as described by P0592: material that is not mentioned in P0592C++29Targeted at C++29ISShip vehicle: ISLEWGLibrary Evolutionrangesstd::rangesready-for-library-evolution-meeting-reviewThis paper needs to be discussed at a Library Evolution meetingsize - mediumpaper size estimate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dhollman@cor3ntin@JeffGarland@inbal2l@wg21bot

        Issue actions

          P3230 R2 views::unchecked_(take|drop) · Issue #1876 · cplusplus/papers