Namespaces
Variants

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

From cppreference.net
ヘッダーで定義 <locale>
protected : ~time_put ( ) ;

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

#include <iostream>
#include <locale>
struct Destructible_time_put : public std::time_put<wchar_t>
{
    Destructible_time_put(std::size_t refs = 0) : time_put(refs) {}
    // 注: 暗黙のデストラクタはpublic
};
int main()
{
    Destructible_time_put dc;
    // std::time_put<wchar_t> c; // コンパイルエラー: protectedデストラクタ
}