Defend against min/max macros.
diff --git a/asio/include/asio/ssl/detail/stream_core.hpp b/asio/include/asio/ssl/detail/stream_core.hpp index 5fcc932..b29bbfc 100644 --- a/asio/include/asio/ssl/detail/stream_core.hpp +++ b/asio/include/asio/ssl/detail/stream_core.hpp
@@ -89,13 +89,13 @@ // Helper function for obtaining a time value that always fires. static asio::steady_timer::time_point neg_infin() { - return asio::steady_timer::time_point::min(); + return (asio::steady_timer::time_point::min)(); } // Helper function for obtaining a time value that never fires. static asio::steady_timer::time_point pos_infin() { - return asio::steady_timer::time_point::max(); + return (asio::steady_timer::time_point::max)(); } #endif // defined(ASIO_HAS_BOOST_DATE_TIME)
diff --git a/asio/src/tests/unit/system_timer.cpp b/asio/src/tests/unit/system_timer.cpp index 8395d8c..c624ea7 100644 --- a/asio/src/tests/unit/system_timer.cpp +++ b/asio/src/tests/unit/system_timer.cpp
@@ -245,7 +245,7 @@ asio::system_timer t; timer() : t(io_service) { - t.expires_at(asio::system_timer::time_point::max()); + t.expires_at((asio::system_timer::time_point::max)()); } } timers[50]; @@ -294,13 +294,13 @@ for (int i = 0; i < 50; ++i) { - timers[i].t.expires_at(asio::system_timer::time_point::max()); + timers[i].t.expires_at((asio::system_timer::time_point::max)()); timers[i].t.async_wait(custom_allocation_timer_handler(&allocation_count)); } for (int i = 50; i < 100; ++i) { - timers[i].t.expires_at(asio::system_timer::time_point::min()); + timers[i].t.expires_at((asio::system_timer::time_point::min)()); timers[i].t.async_wait(custom_allocation_timer_handler(&allocation_count)); }