std::chrono...ekday_last)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, this is the page for std::chrono::operator==(std::chrono::weekday_last) β€” and the manual name is C++ Standard Libary (yes, exactly like that, no cap). The NAME line is literally std::chrono::operator==(std::chrono::weekday_last) β€” std::chrono::operator==(std::chrono::weekday_last). Repetition? Iconic. πŸ’…


✨ Synopsis ✨

Defined in header <chrono>:

constexpr bool operator==( const std::chrono::weekday_last& x,
                           const std::chrono::weekday_last& y )
  • (since C++20)
  • noexcept;

This compares the two weekday_last values x and y. 🫢

The != operator is synthesized from operator==.


🫢 Return value 🫢

It returns x.weekday() == y.weekday().


🌈 Example 🌈

Run this code, bestie:

// Run this code

#include <chrono>
#include <iostream>

int main()
{
    constexpr auto wdl1{std::chrono::Tuesday[std::chrono::last]};
    constexpr std::chrono::weekday_last wdl2{std::chrono::weekday(2)};
    std::cout << std::boolalpha
              << (wdl1 == wdl2) << ' '
              << (wdl1 == std::chrono::Wednesday[std::chrono::last]) <<
       '\n';
}

πŸ“ Output πŸ“

true false

mwah πŸ’‹ β€” source/version: http://cppreference.com, dated 2024.06.10, filed under std::chrono...ekday_last)(3). That’s the cute little footer, preserved and slaying. πŸŽ€

πŸ“¦ where this page comes from