Title
The standard-layout property of char-like types serves for nothing
Status
nad
Section
[strings.general]
Submitter
Jiang An

Created on 2022-05-07.00:00:00 last changed 20 months ago

Messages

Date: 2022-08-23.00:00:00

[ 2022-08-23 Status changed: Tentatively NAD → NAD. ]

Date: 2022-05-15.00:00:00

[ 2022-05-17; Reflector poll ]

Set priority to 4 after reflector poll. Six votes for NAD. Changing this would require a proposal through LEWG.

Date: 2022-05-07.00:00:00

Currently char-like types are defined as non-array trivial and standard-layout types ([strings.general]). However, as far as I know, there is no actual operation specified in the standard or used in implementations requiring a char-like type to be standard-layout (unlike the triviality, which is related to charT(), etc.). Implementations are merely static_assert-ing the standard-layout property of element types.

As the standard library almost never requires a user-provided type to be standard-layout now (other suspicious exceptions are program-defined specializations of std::atomic<T*>), I think char-like types should just be non-array trivial types.

History
Date User Action Args
2022-08-23 13:55:25adminsetmessages: + msg12682
2022-05-17 11:57:55adminsetmessages: + msg12455
2022-05-17 11:57:55adminsetstatus: new -> nad
2022-05-07 00:00:00admincreate