Skip to content

Commit

Permalink
Document ostream support limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Mar 12, 2021
1 parent bac14ef commit d281018
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ System APIs
========================

``fmt/ostream.h`` provides ``std::ostream`` support including formatting of
user-defined types that have overloaded ``operator<<``::
user-defined types that have an overloaded insertion operator (``operator<<``)::

#include <fmt/ostream.h>

Expand All @@ -504,6 +504,9 @@ user-defined types that have overloaded ``operator<<``::
std::string s = fmt::format("The date is {}", date(2012, 12, 9));
// s == "The date is 2012-12-9"

{fmt} only supports insertion operators that are defined in the same namespaces
as the types they format and can be found with the argument-dependent lookup.

.. doxygenfunction:: print(std::basic_ostream<Char> &os, const S &format_str, Args&&... args)

.. _printf-api:
Expand Down

0 comments on commit d281018

Please sign in to comment.