Created on 2024-08-28.00:00:00 last changed 3 weeks ago
Proposed resolution:
This wording is relative to N4988.
Modify [format.parse.ctx] as indicated:
template<class... Ts>
constexpr void check_dynamic_spec(size_t id) noexcept;
-14- Mandates: `sizeof...(Ts)` ≥ 1. The types in `Ts...` are unique. Each type in `Ts...` is one of `bool`, `char_type`, `int`, `unsigned int`, `long long int`, `unsigned long long int`, `float`, `double`, `long double`, `const char_type*`,
basic_string_view<char_type>
, or `const void*`.-15- Remarks: A call to this function is a core constant expression only if:
- (15.1) —
id < num_args_
is `true` and- (15.2) — the type of the corresponding format argument (after conversion to
basic_format_arg<Context>
) is one of the types in `Ts...`.
[ Wrocław 2024-11-23; Status changed: Voting → WP. ]
[ 2024-09-18; Reflector poll ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
The Mandates: conditions for `format_parse_context::check_dynamic_spec` are:
-14- Mandates:
The types in `Ts...` are unique. Each type in `Ts...` is one of `bool`,
`char_type`, `int`, `unsigned int`, `long long int`, `unsigned long long int`,
`float`, `double`, `long double`, `const char_type*`,
basic_string_view<char_type>
, or `const void*`.
There seems to be no reason to allow `Ts` to be an empty pack, that's not useful. There is no valid arg-id value that can be passed to it if the list of types is empty, since `arg(n)` will never be one of the types in an empty pack. So it's never a constant expression if the pack is empty.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-28 21:40:31 | admin | set | messages: + msg14491 |
2024-11-28 21:40:31 | admin | set | status: voting -> wp |
2024-11-19 16:09:07 | admin | set | status: ready -> voting |
2024-09-18 22:28:16 | admin | set | messages: + msg14382 |
2024-09-18 22:28:16 | admin | set | status: new -> ready |
2024-08-28 14:04:26 | admin | set | messages: + msg14344 |
2024-08-28 00:00:00 | admin | create |