Make ostream formatter work with compile-time format strings (#1692)

This commit is contained in:
Victor Zverovich
2020-05-20 14:59:57 -07:00
parent bd8804019b
commit 943532fece
2 changed files with 6 additions and 1 deletions

View File

@@ -302,3 +302,7 @@ std::ostream& operator<<(std::ostream& os, copyfmt_test) {
TEST(OStreamTest, CopyFmt) {
EXPECT_EQ("foo", fmt::format("{}", copyfmt_test()));
}
TEST(OStreamTest, CompileTimeString) {
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), 42));
}