29
Time library
[time]
29.6
Class template
time_
point
[time.point]
29.6.1
General
[time.point.general]
🔗
namespace
std
::
chrono
{
template
<
class
Clock,
class
Duration
=
typename
Clock
::
duration
>
class
time_point
{
public
:
using
clock
=
Clock;
using
duration
=
Duration;
using
rep
=
typename
duration
::
rep;
using
period
=
typename
duration
::
period;
private
:
duration d_;
//
exposition only
public
:
//
[time.
point.
cons]
, construct
constexpr
time_point
(
)
;
// has value epoch
constexpr
explicit
time_point
(
const
duration
&
d
)
;
// same as
time_
point() + d
template
<
class
Duration2
>
constexpr
time_point
(
const
time_point
<
clock, Duration2
>
&
t
)
;
//
[time.
point.
observer]
, observer
constexpr
duration time_since_epoch
(
)
const
;
//
[time.
point.
arithmetic]
, arithmetic
constexpr
time_point
&
operator
+
+
(
)
;
constexpr
time_point
operator
+
+
(
int
)
;
constexpr
time_point
&
operator
-
-
(
)
;
constexpr
time_point
operator
-
-
(
int
)
;
constexpr
time_point
&
operator
+
=
(
const
duration
&
d
)
;
constexpr
time_point
&
operator
-
=
(
const
duration
&
d
)
;
//
[time.
point.
special]
, special values
static
constexpr
time_point min
(
)
noexcept
;
static
constexpr
time_point max
(
)
noexcept
;
}
;
}
1
#
If
Duration
is not a specialization of
duration
, the program is ill-formed
.