Created on 2025-10-02.00:00:00 last changed 5 days ago
Proposed resolution:
This wording is relative to N5014.
Modify [format.tuple] as indicated:
-1- For each of `pair` and `tuple`, the library provides the following formatter specialization where pair-or-tuple is the name of the template:
namespace std { […] template<class... Ts> constexpr bool enable_nonlocking_formatter_optimization<pair-or-tuple<Ts...>> = (enable_nonlocking_formatter_optimization<remove_cvref_t<Ts>> && ...); }
[ Kona 2025-11-08; Status changed: Voting → WP. ]
[ 2025-10-17; Reflector poll ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
The `enable_nonlocking_formatter_optimization` variable template is specialized only for cv-unqualified types. However, the specialization for `pair` and `tuple` does not remove the references and cv-qualifiers from the elements:
template<class... Ts>
constexpr bool enable_nonlocking_formatter_optimization<pair-or-tuple<Ts...>> =
(enable_nonlocking_formatter_optimization<Ts> && ...);
As consequence pair<const std::string, int> or pair<const std::string&, int&> (`map` and `flat_map` reference types) will not use unbuffered prints.
The proposed wording has recently been implemented in gcc's libstdc++.| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-11 10:48:16 | admin | set | messages: + msg15651 |
| 2025-11-11 10:48:16 | admin | set | status: voting -> wp |
| 2025-10-30 17:45:31 | admin | set | status: ready -> voting |
| 2025-10-17 09:03:34 | admin | set | messages: + msg15203 |
| 2025-10-17 09:03:34 | admin | set | status: new -> ready |
| 2025-10-04 11:36:03 | admin | set | messages: + msg15116 |
| 2025-10-02 00:00:00 | admin | create | |