std::time_put<CharT,OutputIt>::~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
}
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/locale/time_put/~time_put