From defa04e730b274c8ad43e4d179d13e6315b04a2e Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Wed, 13 Jul 2022 23:34:43 +0500 Subject: [PATCH] Fix for EDG frontend (Intel, NVHPC compilers) (#2982) 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 95a10517..9b2aa74d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -2017,13 +2017,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: