P3951

String Interpolation Objects

R2

The `std::format` approach to formatting offers many significant benefits over the prior `<iostream>`s approach that need not be revisited here. However, `<iostream>` does still have one significant advantage: ordering. It is easy to see at a glance with a long `std::cout` statement which pieces are to be formatted in which order. With `std::format`, as the amount of replacement fields increases, it becomes increasingly difficult to ensure that they are all correctly ordered.

Authors
Barry Revzin
Mailing
2026-09
Doc date
2026-03-15
Audience
EWG

Revision history

  1. 2026-09
    R2 Selected (shown above)
  2. 2026-04
    R1 EWG

    String Interpolation with Template Strings

  3. 2026-01
    R0 EWG

    String Interpolation Objects