2 //===------------------------------ ratio ---------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef _LIBCPP_EXPERIMENTAL_RATIO
12 #define _LIBCPP_EXPERIMENTAL_RATIO
15 experimental/ratio synopsis
20 namespace experimental {
21 inline namespace fundamentals_v1 {
23 // See C++14 20.11.5, ratio comparison
24 template <class R1, class R2> constexpr bool ratio_equal_v
25 = ratio_equal<R1, R2>::value;
26 template <class R1, class R2> constexpr bool ratio_not_equal_v
27 = ratio_not_equal<R1, R2>::value;
28 template <class R1, class R2> constexpr bool ratio_less_v
29 = ratio_less<R1, R2>::value;
30 template <class R1, class R2> constexpr bool ratio_less_equal_v
31 = ratio_less_equal<R1, R2>::value;
32 template <class R1, class R2> constexpr bool ratio_greater_v
33 = ratio_greater<R1, R2>::value;
34 template <class R1, class R2> constexpr bool ratio_greater_equal_v
35 = ratio_greater_equal<R1, R2>::value;
37 } // namespace fundamentals_v1
38 } // namespace experimental
43 #include <experimental/__config>
45 #if _LIBCPP_STD_VER > 11
49 _LIBCPP_BEGIN_NAMESPACE_LFTS
51 #ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
53 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v
54 = ratio_equal<_R1, _R2>::value;
56 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_not_equal_v
57 = ratio_not_equal<_R1, _R2>::value;
59 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_v
60 = ratio_less<_R1, _R2>::value;
62 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_equal_v
63 = ratio_less_equal<_R1, _R2>::value;
65 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v
66 = ratio_greater<_R1, _R2>::value;
68 template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
69 = ratio_greater_equal<_R1, _R2>::value;
71 #endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
73 _LIBCPP_END_NAMESPACE_LFTS
75 #endif /* _LIBCPP_STD_VER > 11 */
77 #endif // _LIBCPP_EXPERIMENTAL_RATIO