From 8630a8f5ff4392474c746ab61ae3b02fb5c903ca Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 25 Jun 2020 11:29:49 -0700 Subject: [PATCH] Tweak the docs --- doc/api.rst | 12 +++++++----- include/fmt/compile.h | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index 81db856c..07ed6d4c 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -427,11 +427,13 @@ The format string syntax is described in the documentation of Format string compilation ========================= -Format strings can be processed at compile time for 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 normal API and is only recommended in places where -formatting is a performance bottleneck. +``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 +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 +bottleneck. .. doxygendefine:: FMT_COMPILE diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 6c338c92..d7e6449e 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -23,14 +23,14 @@ struct is_compiled_string : std::is_base_of {}; /** \rst - Constructs a format string that will be translated into an efficient - formatting code at compile time from a string literal *s*. Requires C++17 - ``constexpr if``. + Converts a string literal *s* into a format string that will be parsed at + compile time and converted into efficient formatting code. Requires C++17 + ``constexpr if`` compiler support. **Example**:: - // Converts 42 into std::string using the most efficient code and no runtime - // format string processing. + // Converts 42 into std::string using the most efficient method and no + // runtime format string processing. std::string s = fmt::format(FMT_COMPILE("{}"), 42); \endrst */