[#BloombergLP-bslfmt-basic_format_string-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::xref:BloombergLP/bslfmt/basic_format_string.adoc[basic&lowbar;format&lowbar;string]::basic&lowbar;format&lowbar;string
:relfileprefix: ../../../
:mrdocs:

Create an instance of this type from the specified `str`&period;

== Synopsis

Declared in `&lt;bslfmt&lowbar;format&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;STR,
    class = void&gt;
requires bsl&colon;&colon;is&lowbar;convertible&lt;
                  const t&lowbar;STR&amp;,
                  bsl&colon;&colon;basic&lowbar;string&lowbar;view&lt;t&lowbar;CHAR&gt; &gt;&colon;&colon;value
consteval
basic&lowbar;format&lowbar;string(t&lowbar;STR const& str);
----

== Description

This function only takes part in overload resolution if `str` is convertible to a `basic&lowbar;string&lowbar;view`&period; Construction is ill&hyphen;formed if `str` is not a compile&hyphen;time constant&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| format string used to initialize this object
|===


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