名前空間
変種
操作

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

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

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

[編集]

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