std::num_put<CharT,OutputIt>::~num_put
Определено в заголовке <locale> | ||
|---|---|---|
protected: ~num_put(); |
Уничтожает фасет std::num_put. Этот деструктор защищённый и виртуальный (поскольку деструктор базового класса является виртуальным). Объект типа std::num_put, как и большинство фасетов, может быть уничтожен только тогда, когда последний объект std::locale, реализующий этот фасет, выходит из области видимости, либо если пользовательский класс наследуется от std::num_put и реализует открытый деструктор.
Пример
#include <iostream>
#include <locale>
struct Destructible_num_put : public std::num_put<wchar_t>
{
Destructible_num_put(std::size_t refs = 0) : num_put(refs) {}
// note: the implicit destructor is public
};
int main()
{
Destructible_num_put dc;
// std::num_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/num_put/~num_put