Title
views::zip_transform still requires F to be copy_constructible when empty pack
Status
c++23
Section
[range.zip.transform.overview]
Submitter
Hewill Kang

Created on 2022-09-12.00:00:00 last changed 12 months ago

Messages

Date: 2022-11-17.00:42:33

Proposed resolution:

This wording is relative to N4910.

  1. Modify [range.zip.transform.overview] as indicated:

    -2- The name views::zip_transform denotes a customization point object ([customization.point.object]). Let F be a subexpression, and let Es... be a pack of subexpressions.

    1. (2.1) — If Es is an empty pack, let FD be decay_t<decltype((F))>.

      1. (2.1.1) — If move_constructiblecopy_constructible<FD> && regular_invocable<FD&> is false, or if decay_t<invoke_result_t<FD&>> is not an object type, views::zip_transform(F, Es...) is ill-formed.

      2. (2.1.2) — Otherwise, the expression views::zip_transform(F, Es...) is expression-equivalent to

              ((void)F, auto(views::empty<decay_t<invoke_result_t<FD&>>>))
    2. (2.2) — Otherwise, the expression views::zip_transform(F, Es...) is expression-equivalent to zip_transform_view(F, Es...).

Date: 2022-11-12.00:00:00

[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Voting → WP. ]

Date: 2022-09-15.00:00:00

[ 2022-09-23; Reflector poll ]

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

Date: 2022-09-12.00:00:00

After P2494R2, range adaptors only require callable to be move_constructible, however, for views::zip_transform, when empty pack, it still requires callable to be copy_constructible. We should relax this requirement, too.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2022-11-17 00:42:33adminsetmessages: + msg13074
2022-11-17 00:42:33adminsetstatus: voting -> wp
2022-11-08 03:46:49adminsetstatus: ready -> voting
2022-09-23 15:43:32adminsetmessages: + msg12792
2022-09-23 15:43:32adminsetstatus: new -> ready
2022-09-12 10:22:40adminsetmessages: + msg12761
2022-09-12 00:00:00admincreate