Commit 65eadfc8 authored by Sara Golemon's avatar Sara Golemon

Fix copy/pasta in docs

Summary: svformat explicitly takes a container for direct indexing,
but the format string used is per-arg, which corresponds to format/sformat.

Closes #228

Reviewed By: @JoelMarcey

Differential Revision: D2184334
parent bdcabdb4
...@@ -63,7 +63,7 @@ std::cout << format("The only {0[what]} is {0[value]}", m); ...@@ -63,7 +63,7 @@ std::cout << format("The only {0[what]} is {0[value]}", m);
// And if you just want the string, // And if you just want the string,
std::string result = svformat("The only {what} is {value}", m); std::string result = svformat("The only {what} is {value}", m);
// => "The only answer is 42" // => "The only answer is 42"
std::string result = svformat("The only {0[what]} is {0[value]}", m); std::string result = sformat("The only {0[what]} is {0[value]}", m);
// => "The only answer is 42" // => "The only answer is 42"
// {} works for vformat too // {} works for vformat too
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment