std::money_put<CharT,OutputIt>::~money_put
來自 cppreference.com
定義於標頭檔案 <locale> |
||
protected: ~money_put(); |
||
銷燬一個 std::money_put facet。此解構函式是受保護和虛的(因為基類解構函式是虛的)。std::money_put 型別的物件,像大多數 facet 一樣,只能在實現此 facet 的最後一個 std::locale 物件超出作用域時銷燬,或者如果使用者定義的類繼承自 std::money_put 並實現了一個公共解構函式。
[編輯] 示例
執行此程式碼
#include <iostream> #include <locale> struct Destructible_money_put : public std::money_put<wchar_t> { Destructible_money_put(std::size_t refs = 0) : money_put(refs) {} // note: the implicit destructor is public }; int main() { Destructible_money_put dc; // std::money_put<wchar_t> c; // compile error: protected destructor }