Title
[fund.ts.v3] LFTSv3 awkward wording in propagate_const requirements
Status
c++23
Section
[propagate_const.class_type_requirements]
Submitter
Thomas Köppe

Created on 2018-07-02.00:00:00 last changed 12 months ago

Messages

Date: 2022-11-17.00:42:33

Proposed resolution:

This wording is relative to N4920.

  1. Edit [propagate_const.requirements] as indicated:

    -1- T shall be a cv-unqualified pointer-to-object type an object pointer type or a cv-unqualified class type for which decltype(*declval<T&>()) is an lvalue reference to object type; otherwise the program is ill-formed.

    -2- If T is an array type, reference type, pointer to function type or pointer to (possibly cv-qualified) void, then the program is ill-formed.

    -3- [Note: propagate_const<const int*> is well-formed but propagate_const<int* const> is not.end note]

  2. Edit [propagate_const.class_type_requirements] as indicated:

    -1- If T is class type then it shall satisfy the following requirements. In this sub-clause t denotes a non-constan lvalue of type T, ct is a const T& bound to t, element_type denotes an object type. denotes as_const(t).

Date: 2022-11-12.00:00:00

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

Date: 2022-10-15.00:00:00

[ 2022-10-19; Reflector poll ]

Set status to "Tentatively Ready" after eight votes in favour in reflector poll.

Date: 2022-10-15.00:00:00

[ 2022-10-12; Jonathan provides improved wording ]

Date: 2018-07-20.00:00:00

[ 2018-07-20 Priority set to 3 after reflector discussion ]

Previous resolution [SUPERSEDED]:

This wording is relative to N4758.

  1. Edit [propagate_const.class_type_requirements] as indicated:

    -1- If T is class type then it shall satisfy the following requirements. In this sub-clause t denotes a non-const lvalue of type T, ct is a const T& bound to tas_const(t), element_type denotes an object type.

Date: 2022-10-15.11:07:13

Addresses: fund.ts.v3

In the LFTSv3 prospective-working-paper N4758, [propagate_const.class_type_requirements] uses a strange turn of phrase:

"In this sub-clause, t denotes a non-const lvalue of type T, ct is a const T& bound to t, […]"

The last bit is strange: "ct is a const T& bound to t" is not how we usually say things. The specification-variables usually denote values, and values can't be references. Perhaps we could just say, "ct is as_const(t)"?

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2022-11-17 00:42:33adminsetmessages: + msg13043
2022-11-17 00:42:33adminsetstatus: voting -> wp
2022-11-08 03:53:08adminsetstatus: ready -> voting
2022-10-19 20:27:16adminsetmessages: + msg12875
2022-10-19 20:27:16adminsetstatus: new -> ready
2022-10-12 17:19:21adminsetmessages: + msg12864
2018-07-20 21:06:57adminsetmessages: + msg10042
2018-07-07 17:39:00adminsetmessages: + msg10017
2018-07-02 00:00:00admincreate