Skip to content

Commit

Permalink
Fix for EDG frontend (Intel, NVHPC compilers) (#2982)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus committed Jul 13, 2022
1 parent 92d36e8 commit defa04e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit defa04e

Please sign in to comment.