alternate attempts to work around intel icc 19 limitations

This commit is contained in:
Axel Kohlmeyer
2025-01-12 16:43:37 -05:00
parent 7b60abf569
commit 296f1ab29f
2 changed files with 3 additions and 5 deletions

View File

@ -2238,15 +2238,12 @@ template <typename Context> class value {
custom.format = format_custom<value_type, formatter<value_type, char_type>>;
}
#if !defined(__INTEL_COMPILER) && !defined(__ICL)
// LAMMPS customization: disable for Intel compilers as some of them choke on it
template <typename T, FMT_ENABLE_IF(!has_formatter<T, char_type>())>
FMT_CONSTEXPR value(const T&, custom_tag) {
// Cannot format an argument; to make type T formattable provide a
// formatter<T> specialization: https://fmt.dev/latest/api.html#udt.
type_is_unformattable_for<T, char_type> _;
}
#endif
// Formats an argument of a custom type, such as a user-defined class.
template <typename T, typename Formatter>

View File

@ -269,8 +269,9 @@ void Info::command(int narg, char **arg)
if (out == nullptr) return;
fputs("\nInfo-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info\n",out);
std::time_t now = std::time(nullptr);
fmt::print(out,"Printed on {:%a %b %d %H:%M:%S %Y}\n", fmt::localtime(now));
std::tm now = fmt::localtime(std::time(nullptr));
fmt::print(out,"Printed on {:%a %b %d %H:%M:%S %Y}\n", now.tm_wday, now.tm_mon, now.tm_mday,
now.tm_hour, now.tm_min, now.tm_sec, now.tm_year);
if (flags & CONFIG) {
fmt::print(out,"\nLAMMPS version: {} / {}\n", lmp->version, lmp->num_ver);