class nonexistent_local_time;
(since C++20)Defines a type of object to be thrown as exception to report that an attempt was made to convert a nonexistent std::chrono::local_time to a std::chrono::sys_time without specifying a std::chrono::choose (such as choose::earliest
or choose::latest
).
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 take a std::chrono::local_time).
Inheritance diagram
[edit] Member functions constructs the exception objectnonexistent_local_time( const nonexistent_local_time& other ) noexcept;
(2) (since C++20)Constructs the exception object.
1) The explanatory string returned by what()
is equivalent to that produced by os.str()
after the following code:
The behavior is undefined if i.result != std::chrono::local_info::nonexistent.
2)Copy constructor. If
*thisand
otherboth have dynamic type
std::chrono::nonexistent_local_time
then
std::strcmp(what(), other.what()) == 0.
Parameters tp - the time point for which conversion was attempted i - a std::chrono::local_info describing the result of the conversion attempt other - anothernonexistent_local_time
to copy Exceptions
May throw std::bad_alloc
NotesBecause 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.
nonexistent_locale_time& operator=( const nonexistent_locale_time& other ) noexcept;
(since C++20)Assigns the contents with those of other. If *this and other both have dynamic type std::chrono::nonexistent_locale_time
then std::strcmp(what(), other.what()) == 0 after assignment.
*this
std::chrono::nonexistent_locale_time::whatvirtual const char* what() const noexcept;
(since C++20)Returns the explanatory string.
Return valuePointer to an implementation-defined null-terminated string with explanatory information. The string is suitable for conversion and display as a std::wstring. The pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed, or until a non-const member function (e.g. copy assignment operator) on the exception object is called.
NotesImplementations are allowed but not required to override what()
.
std::exception
) [edit] returns an explanatory string
std::exception
) [edit] [edit] See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4