std::chrono::choose

From cppreference.com
< cpp‎ | chrono
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
 
Defined in header <chrono>
enum class choose {

    earliest,
    latest

};
(since C++20)

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.

See also

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