xref: /minix3/external/bsd/libc++/dist/libcxx/include/experimental/ratio (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc// -*- C++ -*-
2*0a6a1f1dSLionel Sambuc//===------------------------------ ratio ---------------------------------===//
3*0a6a1f1dSLionel Sambuc//
4*0a6a1f1dSLionel Sambuc//                     The LLVM Compiler Infrastructure
5*0a6a1f1dSLionel Sambuc//
6*0a6a1f1dSLionel Sambuc// This file is distributed under the University of Illinois Open Source
7*0a6a1f1dSLionel Sambuc// License. See LICENSE.TXT for details.
8*0a6a1f1dSLionel Sambuc//
9*0a6a1f1dSLionel Sambuc//===----------------------------------------------------------------------===//
10*0a6a1f1dSLionel Sambuc
11*0a6a1f1dSLionel Sambuc#ifndef _LIBCPP_EXPERIMENTAL_RATIO
12*0a6a1f1dSLionel Sambuc#define _LIBCPP_EXPERIMENTAL_RATIO
13*0a6a1f1dSLionel Sambuc
14*0a6a1f1dSLionel Sambuc/**
15*0a6a1f1dSLionel Sambuc    experimental/ratio synopsis
16*0a6a1f1dSLionel Sambuc    C++1y
17*0a6a1f1dSLionel Sambuc#include <ratio>
18*0a6a1f1dSLionel Sambuc
19*0a6a1f1dSLionel Sambucnamespace std {
20*0a6a1f1dSLionel Sambucnamespace experimental {
21*0a6a1f1dSLionel Sambucinline namespace fundamentals_v1 {
22*0a6a1f1dSLionel Sambuc
23*0a6a1f1dSLionel Sambuc  // See C++14 20.11.5, ratio comparison
24*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_equal_v
25*0a6a1f1dSLionel Sambuc    = ratio_equal<R1, R2>::value;
26*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_not_equal_v
27*0a6a1f1dSLionel Sambuc    = ratio_not_equal<R1, R2>::value;
28*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_less_v
29*0a6a1f1dSLionel Sambuc    = ratio_less<R1, R2>::value;
30*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_less_equal_v
31*0a6a1f1dSLionel Sambuc    = ratio_less_equal<R1, R2>::value;
32*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_greater_v
33*0a6a1f1dSLionel Sambuc    = ratio_greater<R1, R2>::value;
34*0a6a1f1dSLionel Sambuc  template <class R1, class R2> constexpr bool ratio_greater_equal_v
35*0a6a1f1dSLionel Sambuc    = ratio_greater_equal<R1, R2>::value;
36*0a6a1f1dSLionel Sambuc
37*0a6a1f1dSLionel Sambuc} // namespace fundamentals_v1
38*0a6a1f1dSLionel Sambuc} // namespace experimental
39*0a6a1f1dSLionel Sambuc} // namespace std
40*0a6a1f1dSLionel Sambuc
41*0a6a1f1dSLionel Sambuc*/
42*0a6a1f1dSLionel Sambuc
43*0a6a1f1dSLionel Sambuc#include <experimental/__config>
44*0a6a1f1dSLionel Sambuc
45*0a6a1f1dSLionel Sambuc#if _LIBCPP_STD_VER > 11
46*0a6a1f1dSLionel Sambuc
47*0a6a1f1dSLionel Sambuc#include <ratio>
48*0a6a1f1dSLionel Sambuc
49*0a6a1f1dSLionel Sambuc_LIBCPP_BEGIN_NAMESPACE_LFTS
50*0a6a1f1dSLionel Sambuc
51*0a6a1f1dSLionel Sambuc#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
52*0a6a1f1dSLionel Sambuc
53*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v
54*0a6a1f1dSLionel Sambuc    = ratio_equal<_R1, _R2>::value;
55*0a6a1f1dSLionel Sambuc
56*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_not_equal_v
57*0a6a1f1dSLionel Sambuc    = ratio_not_equal<_R1, _R2>::value;
58*0a6a1f1dSLionel Sambuc
59*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_v
60*0a6a1f1dSLionel Sambuc    = ratio_less<_R1, _R2>::value;
61*0a6a1f1dSLionel Sambuc
62*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_equal_v
63*0a6a1f1dSLionel Sambuc    = ratio_less_equal<_R1, _R2>::value;
64*0a6a1f1dSLionel Sambuc
65*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v
66*0a6a1f1dSLionel Sambuc    = ratio_greater<_R1, _R2>::value;
67*0a6a1f1dSLionel Sambuc
68*0a6a1f1dSLionel Sambuctemplate <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
69*0a6a1f1dSLionel Sambuc    = ratio_greater_equal<_R1, _R2>::value;
70*0a6a1f1dSLionel Sambuc
71*0a6a1f1dSLionel Sambuc#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
72*0a6a1f1dSLionel Sambuc
73*0a6a1f1dSLionel Sambuc_LIBCPP_END_NAMESPACE_LFTS
74*0a6a1f1dSLionel Sambuc
75*0a6a1f1dSLionel Sambuc#endif /* _LIBCPP_STD_VER > 11 */
76*0a6a1f1dSLionel Sambuc
77*0a6a1f1dSLionel Sambuc#endif // _LIBCPP_EXPERIMENTAL_RATIO
78