diff --git a/stl/inc/thread b/stl/inc/thread index 09bda8e0e1..661eb6d2ba 100644 --- a/stl/inc/thread +++ b/stl/inc/thread @@ -169,7 +169,7 @@ _NODISCARD auto _To_absolute_time(const chrono::duration<_Rep, _Period>& _Rel_ti const auto _Now = chrono::steady_clock::now(); decltype(_Now + _Rel_time) _Abs_time = _Now; // return common type if (_Rel_time > _Zero) { - constexpr auto _Forever = (chrono::steady_clock::time_point::max)(); + constexpr auto _Forever = (decltype(_Abs_time)::max)(); if (_Abs_time < _Forever - _Rel_time) { _Abs_time += _Rel_time; } else {