std::chrono:: operator== (std::chrono::year_month_weekday_last)
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Nonmember functions | ||||
|
operator==
|
||||
| Helper classes | ||||
|
헤더 파일에 정의됨
<chrono>
|
||
|
constexpr
bool
operator
==
(
const
std::
chrono
::
year_month_weekday_last
&
x,
const std:: chrono :: year_month_weekday_last & y ) noexcept ; |
(C++20 이후) | |
두
year_month_weekday_last
값
x
와
y
를 비교합니다.
!=
연산자는
합성된
operator==
로부터 생성됩니다.
반환값
x. year ( ) == y. year ( ) && x. month ( ) == y. month ( ) && x. weekday ( ) == y. weekday ( )
예제
#include <chrono> #include <iostream> using namespace std::chrono; int main() { constexpr auto ymwdl1{Tuesday[last]/11/2021}; auto ymwdl2 = Tuesday[last]/11/2020; ymwdl2 += months(12); std::cout << std::boolalpha << (ymwdl1 == ymwdl2) << '\n'; }
출력:
true