名前空間
変種
操作

std::collate<CharT>::~collate

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

std::collate ファセットを破棄します。このデストラクタは保護されており、仮想です(基底クラスのデストラクタが仮想であるため)。std::collate 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装している最後の std::locale オブジェクトがスコープを外れたとき、または std::collate から派生し、公開デストラクタを実装するユーザー定義クラスがある場合にのみ破棄できます。

[編集]

#include <iostream>
#include <locale>
 
struct Destructible_collate : public std::collate<wchar_t>
{
    Destructible_collate(std::size_t refs = 0) : collate(refs) {}
    // note: the implicit destructor is public
};
 
int main()
{
    Destructible_collate dc;
    // std::collate<wchar_t> c; // compile error: protected destructor
}
English 日本語 中文(简体) 中文(繁體)