std::num_get<CharT,InputIt>::~num_get
提供: cppreference.com
ヘッダ <locale> で定義
|
||
protected: ~num_get(); |
||
std::num_get ファセットを破棄します。 このデストラクタは protected かつ virtual (基底クラスのデストラクタが virtual であるため) です。 std::num_get 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装する最後の std::locale オブジェクトがスコープ外に出たとき、またはユーザ定義クラスが std::num_get から派生し public なデストラクタを実装する場合にのみ、破棄できます。
[編集] 例
Run this code
#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 }