Skip to content

Commit

Permalink
Add fmt:: namespace to doc (fmtlib#3009)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jcelerier committed Jul 29, 2022
1 parent e9ca7ea commit 2580000
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/index.rst
Expand Up @@ -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
Expand Down

0 comments on commit 2580000

Please sign in to comment.