From 7c72019d00d181238a3651bcd464b06f8a3c1588 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Thu, 22 Oct 2020 09:49:12 -0500 Subject: [PATCH] Consolidate ifdefs for C++ version. --- libcxx/include/chrono | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 2e3b8411c7..2de8e5c920 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -952,7 +952,7 @@ struct _LIBCUDACXX_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep template _LIBCUDACXX_INLINE_VAR _LIBCUDACXX_CONSTEXPR bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; -#endif +#endif // _LIBCUDACXX_STD_VER > 11 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) template struct _LIBCUDACXX_TEMPLATE_VIS duration_values @@ -1013,7 +1013,7 @@ round(const duration<_Rep, _Period>& __d) return __upper; return __lower.count() & 1 ? __upper : __lower; } -#endif +#endif // _LIBCUDACXX_STD_VER > 11 // duration @@ -1132,7 +1132,7 @@ typedef duration< int, ratio_multiply, hours::period>> day typedef duration< int, ratio_multiply, days::period>> weeks; typedef duration< int, ratio_multiply, days::period>> years; typedef duration< int, ratio_divide>> months; -#endif +#endif // _LIBCUDACXX_STD_VER > 11 // Duration == template @@ -1461,7 +1461,7 @@ abs(duration<_Rep, _Period> __d) { return __d >= __d.zero() ? +__d : -__d; } -#endif +#endif // _LIBCUDACXX_STD_VER > 11 // time_point == @@ -3086,8 +3086,6 @@ inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(co _LIBCUDACXX_INLINE_VISIBILITY inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; } -#if _LIBCUDACXX_STD_VER > 17 - template class hh_mm_ss { @@ -3158,8 +3156,6 @@ private: precision __f; }; -#endif // _LIBCUDACXX_STD_VER > 17 - _LIBCUDACXX_INLINE_VISIBILITY constexpr bool is_am(const hours& __h) noexcept { return __h >= hours( 0) && __h < hours(12); } _LIBCUDACXX_INLINE_VISIBILITY @@ -3182,11 +3178,8 @@ constexpr hours make24(const hours& __h, bool __is_pm) noexcept return __h == hours(12) ? hours(0) : __h; } -#endif // _LIBCUDACXX_STD_VER > 11 } // chrono -#if _LIBCUDACXX_STD_VER > 11 - // GCC 5 and 6 warn (and then error) on us using the standard reserved UDL names, // but have no way of disabling that. Use the system_header pragma on those GCC versions // for the remainder of this file, even if it has been requested to disable the pragma @@ -3290,7 +3283,7 @@ namespace chrono { // hoist the literals into namespace std::chrono using namespace literals::chrono_literals; } -#endif +#endif // _LIBCUDACXX_STD_VER > 11 _LIBCUDACXX_END_NAMESPACE_STD