std::chrono::time_point<Clock,Duration>:: operator++, std::chrono::time_point<Clock,Duration>:: operator--
From cppreference.net
<
cpp
|
chrono
|
time point
C++
Date and time library
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::time_point
| Member functions | ||||
|
time_point::operator++
time_point::operator--
(C++20)
(C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)
(C++20)
|
||||
|
(C++17)
|
||||
|
(C++17)
|
||||
|
(C++17)
|
||||
| Helper classes | ||||
|
(C++26)
|
|
constexpr
time_point
&
operator
++
(
)
;
|
(1) | (C++20부터) |
|
constexpr
time_point operator
++
(
int
)
;
|
(2) | (C++20부터) |
|
constexpr
time_point
&
operator
--
(
)
;
|
(3) | (C++20부터) |
|
constexpr
time_point operator
--
(
int
)
;
|
(4) | (C++20부터) |
이 지점이 나타내는 시간을
*
this
만큼
duration
의 한 틱씩 수정합니다.
만약
d_
가 이
time_point
객체의 지속 시간(즉, epoch 이후의 시간)을 보유하는 멤버 변수라면,
1)
다음 코드와 동일함:
++
d_
;
return
*
this
;
.
2)
return
time_point
(
d_
++
)
와 동등합니다.
3)
다음과 동일함
--
d_
;
return
*
this
;
.
4)
다음에 해당함
return
time_point
(
d_
--
)
;
.
목차 |
매개변수
(없음)
반환값
1,3)
수정 후 이
time_point
에 대한 참조.
2,4)
수정 전에 생성된
time_point
의 복사본.
예제
|
이 섹션은 불완전합니다
이유: 예제가 없음 |
참고 항목
|
틱 카운트를 증가 또는 감소시킴
(
std::chrono::duration<Rep,Period>
의 public member function)
|
|
|
주어진 duration으로 시간 포인트를 수정함
(public member function) |
|
|
(C++11)
|
시간 포인트를 포함하는 덧셈 및 뺄셈 연산을 수행함
(function template) |