tmp/tmpxpq5_c4d/{from.md → to.md}
RENAMED
|
@@ -24,11 +24,12 @@ duration<int, milli> d(3.5); // error
|
|
| 24 |
template <class Rep2, class Period2>
|
| 25 |
constexpr duration(const duration<Rep2, Period2>& d);
|
| 26 |
```
|
| 27 |
|
| 28 |
*Remarks:* This constructor shall not participate in overload resolution
|
| 29 |
-
unless
|
|
|
|
| 30 |
`ratio_divide<Period2, period>::den` is `1` and
|
| 31 |
`treat_as_floating_point<Rep2>::value` is `false`. This requirement
|
| 32 |
prevents implicit truncation error when converting between
|
| 33 |
integral-based `duration` types. Such a construction could easily lead
|
| 34 |
to confusion about the value of the `duration`.
|
|
|
|
| 24 |
template <class Rep2, class Period2>
|
| 25 |
constexpr duration(const duration<Rep2, Period2>& d);
|
| 26 |
```
|
| 27 |
|
| 28 |
*Remarks:* This constructor shall not participate in overload resolution
|
| 29 |
+
unless no overflow is induced in the conversion and
|
| 30 |
+
`treat_as_floating_point<rep>::value` is `true` or both
|
| 31 |
`ratio_divide<Period2, period>::den` is `1` and
|
| 32 |
`treat_as_floating_point<Rep2>::value` is `false`. This requirement
|
| 33 |
prevents implicit truncation error when converting between
|
| 34 |
integral-based `duration` types. Such a construction could easily lead
|
| 35 |
to confusion about the value of the `duration`.
|