diff --git a/doc/api.rst b/doc/api.rst index 85c36b19..85c4d68b 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -38,18 +38,16 @@ arguments in the resulting string. .. _format: -.. doxygenfunction:: format(const String&, const Args&...) -.. doxygenfunction:: vformat(const String&, basic_format_args::type>) +.. doxygenfunction:: format(const S&, const Args&...) +.. doxygenfunction:: vformat(const S&, basic_format_args::type>) .. _print: -.. doxygenfunction:: print(string_view, const Args&...) +.. doxygenfunction:: print(const S&, const Args&...) .. doxygenfunction:: vprint(string_view, format_args) -.. doxygenfunction:: print(std::FILE *, string_view, const Args&...) +.. doxygenfunction:: print(std::FILE *, const S&, const Args&...) .. doxygenfunction:: vprint(std::FILE *, string_view, format_args) - -.. doxygenfunction:: print(std::FILE *, wstring_view, const Args&...) .. doxygenfunction:: vprint(std::FILE *, wstring_view, wformat_args) Named arguments @@ -156,7 +154,7 @@ output ``operator<<`` when one is defined for a user-defined type. Output iterator support ----------------------- -.. doxygenfunction:: fmt::format_to(OutputIt, string_view, const Args&...) +.. doxygenfunction:: fmt::format_to(OutputIt, const String&, const Args&...) .. doxygenfunction:: fmt::format_to_n(OutputIt, std::size_t, string_view, const Args&...) .. doxygenstruct:: fmt::format_to_n_result :members: diff --git a/include/fmt/core.h b/include/fmt/core.h index ed581830..06deb520 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1370,10 +1370,10 @@ inline typename std::enable_if< internal::checked_args(format_str, args...)); } -template -inline std::basic_string vformat( +template +inline std::basic_string vformat( const S &format_str, - basic_format_args::type> args) { + basic_format_args::type> args) { return internal::vformat(internal::to_string_view(format_str), args); }