Fix missing #include <limits> (#1482)
Summary: Hello, The compilation with the HEAD of gcc 11 fails: ``` FAILED: CMakeFiles/folly_base.dir/folly/TimeoutQueue.cpp.o g++ ... -c ../folly/TimeoutQueue.cpp ../folly/TimeoutQueue.cpp: In member function 'int64_t folly::TimeoutQueue::nextExpiration() const': ../folly/TimeoutQueue.cpp:39:32: error: 'numeric_limits' is not a member of 'std' 39 | timeouts_.empty() ? std::numeric_limits<int64_t>::max() | ^~~~~~~~~~~~~~ ../folly/TimeoutQueue.cpp:39:54: error: expected primary-expression before '>' token 39 | timeouts_.empty() ? std::numeric_limits<int64_t>::max() | ^ ../folly/TimeoutQueue.cpp:39:57: error: '::max' has not been declared 39 | timeouts_.empty() ? std::numeric_limits<int64_t>::max() | ^~~ ../folly/TimeoutQueue.cpp:39:57: note: suggested alternatives: In file included from /opt/1A/toolchain/x86_64-v21.0.8/include/c++/11.0.0/functional:65, from ../folly/TimeoutQueue.h:31, from ../folly/TimeoutQueue.cpp:17: /opt/1A/toolchain/x86_64-v21.0.8/include/c++/11.0.0/bits/stl_algo.h:3464:5: note: 'std::max' 3464 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ ``` It is nothing to fix. Regards, Laurent Pull Request resolved: https://github.com/facebook/folly/pull/1482 Reviewed By: yfeldblum Differential Revision: D24757105 Pulled By: Orvid fbshipit-source-id: 8a5382edbe5b7c11cace5a1cd4c0645dfd2a9d37
Showing
Please register or sign in to comment