std::money_get<CharT,InputIt>::~money_get
來自 cppreference.com
定義於標頭檔案 <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 }