cpp/chrono/nonexistent local time

Defines a type of object to be thrown as exception to report that an attempt was made to convert a nonexistent std to a std without specifying a std (such as or ).

This exception is thrown by std and functions that call it (such as the constructors of std that take a std).

Member functions
{{member | {{small|std::chrono::nonexistent_local_time::}}nonexistent_local_time | 2= {{dcl begin}} {{dcl|num=1|since=c++20| template< class Duration > nonexistent_local_time( const std::chrono::local_time& tp,                       const std::chrono::local_info& i ); }} {{dcl|num=2|since=c++20| nonexistent_local_time( const nonexistent_local_time& other ) noexcept; }} {{dcl end}} Constructs the exception object.

@1@ The explanatory string returned by {{tt|what}} is equivalent to that produced by {{tt|os.str}} after the following code:

{{source| std::ostringstream os; os << tp << " is in a gap between\n" << std::chrono::local_seconds(i.first.end.time_since_epoch) + i.first.offset << ' ' << i.first.abbrev << " and\n" << std::chrono::local_seconds(i.second.begin.time_since_epoch) + i.second.offset << ' ' << i.second.abbrev << " which are both equivalent to\n" << i.first.end << " UTC"; }} @@ The behavior is undefined if {{c|1=i.result != std::chrono::local_info::nonexistent}}.

@2@ Copy constructor. If {{tt|*this}} and {{tt|other}} both have dynamic type {{tt|std::chrono::nonexistent_local_time}} then {{c|1=std::strcmp(what, other.what) == 0}}.

Exceptions
May throw std