名前空間
変種
操作

std::ctype<CharT>::~ctype

From cppreference.com
< cpp‎ | locale‎ | ctype
 
 
 
 
 
ヘッダー <locale> で定義
protected: ~ctype();

std::ctype ファセットを破棄します。このデストラクタは保護されており、仮想です (基底クラスのデストラクタが仮想であるため)。 std::ctype 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装している最後の std::locale オブジェクトがスコープを外れたとき、またはユーザー定義クラスが std::ctype から派生し、公開デストラクタを実装している場合にのみ破棄できます。

[編集]

#include <iostream>
#include <locale>
 
struct Destructible_ctype : public std::ctype<wchar_t>
{
    Destructible_ctype(std::size_t refs = 0) : ctype(refs) {}
    // note: the implicit destructor is public
};
 
int main()
{
    Destructible_ctype dc;
    // std::ctype<wchar_t> c; // compile error: protected destructor
}
English 日本語 中文(简体) 中文(繁體)