r/cpp • • Jun 26 '26

Improvements to std::format in C++26

https://mariusbancila.ro/blog/2026/06/19/improvements-to-stdformat-in-c26/
91 Upvotes

38 comments sorted by

View all comments

Show parent comment

1

u/evaned Jun 27 '26

I'd argue the only thing you gain from having a dedicated function is having to type fewer characters.

You repeat x in your expression. A function lets you avoid that.