diff --git a/include/fmt/core.h b/include/fmt/core.h index ebf44702d538..05ee3806ce88 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2956,7 +2956,16 @@ template auto runtime(const S& s) -> basic_string_view> { #else template using format_string = basic_format_string...>; -/** Creates a runtime format string. */ +/** + \rst + Creates a runtime format string. + + **Example**:: + + // Check format string at runtime instead of compile-time. + fmt::print(fmt::runtime("{:d}"), "I am not a number"); + \endrst + */ template auto runtime(const S& s) -> basic_runtime> { return {{s}}; }