std::chrono:: operator== (std::chrono::weekday)
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Nonmember functions | ||||
|
operator==
|
||||
| Helper classes | ||||
|
(C++26)
|
|
헤더 파일에 정의됨
<chrono>
|
||
|
constexpr
bool
operator
==
(
const
std::
chrono
::
weekday
&
x,
const std:: chrono :: weekday & y ) noexcept ; |
(C++20 이후) | |
두 std::chrono::weekday x 와 y 를 비교합니다.
!=
연산자는
합성된
operator==
로부터 생성됩니다.
반환값
x. c_encoding ( ) == y. c_encoding ( )
참고 사항
weekday
는
<
,
<=
,
>
,
>=
연산자를 지원하지 않습니다. 이는 어떤 요일이 주의 첫 번째 날인지에 대해 보편적인 합의가 없기 때문입니다.
예제
#include <chrono> int main() { using namespace std::literals; constexpr std::chrono::weekday wd1{2}; constexpr std::chrono::weekday wd2{std::chrono::Friday}; static_assert(wd1 != wd2); // 1313년 1월 13일은 금요일입니다 constexpr std::chrono::weekday wd3{1313y/1/13d}; static_assert(wd2 == wd3); }