diff options
Diffstat (limited to 'include/ratio')
-rw-r--r-- | include/ratio | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/include/ratio b/include/ratio index 27aa0ded32e67..7ee5ec245174a 100644 --- a/include/ratio +++ b/include/ratio @@ -63,17 +63,17 @@ typedef ratio< 1000000000000000000000, 1> zetta; // not supported typedef ratio<1000000000000000000000000, 1> yotta; // not supported // 20.11.5, ratio comparison - template <class R1, class R2> constexpr bool ratio_equal_v + template <class R1, class R2> inline constexpr bool ratio_equal_v = ratio_equal<R1, R2>::value; // C++17 - template <class R1, class R2> constexpr bool ratio_not_equal_v + template <class R1, class R2> inline constexpr bool ratio_not_equal_v = ratio_not_equal<R1, R2>::value; // C++17 - template <class R1, class R2> constexpr bool ratio_less_v + template <class R1, class R2> inline constexpr bool ratio_less_v = ratio_less<R1, R2>::value; // C++17 - template <class R1, class R2> constexpr bool ratio_less_equal_v + template <class R1, class R2> inline constexpr bool ratio_less_equal_v = ratio_less_equal<R1, R2>::value; // C++17 - template <class R1, class R2> constexpr bool ratio_greater_v + template <class R1, class R2> inline constexpr bool ratio_greater_v = ratio_greater<R1, R2>::value; // C++17 - template <class R1, class R2> constexpr bool ratio_greater_equal_v + template <class R1, class R2> inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<R1, R2>::value; // C++17 } */ @@ -501,22 +501,28 @@ struct __ratio_gcd }; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_equal_v = ratio_equal<_R1, _R2>::value; -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_not_equal_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_v = ratio_less<_R1, _R2>::value; -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_equal_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_v = ratio_greater<_R1, _R2>::value; -template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v +template <class _R1, class _R2> +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; #endif |