Skip to content

Commit 4935ed4

Browse files
committed
[ratio.{syn,comparison}] Mild reformatting for consistency.
Fixes #1402.
1 parent 50353bd commit 4935ed4

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

source/utilities.tex

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17016,6 +17016,19 @@
1701617016
template <class R1, class R2> struct ratio_greater;
1701717017
template <class R1, class R2> struct ratio_greater_equal;
1701817018

17019+
template <class R1, class R2>
17020+
constexpr bool ratio_equal_v = ratio_equal<R1, R2>::value;
17021+
template <class R1, class R2>
17022+
constexpr bool ratio_not_equal_v = ratio_not_equal<R1, R2>::value;
17023+
template <class R1, class R2>
17024+
constexpr bool ratio_less_v = ratio_less<R1, R2>::value;
17025+
template <class R1, class R2>
17026+
constexpr bool ratio_less_equal_v = ratio_less_equal<R1, R2>::value;
17027+
template <class R1, class R2>
17028+
constexpr bool ratio_greater_v = ratio_greater<R1, R2>::value;
17029+
template <class R1, class R2>
17030+
constexpr bool ratio_greater_equal_v = ratio_greater_equal<R1, R2>::value;
17031+
1701917032
// \ref{ratio.si}, convenience SI typedefs
1702017033
using yocto = ratio<1, 1'000'000'000'000'000'000'000'000>; // see below
1702117034
using zepto = ratio<1, 1'000'000'000'000'000'000'000>; // see below
@@ -17037,20 +17050,6 @@
1703717050
using exa = ratio< 1'000'000'000'000'000'000, 1>;
1703817051
using zetta = ratio< 1'000'000'000'000'000'000'000, 1>; // see below
1703917052
using yotta = ratio<1'000'000'000'000'000'000'000'000, 1>; // see below
17040-
17041-
// \ref{ratio.arithmetic}, ratio comparison
17042-
template <class R1, class R2> constexpr bool ratio_equal_v
17043-
= ratio_equal<R1, R2>::value;
17044-
template <class R1, class R2> constexpr bool ratio_not_equal_v
17045-
= ratio_not_equal<R1, R2>::value;
17046-
template <class R1, class R2> constexpr bool ratio_less_v
17047-
= ratio_less<R1, R2>::value;
17048-
template <class R1, class R2> constexpr bool ratio_less_equal_v
17049-
= ratio_less_equal<R1, R2>::value;
17050-
template <class R1, class R2> constexpr bool ratio_greater_v
17051-
= ratio_greater<R1, R2>::value;
17052-
template <class R1, class R2> constexpr bool ratio_greater_equal_v
17053-
= ratio_greater_equal<R1, R2>::value;
1705417053
}
1705517054
\end{codeblockdigitsep}
1705617055

@@ -17161,20 +17160,20 @@
1716117160

1716217161
\indexlibrary{\idxcode{ratio_equal}}%
1716317162
\begin{itemdecl}
17164-
template <class R1, class R2> struct ratio_equal
17165-
: bool_constant<R1::num == R2::num && R1::den == R2::den> { };
17163+
template <class R1, class R2>
17164+
struct ratio_equal : bool_constant<R1::num == R2::num && R1::den == R2::den> { };
1716617165
\end{itemdecl}
1716717166

1716817167
\indexlibrary{\idxcode{ratio_not_equal}}%
1716917168
\begin{itemdecl}
17170-
template <class R1, class R2> struct ratio_not_equal
17171-
: bool_constant<!ratio_equal_v<R1, R2>> { };
17169+
template <class R1, class R2>
17170+
struct ratio_not_equal : bool_constant<!ratio_equal_v<R1, R2>> { };
1717217171
\end{itemdecl}
1717317172

1717417173
\indexlibrary{\idxcode{ratio_less}}%
1717517174
\begin{itemdecl}
17176-
template <class R1, class R2> struct ratio_less
17177-
: bool_constant<@\seebelow@> { };
17175+
template <class R1, class R2>
17176+
struct ratio_less : bool_constant<@\seebelow@> { };
1717817177
\end{itemdecl}
1717917178

1718017179
\begin{itemdescr}
@@ -17188,20 +17187,20 @@
1718817187

1718917188
\indexlibrary{\idxcode{ratio_less_equal}}%
1719017189
\begin{itemdecl}
17191-
template <class R1, class R2> struct ratio_less_equal
17192-
: bool_constant<!ratio_less_v<R2, R1>> { };
17190+
template <class R1, class R2>
17191+
struct ratio_less_equal : bool_constant<!ratio_less_v<R2, R1>> { };
1719317192
\end{itemdecl}
1719417193

1719517194
\indexlibrary{\idxcode{ratio_greater}}%
1719617195
\begin{itemdecl}
17197-
template <class R1, class R2> struct ratio_greater
17198-
: bool_constant<ratio_less_v<R2, R1>> { };
17196+
template <class R1, class R2>
17197+
struct ratio_greater : bool_constant<ratio_less_v<R2, R1>> { };
1719917198
\end{itemdecl}
1720017199

1720117200
\indexlibrary{\idxcode{ratio_greater_equal}}%
1720217201
\begin{itemdecl}
17203-
template <class R1, class R2> struct ratio_greater_equal
17204-
: bool_constant<!ratio_less_v<R1, R2>> { };
17202+
template <class R1, class R2>
17203+
struct ratio_greater_equal : bool_constant<!ratio_less_v<R1, R2>> { };
1720517204
\end{itemdecl}
1720617205

1720717206
\rSec2[ratio.si]{SI types for \tcode{ratio}}

0 commit comments

Comments
 (0)