std::ctype::~ctype

来自cppreference.com
< cpp‎ | locale‎ | ctype

定义于头文件 <locale>
protected: ~ctype();
自毁一个std::ctype方面。析构函数被保护和虚拟(由于基类析构函数是虚拟的)。 std::ctype类型的对象,最喜欢的方面,只能被摧毁,当最后std::locale对象,它实现这方面熄灭范围,或者如果一个用户定义的类派生自std::ctype和实现公共析构函数.
原文:
Destructs a std::ctype facet. This destructor is protected and virtual (due to 基类 destructor being virtual). An object of type std::ctype, like most facets, can only be destroyed when the last std::locale object that implements this facet goes out of scope or if a user-defined class is derived from std::ctype and implements a public destructor.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。

[编辑] 为例

#include <iostream>
#include <locale>
struct Destructible_ctype : public std::ctype<wchar_t>
{
    Destructible_ctype(std::size_t refs = 0) : ctype(refs) {}
    ~Destructible_ctype() {}; // public dtor
};
int main()
{
    Destructible_ctype dc;
    // std::ctype<wchar_t> c;  // compile error: protected destructor
}