std::time_get<CharT,InputIt>:: ~time_get
From cppreference.net
C++
Text processing library
| Localization library | |||||||||||||||||||||||||
| Regular expressions library (C++11) | |||||||||||||||||||||||||
| Formatting library (C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Localization library
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::time_get
| Member functions | ||||
|
time_get::~time_get
|
||||
|
定义于头文件
<locale>
|
||
|
protected
:
~time_get
(
)
;
|
||
析构 std:: time_get 刻面。此析构函数为受保护且虚函数(因 基类 析构函数为虚函数)。类型为 std:: time_get 的对象与大多数刻面类似,仅当最后一个实现该刻面的 std::locale 对象离开作用域时,或用户自定义类继承自 std:: time_get 并实现了公共析构函数时方可被销毁。
示例
运行此代码
#include <iostream> #include <locale> struct Destructible_time_get : public std::time_get<wchar_t> { Destructible_time_get(std::size_t refs = 0) : time_get(refs) {} // 注意:隐式析构函数是公开的 }; int main() { Destructible_time_get dc; // std::time_get<wchar_t> c; // 编译错误:受保护的析构函数 }