std::chrono...ekday_last)(3)
π« std::chrono::operator==(std::chrono::month_weekday_last) π«
okay so bestie, you're reading the C++ Standard Libary manual, section 3 β and the header title is fully std::chrono::operator==(std::chrono::month_weekday_last) - std::chrono::operator==(std::chrono::month_weekday_last). yes, it said it twice. we love a doubled title moment, no cap π
β¨
πΈ NAME πΈ
std::chrono::operator==(std::chrono::month_weekday_last) β aka std::chrono::operator==(std::chrono::month_weekday_last) (again, same name, same energy, we're not confused, it's just like that π«Ά).
β¨ Synopsis β¨
okay so here's the whole signature situation, and it's giving "defined in header <chrono>" realness:
Defined in header <chrono>
constexpr bool operator==( const std::chrono::month_weekday_last& x,
const std::chrono::month_weekday_last& y )
(since C++20)
noexcept;
This cutie compares the two month_weekday_last values x and y. and the != operator is synthesized from operator== β yes, it gets != for free, slay π
π Return value π
it returns exactly this, bestie:
x.month() == y.month() && x.weekday_last() == y.weekday_last()
π Example π
here's the example, copied exactly because we do not mess with code (code is sacred, fr fr):
// Run this code
#include <chrono>
int main()
{
constexpr std::chrono::month_weekday_last mwdl1
{
std::chrono::March/std::chrono::Friday[std::chrono::last]
};
constexpr std::chrono::month_weekday_last mwdl2
{
std::chrono::March, std::chrono::Friday[std::chrono::last]
};
static_assert(mwdl1 == mwdl2);
}
and that's the whole page, bestie! source/version is http://cppreference.com and the date is 2024.06.10 β bye, love you, stay constexpr π§πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms