aboutsummaryrefslogtreecommitdiff
path: root/include/ratio
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-01-06 21:36:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-01-06 21:36:34 +0000
commitbbb901fa67d0cd47565bb9972beb367ae264ec69 (patch)
tree59d57aeb80de00e0471fbd0bce10f29776675db6 /include/ratio
parent0294ba5648d889e48ffee8ddad25944e258940ae (diff)
Vendor import of libc++ release_60 branch r321788:vendor/libc++/libc++-release_60-r321788
Notes
svn path=/vendor/libc++/dist-release_60/; revision=327645 svn path=/vendor/libc++/libc++-release_60-r321788/; revision=327646; tag=vendor/libc++/libc++-release_60-r321788
Diffstat (limited to 'include/ratio')
-rw-r--r--include/ratio30
1 files changed, 18 insertions, 12 deletions
diff --git a/include/ratio b/include/ratio
index 27aa0ded32e6..7ee5ec245174 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