Skip to content

Commit

Permalink
Document that file should be in wide-oriented mode for wide print
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jun 9, 2018
1 parent 45fa4ee commit e3707ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ arguments in the resulting string.
.. doxygenfunction:: print(std::FILE *, string_view, 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
---------------

Expand Down
4 changes: 4 additions & 0 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,10 @@ inline void print(std::FILE *f, string_view format_str, const Args & ... args) {
format_arg_store<format_context, Args...> as(args...);
vprint(f, format_str, as);
}
/**
Prints formatted data to the file *f* which should be in wide-oriented mode set
via ``fwide(f, 1)`` or ``_setmode(_fileno(f), _O_U8TEXT)`` on Windows.
*/
template <typename... Args>
inline void print(std::FILE *f, wstring_view format_str, const Args & ... args) {
format_arg_store<wformat_context, Args...> as(args...);
Expand Down

0 comments on commit e3707ef

Please sign in to comment.