名前空間
変種
操作

std::numpunct<CharT>::~numpunct

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

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

[編集]

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