From 258000064d71a7d228d608a2e3d43bde3e32a658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Fri, 29 Jul 2022 22:10:09 +0200 Subject: [PATCH] Add fmt:: namespace to doc (#3009) Otherwise as-is the example does not compile on Visual Studio due to the conflict with std::format_to: https://gcc.godbolt.org/z/qe4jEvvqY --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index d5c4fa5f..8d55c7a1 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -39,7 +39,7 @@ The ``fmt::format`` function returns a string "The answer is 42.". You can use .. code:: c++ auto out = fmt::memory_buffer(); - format_to(std::back_inserter(out), + fmt::format_to(std::back_inserter(out), "For a moment, {} happened.", "nothing"); auto data = out.data(); // pointer to the formatted data auto size = out.size(); // size of the formatted data