[#FMT_STATIC_FORMAT]
= FMT&lowbar;STATIC&lowbar;FORMAT
:mrdocs:

Formats arguments according to the format string `fmt&lowbar;str` and produces a string of the exact required size at compile time&period; Both the format string and the arguments must be compile&hyphen;time expressions&period;

== Synopsis

Declared in `&lt;fmt&sol;compile&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define FMT&lowbar;STATIC&lowbar;FORMAT(fmt&lowbar;str, ...)

----

== Description

The resulting string can be accessed as a C string via `c&lowbar;str()` or as a `fmt&colon;&colon;string&lowbar;view` via `str()`&period;

*Example*&colon;

&sol;&sol; Produces the static string &quot;42&quot; at compile time&period; static constexpr auto result &equals; FMT&lowbar;STATIC&lowbar;FORMAT(&quot;&lcub;&rcub;&quot;, 42)&semi; const char&ast; s &equals; result&period;c&lowbar;str()&semi;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *fmt&lowbar;str*
| The compile&hyphen;time format string&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
