Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fmtbot committed Jan 22, 2024
1 parent 59e8117 commit 7a32aaf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
29 changes: 13 additions & 16 deletions dev/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -1150,25 +1150,22 @@ <h3>Locale<a class="headerlink" href="#locale" title="Permalink to this headline
<span class="n">fmt</span><span class="o">::</span><span class="n">print</span><span class="p">(</span><span class="s">&quot;{}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="o">::</span><span class="n">join</span><span class="p">(</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;, &quot;</span><span class="p">));</span>
</pre></div>
</div>
<dl class="cpp function">
<dt id="_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view">
<span id="_CPPv3I0EN3fmt4joinERR5Range11string_view"></span><span id="_CPPv2I0EN3fmt4joinERR5Range11string_view"></span>template&lt;typename <code class="sig-name descname">Range</code>&gt;<br /><span class="target" id="ranges_8h_1a81ae18926653168583cc3f95161d2f97"></span>auto <code class="sig-prename descclassname">fmt<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">join</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="fmt::join::Range">Range</a> &amp;&amp;<em>range</em>, <a class="reference internal" href="#_CPPv4N3fmt11string_viewE" title="fmt::string_view">string_view</a> <em>sep</em><span class="sig-paren">)</span> -&gt; join_view&lt;decltype(std::begin(<a class="reference internal" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="fmt::join::range">range</a>)), decltype(std::end(<a class="reference internal" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="fmt::join::range">range</a>))&gt;<a class="headerlink" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="Permalink to this definition"></a><br /></dt>
<dd><p><p><p>Returns a view that formats <a class="reference internal" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="fmt::join::range"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">range</span></code></a> with elements separated by <a class="reference internal" href="#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view" title="fmt::join::sep"><code class="xref cpp cpp-any docutils literal notranslate"><span class="pre">sep</span></code></a>.</p>
<p><strong>Example</strong>:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">v</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">};</span>
<span class="n">fmt</span><span class="o">::</span><span class="n">print</span><span class="p">(</span><span class="s">&quot;{}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="o">::</span><span class="n">join</span><span class="p">(</span><span class="n">v</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;, &quot;</span><span class="p">));</span>
<span class="c1">// Output: &quot;1, 2, 3&quot;</span>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>doxygenfunction: Unable to resolve multiple matches for function “fmt::join” with arguments ((Range&amp;&amp;, string_view) -&gt; join_view&lt;decltype(std::begin(range)), decltype(std::end(range))&gt;) in doxygen xml output for project “format” from directory: /home/runner/work/fmt/build/doxyxml.
Potential matches:
</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="p">...</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">tuple</span><span class="o">&lt;</span><span class="n">T</span><span class="p">...</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">tuple</span><span class="p">,</span><span class="w"> </span><span class="n">basic_string_view</span><span class="o">&lt;</span><span class="kt">wchar_t</span><span class="o">&gt;</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">tuple_join_view</span><span class="o">&lt;</span><span class="kt">wchar_t</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">...</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="p">...</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">tuple</span><span class="o">&lt;</span><span class="n">T</span><span class="p">...</span><span class="o">&gt;</span><span class="w"> </span><span class="o">&amp;</span><span class="n">tuple</span><span class="p">,</span><span class="w"> </span><span class="n">string_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">tuple_join_view</span><span class="o">&lt;</span><span class="kt">char</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">...</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">It</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">Sentinel</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">It</span><span class="w"> </span><span class="n">begin</span><span class="p">,</span><span class="w"> </span><span class="n">Sentinel</span><span class="w"> </span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">string_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="n">It</span><span class="p">,</span><span class="w"> </span><span class="n">Sentinel</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">It</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">Sentinel</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">It</span><span class="w"> </span><span class="n">begin</span><span class="p">,</span><span class="w"> </span><span class="n">Sentinel</span><span class="w"> </span><span class="n">end</span><span class="p">,</span><span class="w"> </span><span class="n">wstring_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="n">It</span><span class="p">,</span><span class="w"> </span><span class="n">Sentinel</span><span class="p">,</span><span class="w"> </span><span class="kt">wchar_t</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">Range</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">Range</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="n">range</span><span class="p">,</span><span class="w"> </span><span class="n">string_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">detail</span><span class="o">::</span><span class="n">adl</span><span class="o">::</span><span class="n">adlbegin</span><span class="p">(</span><span class="n">range</span><span class="p">)),</span><span class="w"> </span><span class="k">decltype</span><span class="p">(</span><span class="n">detail</span><span class="o">::</span><span class="n">adl</span><span class="o">::</span><span class="n">adlend</span><span class="p">(</span><span class="n">range</span><span class="p">))</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">Range</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">Range</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="n">range</span><span class="p">,</span><span class="w"> </span><span class="n">wstring_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="n">detail</span><span class="o">::</span><span class="n">iterator_t</span><span class="o">&lt;</span><span class="n">Range</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">detail</span><span class="o">::</span><span class="n">sentinel_t</span><span class="o">&lt;</span><span class="n">Range</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="kt">wchar_t</span><span class="o">&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">string_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*&gt;</span>
<span class="o">-</span><span class="w"> </span><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">join</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">initializer_list</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="n">wstring_view</span><span class="w"> </span><span class="n">sep</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">join_view</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="kt">wchar_t</span><span class="o">&gt;</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">fmt::join</span></code> applies passed format specifiers to the range elements:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">fmt</span><span class="o">::</span><span class="n">print</span><span class="p">(</span><span class="s">&quot;{:02}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="o">::</span><span class="n">join</span><span class="p">(</span><span class="n">v</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;, &quot;</span><span class="p">));</span>
<span class="c1">// Output: &quot;01, 02, 03&quot;</span>
</pre></div>
</div>
</p>
</p>
</dd></dl>

<dl class="cpp function">
<dt id="_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view">
<span id="_CPPv3I00EN3fmt4joinE2It8Sentinel11string_view"></span><span id="_CPPv2I00EN3fmt4joinE2It8Sentinel11string_view"></span>template&lt;typename <code class="sig-name descname">It</code>, typename <code class="sig-name descname">Sentinel</code>&gt;<br /><span class="target" id="ranges_8h_1a0d920c12aba189c116ca1a33aee29f7f"></span>auto <code class="sig-prename descclassname">fmt<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">join</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view" title="fmt::join::It">It</a> <em>begin</em>, <a class="reference internal" href="#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view" title="fmt::join::Sentinel">Sentinel</a> <em>end</em>, <a class="reference internal" href="#_CPPv4N3fmt11string_viewE" title="fmt::string_view">string_view</a> <em>sep</em><span class="sig-paren">)</span> -&gt; join_view&lt;<a class="reference internal" href="#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view" title="fmt::join::It">It</a>, <a class="reference internal" href="#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view" title="fmt::join::Sentinel">Sentinel</a>&gt;<a class="headerlink" href="#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view" title="Permalink to this definition"></a><br /></dt>
Expand Down
2 changes: 1 addition & 1 deletion dev/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h2 id="F">F</h2>
</li>
<li><a href="api.html#_CPPv4I0EN3fmt7is_charE">fmt::is_char (C++ struct)</a>
</li>
<li><a href="api.html#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view">fmt::join (C++ function)</a>, <a href="api.html#_CPPv4I0EN3fmt4joinE9join_viewIDTclNSt5beginE5rangeEEDTclNSt3endE5rangeEEERR5Range11string_view">[1]</a>
<li><a href="api.html#_CPPv4I00EN3fmt4joinE9join_viewI2It8SentinelE2It8Sentinel11string_view">fmt::join (C++ function)</a>
</li>
<li><a href="api.html#_CPPv4N3fmt9localtimeENSt6time_tE">fmt::localtime (C++ function)</a>
</li>
Expand Down
Binary file modified dev/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion dev/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 7a32aaf

Please sign in to comment.