aboutsummaryrefslogtreecommitdiff
path: root/contrib/libc++/include/experimental/ratio
blob: 757f24e086149df020f882e9de5ca70285725464 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// -*- C++ -*-
//===------------------------------ ratio ---------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_EXPERIMENTAL_RATIO
#define _LIBCPP_EXPERIMENTAL_RATIO

/**
    experimental/ratio synopsis
    C++1y
#include <ratio>

namespace std {
namespace experimental {
inline namespace fundamentals_v1 {

  // See C++14 20.11.5, ratio comparison
  template <class R1, class R2> constexpr bool ratio_equal_v
    = ratio_equal<R1, R2>::value;
  template <class R1, class R2> constexpr bool ratio_not_equal_v
    = ratio_not_equal<R1, R2>::value;
  template <class R1, class R2> constexpr bool ratio_less_v
    = ratio_less<R1, R2>::value;
  template <class R1, class R2> constexpr bool ratio_less_equal_v
    = ratio_less_equal<R1, R2>::value;
  template <class R1, class R2> constexpr bool ratio_greater_v
    = ratio_greater<R1, R2>::value;
  template <class R1, class R2> constexpr bool ratio_greater_equal_v
    = ratio_greater_equal<R1, R2>::value;

} // namespace fundamentals_v1
} // namespace experimental
} // namespace std

*/

#include <experimental/__config>

#if _LIBCPP_STD_VER > 11

#include <ratio>

_LIBCPP_BEGIN_NAMESPACE_LFTS

#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v
    = ratio_equal<_R1, _R2>::value;

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_not_equal_v
    = ratio_not_equal<_R1, _R2>::value;

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_v
    = ratio_less<_R1, _R2>::value;

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_less_equal_v
    = ratio_less_equal<_R1, _R2>::value;

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v
    = ratio_greater<_R1, _R2>::value;

template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
    = ratio_greater_equal<_R1, _R2>::value;

#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */

_LIBCPP_END_NAMESPACE_LFTS

#endif /* _LIBCPP_STD_VER > 11 */

#endif // _LIBCPP_EXPERIMENTAL_RATIO