std::chrono...e_zone_link)(3)

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

πŸ’… NAME πŸ’…

Okay so this page is the std::chrono...e_zone_link)(3) one, from the C++ Standard Libary manual β€” yes bestie, that's the exact spelling from the header 🫢.

  • std::chrono::operator==,(std::chrono::time_zone_link) β€” std::chrono::operator==,(std::chrono::time_zone_link)

That comma situation in the name? It's literally just vibing there. Not me questioning the naming choices πŸ’€.


✨ Synopsis ✨

Both overloads live in the header <chrono>, and both are (since C++20) β€” iconic C++20 behavior only πŸ‘‘:

Defined in header <chrono>
bool operator==( const std::chrono::time_zone_link& x,
(1) (since C++20)
                     const std::chrono::time_zone_link& y ) noexcept;
std::strong_ordering operator<=>( const
std::chrono::time_zone_link& x,
(2) (since C++20)
                                          const
std::chrono::time_zone_link& y ) noexcept;

So what's the tea? It compares the two time_zone_link values x and y by name β€” that's the whole comparison vibe, no cap πŸ’–.

The <, <=, >, >=, and != operators are synthesized from operator<=> and operator== respectively. The spaceship operator is carrying the whole friend group, honestly πŸš€.

Both signatures are marked noexcept in the synopsis. Keep that detail, bestie β€” it's right there in the code 🫢.

πŸŽ€ Return value πŸŽ€

  1. x.name() == y.name()
  2. x.name() <=> y.name()

Like, that's it. Name-based equality for number 1, name-based spaceship comparison for number 2. Clean, simple, C++20-coded ✨.


That's the whole page, bestie πŸ’– β€” source: http://cppreference.com, version/date: 2024.06.10 πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from