From 5381061d97c3a494872e665d4de47eb9d589e458 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 29 Sep 2019 22:03:47 -0700 Subject: [PATCH] Fix windows compile error where std::max is overriden by a macro (#1251) --- include/spdlog/details/pattern_formatter-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/pattern_formatter-inl.h b/include/spdlog/details/pattern_formatter-inl.h index 06a3dcd1..1b95eb6d 100644 --- a/include/spdlog/details/pattern_formatter-inl.h +++ b/include/spdlog/details/pattern_formatter-inl.h @@ -878,7 +878,7 @@ public: void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { - auto delta = std::max(msg.time - last_message_time_, log_clock::duration::zero()); + auto delta = (std::max)(msg.time - last_message_time_, log_clock::duration::zero()); auto delta_units = std::chrono::duration_cast(delta); last_message_time_ = msg.time; ScopedPadder p(6, padinfo_, dest);