[#fmt-join-0d]
= xref:fmt.adoc[fmt]::join
:relfileprefix: ../
:mrdocs:

Returns an object that formats `std&colon;&colon;initializer&lowbar;list` with elements separated by `sep`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
xref:fmt/join_view.adoc[join&lowbar;view&lt;T const*, T const*&gt;]
join(
    std::initializer&lowbar;list&lt;T&gt; list,
    xref:fmt/string_view.adoc[string&lowbar;view] sep);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Description

*Example*&colon;

fmt&colon;&colon;print(&quot;&lcub;&rcub;&quot;, fmt&colon;&colon;join(&lcub;1, 2, 3&rcub;, &quot;, &quot;))&semi; &sol;&sol; Output&colon; &quot;1, 2, 3&quot;


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