名前空間
変種
操作

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

From cppreference.com
< cpp‎ | locale‎ | money get
 
 
 
 
 
ヘッダー <locale> で定義
protected: ~money_get();

money_getファセットを破棄します。このデストラクタは保護されており、仮想(基底クラスのデストラクタが仮想であるため)です。std::money_get型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装している最後の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
}
English 日本語 中文(简体) 中文(繁體)