名前空間
変種
操作

std::num_put<CharT,OutputIt>::~num_put

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

std::num_put ファセットを破棄します。このデストラクタは protected および virtual です(基底クラスのデストラクタが virtual であるため)。std::num_put 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装する最後の std::locale オブジェクトがスコープから外れたとき、または std::num_put から派生したユーザー定義クラスが public なデストラクタを実装した場合にのみ破棄できます。

[編集]

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