命名空间
变体
操作

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

来自 cppreference.cn
< cpp‎ | 本地化‎ | money get
 
 
 
 
 
定义于头文件 <locale>
protected: ~money_get();

销毁 std::money_get facet。此析构函数是受保护和虚的(因为基类析构函数是虚的)。类型为 std::money_get 的对象,像大多数 facet 一样,只能在最后一个实现此 facet 的 std::locale 对象超出作用域时或用户定义的类派生自 std::money_get 并实现公共析构函数时才能销毁。

[编辑] 示例

#include <iostream>
#include <locale>
 
struct Destructible_money_get : public std::money_get<wchar_t>
{
    Destructible_money_get(std::size_t refs = 0) : money_get(refs) {}
    // note: the implicit destructor is public
};
 
int main()
{
    Destructible_money_get dc;
    // std::money_get<wchar_t> c; // compile error: protected destructor
}