名前空間
変種
操作

std::num_get<CharT,InputIt>::~num_get

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

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

[編集]

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