diff options
Diffstat (limited to 'libcxx/include/chrono')
| -rw-r--r-- | libcxx/include/chrono | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/include/chrono b/libcxx/include/chrono index aac05870f55..68484e98243 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -26,6 +26,9 @@ duration_cast(const duration<Rep, Period>& fd); template <class Rep> struct treat_as_floating_point : is_floating_point<Rep> {}; +template <class Rep> constexpr bool treat_as_floating_point_v + = treat_as_floating_point<Rep>::value; // C++17 + template <class Rep> struct duration_values { @@ -413,6 +416,11 @@ duration_cast(const duration<_Rep, _Period>& __fd) template <class _Rep> struct _LIBCPP_TYPE_VIS_ONLY treat_as_floating_point : is_floating_point<_Rep> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v + = treat_as_floating_point<_Rep>::value; +#endif + template <class _Rep> struct _LIBCPP_TYPE_VIS_ONLY duration_values { |

