Title
Missing preconditions for slide_view constructor
Status
c++23
Section
[range.slide.view]
Submitter
Hewill Kang

Created on 2022-06-10.00:00:00 last changed 4 months ago

Messages

Date: 2022-07-25.20:32:58

Proposed resolution:

This wording is relative to N4910.

  1. Modify [range.slide.view] as indicated:

    constexpr explicit slide_view(V base, range_difference_t<V> n);
    

    -?- Preconditions: n > 0 is true.

    -1- Effects: Initializes base_ with std::move(base) and n_ with n.

Date: 2022-07-25.00:00:00

[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]

Date: 2022-07-15.00:00:00

[ 2022-07-15; LWG telecon: move to Ready ]

Date: 2022-06-15.00:00:00

[ 2022-06-21; Reflector poll ]

Set status to Tentatively Ready after six votes in favour during reflector poll.

Date: 2022-06-10.00:00:00

It doesn't make sense for slide_view when n is not positive, we should therefore add a precondition for its constructor just like we did for chunk_view.

Daniel:

Indeed the accepted paper describes the intention in P2442R1 Section 4.2 by saying that "It is a precondition that N is positive" in the design wording but omitted to add a normative precondition in the proposed wording.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2022-07-25 20:32:58adminsetmessages: + msg12652
2022-07-25 20:32:58adminsetstatus: ready -> wp
2022-07-25 20:28:19adminsetmessages: + msg12626
2022-06-21 11:47:28adminsetmessages: + msg12522
2022-06-21 11:47:28adminsetstatus: new -> ready
2022-06-11 15:37:36adminsetmessages: + msg12493
2022-06-10 00:00:00admincreate