<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59763>59763</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++][format] Strings inside of `tuple` and `pair` should be escaped
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JMazurkiewicz
</td>
</tr>
</table>
<pre>
Example:
```c++
#include <cstdio>
#include <format>
#include <tuple>
#include <string>
#include <string_view>
#include <utility>
using namespace std;
int main() {
const tuple t{"_\t_", "_\t_"s};
const pair p{auto{"_\t_"}, "_\t_"sv};
puts(format("{}\n{}", t, p).c_str());
}
```
Expected output:
```bash
("_\t_", "_\t_")
("_\t_", "_\t_")
```
Got:
```bash
(_ _, "_\t_")
(_ _, "_\t_")
```
Compiler explorer: https://godbolt.org/z/8MnaMzzvo
Debug-enabled specializations: [[format.formatter.spec]/2.2](http://eel.is/c++draft/format.formatter#spec-2.2)
Parsing format spec for `tuple` and `pair`: [[format.tuple]/7](http://eel.is/c++draft/format.tuple#7)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVNtupDgQ_ZrixQqCMpfmgYd0E1ZaKdJK-wEtgyvd3jUY-ZLJ9NevDJ3L9mQyGskCQx2fOnVsl3BOnWaiFso9lF0igj8b2_75KC7B_qvomxovyWDk9_bhRUyLJuD3kHWQ3UOVbWME3Mex_UWu5lEHSQz4YXReKgP84bPgk7GT8D8J-rDm-jTmvFXz6cvg8VnRt58gglda-e_v0fUZnJpPbBYTuUWMxJyXwPcfEWr2bBJqBtwBNgzqa5QxxkYzO89W0czHCOIRyoM_AiLggX38dlB3b9TvixehLFug3ovgzS1F3f3A8vw_miV4B7i7ehoVYuSoOygP83W2SfHxsQA26Xh03m7VxPFWbd3d7PBHFx5eFho9SWaCX4L_8TgMwp1fbd995UPM-Xu4z_T8YX6l4QhZc_wq-S8An2U9mGlRmiyjl0UbSxb4PTt7v7goBnvA_mTkYLRPjT0B9hfAfvc4i8fL5dlsHB0N4XRHsxg0SeYWGpXQ6iK8MnOkYeuV3G9bmm4vTzaNSCg7wB5TXCe7mPktMZFOlQPsrxdTWvHkAftbIkAeqe4iy2uxfwm73oMNtIqKcwZVtt3IKmNilvE7ntfoyq3QDbfqq39f3bYaeQ3YJLLlsuGNSKjNqxqLXVGUeXJuc2rqoRFVtuOl4MizphorSXyXYTWURZWoFjPEHHme51lW5mmVZ5wKzAspC1mUT1BkNAmlU62fp7hFiXIuUFs2dcUTLQbS7rUl2jaC7oZwclBkWjnv3pd55fXaPLUaXhth2b25AWXH_l47kmNqdkoSM09fuMnc2QQt2UCM3CgWkkmwur05Wcqfw5COZgLso5Lr626x5h8ao5trNdHltaD_AgAA__92HqpN">