std::chrono::choose(3)

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

okay so this is the C++ Standard Libary page for std::chrono::choose(3), and honestly it's a tiny enum with main-character energy πŸ‘‘

🌟 NAME 🌟

std::chrono::choose β€” std::chrono::choose. That's it, that's the name, periodt πŸ’…

πŸ¦‹ Synopsis πŸ¦‹

Bestie, it's defined in header <chrono> β€” here's the exact shape, no edits:

Defined in header <chrono>
enum class choose {

    earliest,               (since C++20)
    latest

};

The scoped enumeration choose can be passed to certain member functions of std::chrono::time_zone and std::chrono::zoned_time to control how ambiguous or nonexistent local times should be resolved. Passing choose::earliest causes the earlier time point to be returned, while passing choose::latest causes the later time point to be returned. (For nonexistent local times, these two time points are identical.)

If a choose is not passed and an ambiguous or nonexistent local time is encountered, a std::chrono::ambiguous_local_time or std::chrono::nonexistent_local_time exception (as applicable) will be thrown. So yeah, pick a side or catch the drama 😭

πŸ”₯ See also πŸ”₯

  • constructor β€” constructs a zoned_time (public member function of std::chrono::zoned_time<Duration,TimeZonePtr>)
  • to_sys β€” converts a local_time in this time zone to a sys_time (public member function of std::chrono::time_zone)

mwah πŸ’‹ this has been std::chrono::choose(3) from http://cppreference.com, dated 2024.06.10 β€” stan your fave Unix bestie πŸ’…

πŸ“¦ where this page comes from