<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58315>58315</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++] Strings are incorrectly aligned when alignment is not specified
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JMazurkiewicz
</td>
</tr>
</table>
<pre>
Example:
```c++
#include <format>
#include <iostream>
int main() {
std::cout << std::format("!{:20}!\n", "Hello");
std::cout << std::format("!{:20}!\n", 3.14159);
}
```
Expected output:
```text
!Hello !
! 3.14159!
```
Got:
```text
! Hello!
! 3.14159!
```
Compiler explorer: https://godbolt.org/z/EjfMrE7q5
Specs: [[tab:format.align]](https://eel.is/c++draft/tab:format.align)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU81y2yAQfhp0YapBIGTroINjO-10Jqc8AZJWNikSKqDa8dN3ke0kziSdzrTSCrQsfPvtD7Vtn6vtUfWjASJWhG0Iu44FO0tD-F2U8yoXemjM1AIlYt1Z16tAxPYjo7Y-OFD9q3ke9RBor_RA-JLwkpLFBZni40MbWYhVY6cQMVBeFy_e4jlOeBZPihVnZLGJmlwP8_qa4vQNjLGzWhLx3x2INMszWb4Fj3tu0_Y25u1xhCZAS9HrOIXPMh3gGK6ZzOYQ6O0TaVztN4YXRtkfWHy1f-f5ndNLLv_F89r2ozbgKBxHYx045EH3IYw-EuL3KDvb1taE1Lodaif8tk_dg9sufsozxiOmMG6nRN6hBFW_VCxVRu8GIjdR-PIWGMCk2uPPpY9bpzqs8f0HALxMoMqKQspFsWB50laiLUWpkqCDgQq9Gl1fr4Pc0Mfg9LDzVDmg2PjWOayyeaYzGlb7sIfhrPSAXa89HWygHgPRnYY2mZyp3mVBh_1Up43tUTHm13X6Mjr7hOCoau8niPHIpchksq84LAolFDBRg-AF60SjlJS8qWvJWFkmRtVgfKSP_TvAgc4QsZflJtEVZ5xnLOP4Znme5l2jlmXX5EsomlzmJGeA99WkkUcsT-KqmVI97TwajfbBvxqV9zH4OVsRX01hb131_UGdJvdDw0E3p2QmUM0B_AZvdDsb">