std::collate<CharT>:: ~collate
From cppreference.net
C++
Text processing library
| Localization library | |||||||||||||||||||||||||
| Regular expressions library (C++11) | |||||||||||||||||||||||||
| Formatting library (C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Localization library
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::collate
| Member functions | ||||
|
collate::~collate
|
||||
|
ヘッダーで定義
<locale>
|
||
|
protected
:
~collate
(
)
;
|
||
std:: collate ファセットを破棄します。このデストラクタは protected かつ仮想関数です( 基底クラス のデストラクタが仮想関数であるため)。 std:: collate 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装する最後の std::locale オブジェクトがスコープ外になる時、またはユーザー定義クラスが std:: collate から派生して public デストラクタを実装している場合にのみ破棄できます。
例
このコードを実行
#include <iostream> #include <locale> struct Destructible_collate : public std::collate<wchar_t> { Destructible_collate(std::size_t refs = 0) : collate(refs) {} // 注: 暗黙のデストラクタはpublic }; int main() { Destructible_collate dc; // std::collate<wchar_t> c; // コンパイルエラー: protected destructor }