Commit 7f0aea22 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Detect libc++ std version in folly::chrono backports

Summary: [Folly] Detect libc++ std version in `folly::chrono` backports, since libc++ does not define the recommended feature macros.

Reviewed By: wez

Differential Revision: D14002296

fbshipit-source-id: 022085658aee3a453c5aea714f75f27013825c6f
parent 5bcb4a7a
......@@ -31,7 +31,7 @@
* * std::chrono::round
*/
#if __cpp_lib_chrono >= 201510 || _MSC_VER
#if __cpp_lib_chrono >= 201510 || _LIBCPP_STD_VER > 14 || _MSC_VER
namespace folly {
namespace chrono {
......@@ -150,7 +150,7 @@ template <
detail::is_duration<To>::value &&
!std::chrono::treat_as_floating_point<typename To::rep>::value>::type>
constexpr To round(std::chrono::duration<Rep, Period> const& d) {
return detail::round_impl(d, folly::chrono::floor<To>(d));
return detail::round_impl(d, floor<To>(d));
}
// mimic: std::chrono::round, C++17
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment