std::basic_format_string, std::format_string, std::wformat_string

Header: <format>

Class template std::basic_format_string wraps a std::basic_string_view that will be used by formatting functions.

# Declarations

template< class CharT, class... Args >
struct basic_format_string;

(since C++20)

template< class... Args >
using format_string =
basic_format_string<char, std::type_identity_t<Args>...>;

(since C++20)

template< class... Args >
using wformat_string =
basic_format_string<wchar_t, std::type_identity_t<Args>...>;

(since C++20)

# Parameters

# Notes

The alias templates format_string and wformat_string use std::type_identity_t to inhibit template argument deduction. Typically, when they appear as a function parameter, their template arguments are deduced from other function arguments.

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
P2508R1C++20there’s no user-visible name for this facilitythe name basic_format_string is exposed