From d28101878a3d03fd7a83518aac957a9bd0ec2c52 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 12 Mar 2021 15:49:22 -0800 Subject: [PATCH] Document ostream support limitation --- doc/api.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api.rst b/doc/api.rst index 6616818d..ac85222c 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -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 @@ -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 &os, const S &format_str, Args&&... args) .. _printf-api: