Defined in header
Defines a type of object to be thrown as exception to report that an attempt was made to convert a ambiguous std::chrono::local_time to a std::chrono::sys_time without specifying a std::chrono::choose (such as
This exception is thrown by std::chrono::time_zone::to_sys and functions that call it (such as the constructors of std::chrono::zoned_time that takes a std::chrono::local_time).
 Member functions
| constructs the exception object |
(public member function)
Constructs the exception object. The explanatory string returned by
what() is equivalent to that produced by
os.str() after the following code:
std::ostringstream os; os << tp << " is ambiguous. It could be\n" << tp << ' ' << i.first.abbrev << " == " << tp - i.first.offset << " UTC or\n" << tp << ' ' << i.second.abbrev << " == " << tp - i.second.offset << " UTC";
Because copying a standard library class derived from
std::exception is not permitted to throw exceptions, this message is typically stored internally as a separately-allocated reference-counted string.
The behavior is undefined if i.result != std::chrono::local_info::ambiguous.
|tp||-||the time point for which conversion was attempted|
|i||-||a std::chrono::local_info describing the result of the conversion attempt|
May throw std::bad_alloc