Created on 2025-11-14.00:00:00 last changed 7 days ago
Proposed resolution:
This wording is relative to N5014.
Modify [namespace.std], as indicated:
Let F denote a standard library function or function template. Unless F is designated an addressable function, it is unspecified if or how a reflection value designating the associated entity can be formed. For any value p of type `meta::info` that represents a reflection of a parameter of F, it is unspecified if has_identifier(p) returns `true` or `false`, and if meta::has_identifier(p) is `true`, then the `NTMBS` produced by meta::identifier_of(p) and meta::u8identifier_of(p) is unspecified.
The wording in [namespace.std] p7 guarantees that reflection of the addressable function can be reliably produced. With the addition of the function parameter name, it is possible to access the parameter name of such functions:
constexpr auto p = parameters_of(^^std::endl)[0]; static_assert( identifier_of(p) == "os" ); // guaranteed?
We should clarify that parameter names used by standard library implementation remain unspecified, by making result of `has_identifier` and `identifier_of` unspecified on reflection of such parameter.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-14 13:11:40 | admin | set | messages: + msg15737 |
| 2025-11-14 00:00:00 | admin | create | |