diff options
author | Leon Klingele <git@leonklingele.de> | 2019-11-19 15:13:38 +0100 |
---|---|---|
committer | Victor Zverovich <victor.zverovich@gmail.com> | 2019-11-19 08:32:35 -0800 |
commit | 78842ce0d6a445c7be8cb48fe867a0d3c7cbf11a (patch) | |
tree | 103f100b5808f902f070ac9144bb5598c047e512 /test | |
parent | 5420bcce2d29f10129ea75bc863cf52ddd03ac29 (diff) | |
download | fmtlib-78842ce0d6a445c7be8cb48fe867a0d3c7cbf11a.tar.gz |
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;
^
{}
Diffstat (limited to 'test')
-rw-r--r-- | test/format-test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/format-test.cc b/test/format-test.cc index 66d87c2d..08828ccb 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1917,7 +1917,7 @@ 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; + const Answer const_answer = Answer(); EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer)); } |