Remove const qualification in compile-time checks

This commit is contained in:
Jack Andersen authored and Victor Zverovich committed 2019-07-15 09:20:16 +02:00
1 parent da2d33f1f1
commit 699fe8e711
2 files changed
+11 -1

No files matched your search

+8
View File
@@ -1854,6 +1854,14 @@ TEST(FormatTest, CompileTimeString) {
EXPECT_EQ("foo", fmt::format(FMT_STRING("{}"), string_like()));
}
TEST(FormatTest, CustomFormatCompileTimeString) {
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), Answer()));
Answer answer;
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), answer));
const Answer const_answer;
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer));
}
#if FMT_USE_USER_DEFINED_LITERALS
// Passing user-defined literals directly to EXPECT_EQ causes problems
// with macro argument stringification (#) on some versions of GCC.