Fix for EDG frontend (Intel, NVHPC compilers) (#2982)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov 2022-07-13 23:34:43 +05:00 committed by GitHub
parent 92d36e82c4
commit defa04e730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2017,13 +2017,16 @@ struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
return formatter<std::tm, Char>::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 <typename Char, typename Duration>
constexpr const Char
formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
Char>::default_specs[];
#endif
template <typename Char> struct formatter<std::tm, Char> {
private: