folly: resolve ambiguous floor overload on macos
Summary: This manifested once D13765262 landed, but is likely more closely related to the changes in D4375603: ``` In file included from /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/io/async/TimeoutManager.cpp:21: /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/Chrono.h:153:32: error: call to 'floor' is ambiguous return detail::round_impl(d, floor<To>(d)); ^~~~~~~~~ /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/io/async/TimeoutManager.cpp:77:44: note: in instantiation of function template specialization 'folly::chrono::round<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >, long long, std::__1::ratio<1, 1000000>, void>' requested here timeout_type timeout_ms = folly::chrono::round<timeout_type>(timeout); ^ /usr/local/fbprojects/packages/xcode/104/xcode_10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:444:1: note: candidate function [with _ToDuration = std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >, _Rep = long long, _Period = std::__1::ratio<1, 1000000>] floor(const duration<_Rep, _Period>& __d) ^ /Users/facebook/wez-fbsource/fbcode/watchman/external/folly/folly/Chrono.h:127:14: note: candidate function [with To = std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> >, Rep = long long, Period = std::__1::ratio<1, 1000000>, $3 = void] constexpr To floor(std::chrono::duration<Rep, Period> const& d) { ^ ``` this diff resolves the ambiguity in favor of `folly::chrono::floor`. Reviewed By: bolinfest Differential Revision: D14000897 fbshipit-source-id: 669dbf3573c3799cb21e14f247acc8d053afe746
Showing
Please register or sign in to comment