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

4556. Unclear properties of reflection strings

Section: 21.4.1 [meta.syn] Status: Immediate Submitter: Tim Song Opened: 2026-03-25 Last modified: 2026-03-25

Priority: Not Prioritized

View all other issues in [meta.syn].

View all issues with Immediate status.

Discussion:

We are missing a statement about the lifetime and other properties of the strings returned from the reflection functions.

[Croydon 2026-03-25; move to Immediate.]

Proposed resolution:

This wording is relative to N5032.

  1. Modify 21.4.1 [meta.syn] as indicated:

    -3- Any function in namespace std::meta whose return type is string_view or u8string_view returns an object V such that V.data()[V.size()] equals '\0'. Each element of the range V.data() + [0, V.size()] is a potentially non-unique object with static storage duration that is usable in constant expressions (6.8.2 [intro.object], 7.7 [expr.const]); a pointer to such an element is not suitable for use as a template argument for a constant template parameter of pointer type (13.4.3 [temp.arg.nontype]).