Skip to content

Commit

Permalink
Trying to clear ambiguous compile time claims (#1775)
Browse files Browse the repository at this point in the history
* Trying to clear ambiguous compile time claims

Documentation was a bit misleading.
Many people assume that fmt does compile time checks by default, while it requires the use of `FMT_STRING`.
It was also unclear that FMT_COMPILE does the same checks.

#1772

* Update api.rst
  • Loading branch information
leolchat authored Jul 16, 2020
1 parent c26349f commit f5d4215
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ string checks, wide string, output iterator and user-defined type support.
Compile-time Format String Checks
---------------------------------

Compile-time checks are supported for built-in and string types as well as
user-defined types with ``constexpr`` ``parse`` functions in their ``formatter``
specializations.
Compile-time checks are enabled when using ``FMT_STRING``. They support built-in
and string types as well as user-defined types with ``constexpr`` ``parse``
functions in their ``formatter`` specializations.

.. doxygendefine:: FMT_STRING

Expand Down Expand Up @@ -389,9 +389,10 @@ The format string syntax is described in the documentation of
Format string compilation
=========================

``fmt/compile.h`` provides format string compilation support. Format strings
are parsed at compile time and converted into efficient formatting code. This
supports arguments of built-in and string types as well as user-defined types
``fmt/compile.h`` provides format string compilation support when using
``FMT_COMPILE``. Format strings are parsed, checked and converted
into efficient formatting code at compile-time.
This supports arguments of built-in and string types as well as user-defined types
with ``constexpr`` ``parse`` functions in their ``formatter`` specializations.
Format string compilation can generate more binary code compared to the default
API and is only recommended in places where formatting is a performance
Expand Down

0 comments on commit f5d4215

Please sign in to comment.