名稱空間
變體
操作

std::num_put<CharT,OutputIt>::~num_put

來自 cppreference.com
< cpp‎ | 本地化‎ | num put
 
 
 
 
 
定義於標頭檔案 <locale>
protected: ~num_put();

銷燬 std::num_put facet。此解構函式是受保護和虛擬的(因為基類解構函式是虛擬的)。std::num_put 型別的物件,像大多數 facet 一樣,只能在實現此 facet 的最後一個 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
}