tmp/tmpopn_t7sj/{from.md → to.md}
RENAMED
|
@@ -10,11 +10,11 @@ as a rational constant using the template `ratio`.
|
|
| 10 |
namespace std::chrono {
|
| 11 |
template<class Rep, class Period = ratio<1>>
|
| 12 |
class duration {
|
| 13 |
public:
|
| 14 |
using rep = Rep;
|
| 15 |
-
using period =
|
| 16 |
|
| 17 |
private:
|
| 18 |
rep rep_; // exposition only
|
| 19 |
|
| 20 |
public:
|
|
@@ -63,13 +63,14 @@ If `Period` is not a specialization of `ratio`, the program is
|
|
| 63 |
ill-formed. If `Period::num` is not positive, the program is ill-formed.
|
| 64 |
|
| 65 |
Members of `duration` do not throw exceptions other than those thrown by
|
| 66 |
the indicated operations on their representations.
|
| 67 |
|
| 68 |
-
The defaulted copy constructor of duration shall be a constexpr
|
| 69 |
-
if and only if the required initialization of the member `rep_`
|
| 70 |
-
and move, respectively, would be constexpr-suitable
|
|
|
|
| 71 |
|
| 72 |
[*Example 1*:
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
duration<long, ratio<60>> d0; // holds a count of minutes using a long
|
|
|
|
| 10 |
namespace std::chrono {
|
| 11 |
template<class Rep, class Period = ratio<1>>
|
| 12 |
class duration {
|
| 13 |
public:
|
| 14 |
using rep = Rep;
|
| 15 |
+
using period = Period::type;
|
| 16 |
|
| 17 |
private:
|
| 18 |
rep rep_; // exposition only
|
| 19 |
|
| 20 |
public:
|
|
|
|
| 63 |
ill-formed. If `Period::num` is not positive, the program is ill-formed.
|
| 64 |
|
| 65 |
Members of `duration` do not throw exceptions other than those thrown by
|
| 66 |
the indicated operations on their representations.
|
| 67 |
|
| 68 |
+
The defaulted copy constructor of `duration` shall be a constexpr
|
| 69 |
+
function if and only if the required initialization of the member `rep_`
|
| 70 |
+
for copy and move, respectively, would be constexpr-suitable
|
| 71 |
+
[[dcl.constexpr]].
|
| 72 |
|
| 73 |
[*Example 1*:
|
| 74 |
|
| 75 |
``` cpp
|
| 76 |
duration<long, ratio<60>> d0; // holds a count of minutes using a long
|