Skip to content

Commit

Permalink
Deployed 306a5dc to dev with MkDocs 1.6.0 and mike 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jun 4, 2024
1 parent 306a5dc commit 0c82dea
Show file tree
Hide file tree
Showing 9 changed files with 224 additions and 33 deletions.
37 changes: 37 additions & 0 deletions dev/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,43 @@



<label class="md-header__button md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">

<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>

</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>


<div class="md-header__source">
<a href="https://github.com/fmtlib/fmt" title="Go to repository" class="md-source" data-md-component="source">
Expand Down
37 changes: 37 additions & 0 deletions dev/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,43 @@



<label class="md-header__button md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">

<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>

</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>


<div class="md-header__source">
<a href="https://github.com/fmtlib/fmt" title="Go to repository" class="md-source" data-md-component="source">
Expand Down
4 changes: 4 additions & 0 deletions dev/fmt.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:root {
--md-primary-fg-color: #0065C9;
}

.md-grid {
max-width: 960px;
}
Expand Down
103 changes: 70 additions & 33 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,43 @@



<label class="md-header__button md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">

<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>

</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>


<div class="md-header__source">
<a href="https://github.com/fmtlib/fmt" title="Go to repository" class="md-source" data-md-component="source">
Expand Down Expand Up @@ -376,13 +413,13 @@ <h1 id="a-modern-formatting-library">A modern formatting library</h1>
<div class="feature">
<h2>Safety</h2>
<p>
Inspired by the Python's formatting facility, {fmt} provides a safe
replacement for the <code>printf</code> family of functions. Errors in format
strings, which are a common source of vulnerabilities in C, are <b>reported
at compile time</b>. For example:
Inspired by Python's formatting facility, {fmt} provides a safe replacement
for the <code>printf</code> family of functions. Errors in format strings,
which are a common source of vulnerabilities in C, are <b>reported at
compile time</b>. For example:

<pre><code class="language-cpp"
>fmt::format("The answer is {:d}", "forty-two");</code></pre>
>fmt::format("{:d}", "I am not a number");</code></pre>

will give a compile-time error because <code>d</code> is not a valid
format specifier for strings. APIs like <a href="api/#format">
Expand All @@ -395,9 +432,8 @@ <h2>Safety</h2>
<div class="feature">
<h2>Extensibility</h2>
<p>
Formatting of most <b>standard types</b> including all containers, dates and
times is <b>supported out-of-the-box</b>.
For example:
Formatting of most <b>standard types</b>, including all containers, dates,
and times is <b>supported out-of-the-box</b>. For example:

<pre><code class="language-cpp"
>fmt::print("{}", std::vector{1, 2, 3});</code></pre>
Expand All @@ -416,29 +452,29 @@ <h2>Extensibility</h2>
<h2>Performance</h2>
<p>
{fmt} can be anywhere from <b>tens of percent to 20-30 times faster</b> than
iostreams and <code>sprintf</code>, especially on numeric formatting.
iostreams and <code>sprintf</code>, especially for numeric formatting.

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="20 0 550 300" aria-label="A chart." style="overflow: hidden;"><defs id="_ABSTRACT_RENDERER_ID_0"><clipPath id="_ABSTRACT_RENDERER_ID_1"><rect x="120" y="45" width="560" height="210"></rect></clipPath></defs><rect x="0" y="0" width="800" height="300" stroke="none" stroke-width="0" fill="#ffffff"></rect><g><text text-anchor="start" x="120" y="27.05" font-family="Arial" font-size="13" font-weight="bold" stroke="none" stroke-width="0" fill="#000000">double to string</text><rect x="120" y="16" width="560" height="13" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect></g><g><rect x="120" y="45" width="560" height="210" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect><g clip-path="url(#_ABSTRACT_RENDERER_ID_1)"><g><rect x="120" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="213" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="306" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="400" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="493" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="586" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect><rect x="679" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#cccccc"></rect></g><g><rect x="121" y="53" width="450" height="26" stroke="#ff9900" stroke-width="1" fill="#ff9900"></rect><rect x="121" y="95" width="421" height="26" stroke="#109618" stroke-width="1" fill="#109618"></rect><rect x="121" y="137" width="341" height="26" stroke="#990099" stroke-width="1" fill="#990099"></rect><rect x="121" y="179" width="31" height="26" stroke="#3366cc" stroke-width="1" fill="#3366cc"></rect><rect x="121" y="221" width="15" height="26" stroke="#dc3912" stroke-width="1" fill="#dc3912"></rect></g><g><rect x="120" y="45" width="1" height="210" stroke="none" stroke-width="0" fill="#333333"></rect></g></g><g></g><g><g><text text-anchor="middle" x="120.5" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">0</text></g><g><text text-anchor="middle" x="213.6667" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">250</text></g><g><text text-anchor="middle" x="306.8333" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">500</text></g><g><text text-anchor="middle" x="400" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">750</text></g><g><text text-anchor="middle" x="493.1667" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">1,000</text></g><g><text text-anchor="middle" x="586.3333" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">1,250</text></g><g><text text-anchor="middle" x="679.5" y="272.3833333333333" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#444444">1,500</text></g><g><text text-anchor="end" x="107" y="70.95" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#222222">ostringstream</text></g><g><text text-anchor="end" x="107" y="112.74999999999999" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#222222">ostrstream</text></g><g><text text-anchor="end" x="107" y="154.55" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#222222">sprintf</text></g><g><text text-anchor="end" x="107" y="196.35" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#222222">doubleconv</text></g><g><text text-anchor="end" x="107" y="238.15" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#222222">fmt</text></g></g></g><g><g><text text-anchor="middle" x="300" y="291.71666666666664" font-family="Arial" font-size="13" font-style="italic" stroke="none" stroke-width="0" fill="#222222">Time (ns), smaller is better</text><rect x="120" y="280.66666666666663" width="560" height="13" stroke="none" stroke-width="0" fill-opacity="0" fill="#ffffff"></rect></g></g><g></g></svg>
<img src="perf.svg">

The library <b>minimizes dynamic memory allocations</b> and allows
<a href="api#compile-api">format string compilation</a>.
The library <b>minimizes dynamic memory allocations</b> and can optionally
<a href="api#compile-api">compile format strings</a> to optimal code.
</p>
</div>

<div class="feature">
<h2>Unicode support</h2>
<p>
{fmt} provides <b>portable Unicode support</b> on major operating systems
with UTF-8 and normal <code>char</code> strings. For example:
with UTF-8 and <code>char</code> strings. For example:

<pre><code class="language-cpp"
>fmt::print("Слава Україні!");</code></pre>

will be printed correctly on Linux, macOS and even Windows console regardless
of the codepages.
will be printed correctly on Linux, macOS, and even Windows console,
regardless of the codepages.
</p>
<p>
The default is <b>locale-independent</b> but you can opt into localized
The default is <b>locale-independent</b>, but you can opt into localized
formatting and {fmt} makes it work with Unicode, working around problems in
the standard libary.
</p>
Expand All @@ -454,8 +490,8 @@ <h2>Fast compilation</h2>
</p>
<p>
Code using {fmt} is usually several times faster to compile than the
equivalent iostreams code and while <code>printf</code> is faster still, the
gap is narrowing.
equivalent iostreams code, and while <code>printf</code> compiles faster
still, the gap is narrowing.
</p>
<a href="https://github.com/fmtlib/fmt?tab=readme-ov-file#compile-time-and-code-bloat">
→ Learn more</a>
Expand All @@ -464,47 +500,48 @@ <h2>Fast compilation</h2>
<div class="feature">
<h2>Small binary footprint</h2>
<p>
Type erasure is also used to prevent template bloat resulting in <b>compact
Type erasure is also used to prevent template bloat, resulting in <b>compact
per-call binary code</b>. For example, a call to <code>fmt::print</code> with
a single argument is less than <a href="https://godbolt.org/g/TZU4KF">ten
a single argument is fewer than <a href="https://godbolt.org/g/TZU4KF">ten
x86-64 instructions</a>, comparable to <code>printf</code> despite adding
runtime safety and much smaller than the equivalent iostreams code.
</p>
<p>
The library itself has small binary footprint and some components such as
floating-point formatting can be disabled to make it even smaller for
resource constrained devices.
resource-constrained devices.
</p>
</div>

<div class="feature">
<h2>Portability</h2>
<p>
{fmt} has a <b>small self-contained codebase</b> with the core consisting of
just three header files and no external dependencies.
{fmt} has a <b>small self-contained codebase</b> with the core consisting of
just three header files and no external dependencies.
</p>
<p>
The library is highly portable and requires only on a minimal <b>subset of
C++11</b> features which are available in GCC 4.8, Clang 3.4, MSVC 19.0 (2015)
and later. Newer compiler and standard library features are used if available
and enable additional functionality.
The library is highly portable and requires only a minimal <b>subset of
C++11</b> features which are available in GCC 4.8, Clang 3.4, MSVC 19.0
(2015) and later. Newer compiler and standard library features are used
if available, and enable additional functionality.
</p>
<p>
Where possible, the output of formatting functions is <b>consistent across
platforms</b>.
Where possible, the output of formatting functions is <b>consistent across
platforms</b>.
</p>
</p>
</div>

<div class="feature">
<h2>Open source</h2>
<p>
{fmt} is in top hundred open-source libraries on GitHub and has <b>hundreds of
all-time contributors</b>.
{fmt} is in the top hundred open-source C++ libraries on GitHub and has
<a href="https://github.com/fmtlib/fmt/graphs/contributors">hundreds of
all-time contributors</a>.
</p>
<p>
Permissive MIT <a href="https://github.com/fmtlib/fmt#license">license</a>
allows using the library both in open-source and commercial projects.
The permissive MIT <a href="https://github.com/fmtlib/fmt#license">license</a>
allows the use the library in both open-source and commercial projects.
</p>
</div>

Expand Down
Loading

0 comments on commit 0c82dea

Please sign in to comment.