From 5415b2a43b8f26b154588a1f031fa4d6262524dc Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 14 May 2014 08:20:20 -0700 Subject: [PATCH] Fix example. --- format.h | 2 +- test/format-test.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/format.h b/format.h index b2a6f856..856dbb6c 100644 --- a/format.h +++ b/format.h @@ -1728,7 +1728,7 @@ inline Formatter PrintColored(Color c, StringRef format) { **Example**:: - std::string message = str(Format("The answer is {}", 42); + std::string message = str(Format("The answer is {}", 42)); See also `Format String Syntax`_. \endrst diff --git a/test/format-test.cc b/test/format-test.cc index 21bf6b2f..a1570828 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1796,6 +1796,7 @@ TEST(FormatterTest, Examples) { ReportError("File not found: {0}") << path; #if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES + EXPECT_EQ("The answer is 42", str(Format("The answer is {}", 42))); EXPECT_THROW_MSG( Format("The answer is {:d}", "forty-two"), FormatError, "unknown format code 'd' for string");