std::chrono::choose(3)
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 achooseis not passed and an ambiguous or nonexistent local time is encountered, astd::chrono::ambiguous_local_timeorstd::chrono::nonexistent_local_timeexception (as applicable) will be thrown. So yeah, pick a side or catch the drama π
π₯ See also π₯
- constructor β constructs a
zoned_time(public member function ofstd::chrono::zoned_time<Duration,TimeZonePtr>) - to_sys β converts a
local_timein this time zone to asys_time(public member function ofstd::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
- 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