From 59d9cfa96dcd407308c6eaf5f8dc3ae612d117a3 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 9 Sep 2016 21:21:22 -0400 Subject: [PATCH] Update the availability of floor, ceil, round --- date.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/date.h b/date.h index 45253f4..fb66308 100644 --- a/date.h +++ b/date.h @@ -964,7 +964,7 @@ trunc(const std::chrono::duration& d) } // VS Update 2 provides floor, ceil, round, abs in chrono. -#if !defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918 +#if (defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918) || __cplusplus <= 201402 // round down template @@ -1061,14 +1061,14 @@ ceil(const std::chrono::time_point& tp) return time_point{ceil(tp.time_since_epoch())}; } -#else // !defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918 +#else // (defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918) || __cplusplus <= 201402 using std::chrono::floor; using std::chrono::ceil; using std::chrono::round; using std::chrono::abs; -#endif // !defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918 +#endif // (defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918) || __cplusplus <= 201402 // trunc towards zero template