名前空間
変種
操作

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

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

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

[編集]

#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) {}
    // note: the implicit destructor is public
};
 
int main()
{
    Destructible_time_put dc;
    // std::time_put<wchar_t> c; // compile error: protected destructor
}
English 日本語 中文(简体) 中文(繁體)