std::time_put<CharT,OutputIt>::~time_put
提供: cppreference.com
<tbody>
</tbody>
| ヘッダ <locale> で定義
|
||
protected: ~time_put(); |
||
std::time_put ファセットを破棄します。 このデストラクタは protected かつ virtual (基底クラスのデストラクタが virtual であるため) です。 std::time_put 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装する最後の std::locale オブジェクトがスコープ外に出たとき、またはユーザ定義クラスが std::time_put から派生し public なデストラクタを実装する場合にのみ、破棄できます。
例
Run this code
#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
}