From afd92f019dce8816ccb213ef290fd984479c0387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Fri, 29 Jul 2022 21:36:38 +0200 Subject: [PATCH] Add fmt:: namespace to doc 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