mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 19:24:48 +02:00
test: add default constructor for a const value
This fixed a compilation error of the OS X 10.11.6 C++ compiler: ./fmt/test/format-test.cc:1861:16: error: default initialization of an object of const type 'const Answer' without a user-provided default constructor const Answer const_answer; ^ {}
This commit is contained in:
committed by
Victor Zverovich
parent
5420bcce2d
commit
78842ce0d6
@@ -1917,7 +1917,7 @@ TEST(FormatTest, CustomFormatCompileTimeString) {
|
|||||||
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), Answer()));
|
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), Answer()));
|
||||||
Answer answer;
|
Answer answer;
|
||||||
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), answer));
|
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), answer));
|
||||||
const Answer const_answer;
|
const Answer const_answer = Answer();
|
||||||
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer));
|
EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user