mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-05 02:27:45 +00:00
Fix gcc 7.2 issue
This commit is contained in:
parent
f5dc0ed342
commit
0565d65461
@ -1992,7 +1992,8 @@ FMT_CONSTEXPR void parse_format_string(Iterator it, Handler &&handler) {
|
|||||||
template <typename T, typename ParseContext>
|
template <typename T, typename ParseContext>
|
||||||
FMT_CONSTEXPR const typename ParseContext::char_type *
|
FMT_CONSTEXPR const typename ParseContext::char_type *
|
||||||
parse_format_specs(ParseContext &ctx) {
|
parse_format_specs(ParseContext &ctx) {
|
||||||
formatter<T, typename ParseContext::char_type> f;
|
// GCC 7.2 requires initializer.
|
||||||
|
formatter<T, typename ParseContext::char_type> f{};
|
||||||
return f.parse(ctx);
|
return f.parse(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1929,7 +1929,7 @@ FMT_CONSTEXPR bool test_error(const char *fmt, const char *expected_error) {
|
|||||||
TEST(FormatTest, FormatStringErrors) {
|
TEST(FormatTest, FormatStringErrors) {
|
||||||
EXPECT_ERROR("foo", nullptr);
|
EXPECT_ERROR("foo", nullptr);
|
||||||
EXPECT_ERROR("}", "unmatched '}' in format string");
|
EXPECT_ERROR("}", "unmatched '}' in format string");
|
||||||
//EXPECT_ERROR("{0:s", "unknown format specifier", Date);
|
EXPECT_ERROR("{0:s", "unknown format specifier", Date);
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
// This causes an internal compiler error in MSVC2017.
|
// This causes an internal compiler error in MSVC2017.
|
||||||
EXPECT_ERROR("{0:=5", "unknown format specifier", int);
|
EXPECT_ERROR("{0:=5", "unknown format specifier", int);
|
||||||
|
Loading…
Reference in New Issue
Block a user