[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/chrono/nonexistent_local_time [Back]  [Original]

std::chrono::nonexistent_local_time cppreference.com
cppreference.com

std::chrono::nonexistent_local_time

cppreference.com
 
C++
(C++20)
(C++20)
(C++11)
(C++20)
/
(C++11)
(C++11)
(C++11)
(C++17)
 
 
(C++11)
(C++20)
(C++11)
(C++11)      
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)(C++20)
(C++20)

(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
/ chrono
(C++20)
C
 
<tbody> </tbody>
class nonexistent_local_time;
( C++20)

, , , std::chrono::local_time std::chrono::sys_time std::chrono::choose (, choose::earliest choose::latest).

std::chrono::time_zone::to_sys (, std::chrono::zoned_time, std::chrono::local_time).

-

()

(public -)
operator=

(public -)
what

(public -)

std::chrono::nonexistent_local_time::nonexistent_local_time

<tbody> </tbody>
template< class Duration > nonexistent_local_time( const std::chrono::local_time<Duration>& tp, const std::chrono::local_info& i );
(1) ( C++20)
nonexistent_local_time( const nonexistent_local_time& other ) noexcept;
(2) ( C++20)

.

1) , what(), , os.str() :
std::ostringstream os;
os << tp << "    \n"
   << std::chrono::local_seconds(i.first.end.time_since_epoch()) + i.first.offset 
   << ' ' << i.first.abbrev << " \n"
   << std::chrono::local_seconds(i.second.begin.time_since_epoch()) + i.second.offset
   << ' ' << i.second.abbrev
   << "   \n"
   << i.first.end << " UTC";
, i.result != std::chrono::local_info::nonexistent.
2) . *this other std::chrono::nonexistent_local_time, std::strcmp(what(), other.what()) == 0.

tp ,
i std::chrono::local_info,
other nonexistent_local_time

std::bad_alloc

, std::exception, , .

std::chrono::nonexistent_locale_time::operator=

<tbody> </tbody>
nonexistent_locale_time& operator=( const nonexistent_locale_time& other ) noexcept;
( C++20)

other. *this other std::chrono::nonexistent_locale_time, std::strcmp(what(), other.what()) == 0 .

other

*this

std::chrono::nonexistent_locale_time::what

<tbody> </tbody>
virtual const char* what() const noexcept;
( C++20)

.

()

. std::wstring. , , , , , - (, ) .

, what().

std::exception

-

[virtual]

(virtual public of std::exception -) []
[virtual]

(virtual public of std::exception -) []

, ,
() []

Web Proxy Viewer  |  New URL  |  Original Page