tmp/tmp66nvwe_o/{from.md → to.md}
RENAMED
|
@@ -3,20 +3,19 @@
|
|
| 3 |
``` cpp
|
| 4 |
template<class M, class N>
|
| 5 |
constexpr common_type_t<M,N> gcd(M m, N n);
|
| 6 |
```
|
| 7 |
|
| 8 |
-
*
|
|
|
|
|
|
|
| 9 |
`common_type_t<M, N>`.
|
| 10 |
|
| 11 |
[*Note 1*: These requirements ensure, for example, that
|
| 12 |
-
`gcd(m, m) = |m
|
| 13 |
`M`. — *end note*]
|
| 14 |
|
| 15 |
-
*Remarks:* If either `M` or `N` is not an integer type, or if either is
|
| 16 |
-
cv `bool`, the program is ill-formed.
|
| 17 |
-
|
| 18 |
*Returns:* Zero when `m` and `n` are both zero. Otherwise, returns the
|
| 19 |
-
greatest common divisor of
|
| 20 |
|
| 21 |
*Throws:* Nothing.
|
| 22 |
|
|
|
|
| 3 |
``` cpp
|
| 4 |
template<class M, class N>
|
| 5 |
constexpr common_type_t<M,N> gcd(M m, N n);
|
| 6 |
```
|
| 7 |
|
| 8 |
+
*Mandates:* `M` and `N` both are integer types and not cv `bool`.
|
| 9 |
+
|
| 10 |
+
*Preconditions:* |`m`| and |`n`| are representable as a value of
|
| 11 |
`common_type_t<M, N>`.
|
| 12 |
|
| 13 |
[*Note 1*: These requirements ensure, for example, that
|
| 14 |
+
`gcd(m, m)` = |`m`| is representable as a value of type
|
| 15 |
`M`. — *end note*]
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
*Returns:* Zero when `m` and `n` are both zero. Otherwise, returns the
|
| 18 |
+
greatest common divisor of |`m`| and |`n`|.
|
| 19 |
|
| 20 |
*Throws:* Nothing.
|
| 21 |
|