std::time_put<CharT,OutputIt>:~time_put
From cppreference.com
| ヘッダー <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 }