From b8c47793c8c4267af0f7acf21a64451370db3b3c Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Mon, 11 Jul 2022 18:52:27 +0500 Subject: [PATCH] Fix for EDG frontend (Intel, NVHPC compilers) Signed-off-by: Vladislav Shchapov --- include/fmt/chrono.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index c3c52bf5..75327b11 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2016,13 +2016,16 @@ struct formatter, return formatter::format(localtime(val), ctx); } - static constexpr const Char default_specs[] = {'%', 'F', ' ', '%', 'T'}; + // EDG frontend (Intel, NVHPC compilers) can't determine array length. + static constexpr const Char default_specs[5] = {'%', 'F', ' ', '%', 'T'}; }; +#if FMT_CPLUSPLUS < 201703L template constexpr const Char formatter, Char>::default_specs[]; +#endif template struct formatter { private: