This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

3695. The standard-layout property of char-like types serves for nothing

Section: 27.1 [strings.general] Status: NAD Submitter: Jiang An Opened: 2022-05-07 Last modified: 2022-08-23

Priority: 4

View all other issues in [strings.general].

View all issues with NAD status.

Discussion:

Currently char-like types are defined as non-array trivial and standard-layout types (27.1 [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.

[2022-05-17; Reflector poll]

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

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

Proposed resolution: