From Jason Turner

[ratio.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpf0a0j1x4/{from.md → to.md} +33 -20
tmp/tmpf0a0j1x4/{from.md → to.md} RENAMED
@@ -17,29 +17,42 @@ namespace std {
17
  template <class R1, class R2> struct ratio_less;
18
  template <class R1, class R2> struct ratio_less_equal;
19
  template <class R1, class R2> struct ratio_greater;
20
  template <class R1, class R2> struct ratio_greater_equal;
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  // [ratio.si], convenience SI typedefs
23
- typedef ratio<1, 1'000'000'000'000'000'000'000'000> yocto; // see below
24
- typedef ratio<1, 1'000'000'000'000'000'000'000> zepto; // see below
25
- typedef ratio<1, 1'000'000'000'000'000'000> atto;
26
- typedef ratio<1, 1'000'000'000'000'000> femto;
27
- typedef ratio<1, 1'000'000'000'000> pico;
28
- typedef ratio<1, 1'000'000'000> nano;
29
- typedef ratio<1, 1'000'000> micro;
30
- typedef ratio<1, 1'000> milli;
31
- typedef ratio<1, 100> centi;
32
- typedef ratio<1, 10> deci;
33
- typedef ratio< 10, 1> deca;
34
- typedef ratio< 100, 1> hecto;
35
- typedef ratio< 1'000, 1> kilo;
36
- typedef ratio< 1'000'000, 1> mega;
37
- typedef ratio< 1'000'000'000, 1> giga;
38
- typedef ratio< 1'000'000'000'000, 1> tera;
39
- typedef ratio< 1'000'000'000'000'000, 1> peta;
40
- typedef ratio< 1'000'000'000'000'000'000, 1> exa;
41
- typedef ratio< 1'000'000'000'000'000'000'000, 1> zetta; // see below
42
- typedef ratio<1'000'000'000'000'000'000'000'000, 1> yotta; // see below
43
  }
44
  ```
45
 
 
17
  template <class R1, class R2> struct ratio_less;
18
  template <class R1, class R2> struct ratio_less_equal;
19
  template <class R1, class R2> struct ratio_greater;
20
  template <class R1, class R2> struct ratio_greater_equal;
21
 
22
+ template <class R1, class R2>
23
+ inline constexpr bool ratio_equal_v = ratio_equal<R1, R2>::value;
24
+ template <class R1, class R2>
25
+ inline constexpr bool ratio_not_equal_v = ratio_not_equal<R1, R2>::value;
26
+ template <class R1, class R2>
27
+ inline constexpr bool ratio_less_v = ratio_less<R1, R2>::value;
28
+ template <class R1, class R2>
29
+ inline constexpr bool ratio_less_equal_v = ratio_less_equal<R1, R2>::value;
30
+ template <class R1, class R2>
31
+ inline constexpr bool ratio_greater_v = ratio_greater<R1, R2>::value;
32
+ template <class R1, class R2>
33
+ inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<R1, R2>::value;
34
+
35
  // [ratio.si], convenience SI typedefs
36
+ using yocto = ratio<1, 1'000'000'000'000'000'000'000'000>; // see below
37
+ using zepto = ratio<1, 1'000'000'000'000'000'000'000>; // see below
38
+ using atto = ratio<1, 1'000'000'000'000'000'000>;
39
+ using femto = ratio<1, 1'000'000'000'000'000>;
40
+ using pico = ratio<1, 1'000'000'000'000>;
41
+ using nano = ratio<1, 1'000'000'000>;
42
+ using micro = ratio<1, 1'000'000>;
43
+ using milli = ratio<1, 1'000>;
44
+ using centi = ratio<1, 100>;
45
+ using deci = ratio<1, 10>;
46
+ using deca = ratio< 10, 1>;
47
+ using hecto = ratio< 100, 1>;
48
+ using kilo = ratio< 1'000, 1>;
49
+ using mega = ratio< 1'000'000, 1>;
50
+ using giga = ratio< 1'000'000'000, 1>;
51
+ using tera = ratio< 1'000'000'000'000, 1>;
52
+ using peta = ratio< 1'000'000'000'000'000, 1>;
53
+ using exa = ratio< 1'000'000'000'000'000'000, 1>;
54
+ using zetta = ratio< 1'000'000'000'000'000'000'000, 1>; // see below
55
+ using yotta = ratio<1'000'000'000'000'000'000'000'000, 1>; // see below
56
  }
57
  ```
58