std::codecvt<InternT,ExternT,StateT>:: ~codecvt
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::codecvt
| Member functions | ||||
|
codecvt::~codecvt
|
||||
|
ヘッダーで定義
<locale>
|
||
|
protected
:
~codecvt
(
)
;
|
||
std:: codecvt ファセットを破棄します。このデストラクタは protected かつ仮想です( 基底クラス のデストラクタが仮想であるため)。 std:: codecvt 型のオブジェクトは、ほとんどのファセットと同様に、このファセットを実装する最後の std::locale オブジェクトがスコープ外になる時、またはユーザー定義クラスが std:: codecvt から派生して public デストラクタを実装している場合にのみ破棄できます。
例
このコードを実行
#include <iostream> #include <locale> struct Destructible_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> { Destructible_codecvt(std::size_t refs = 0) : codecvt(refs) {} // 注: 暗黙的なデストラクタはpublic }; int main() { Destructible_codecvt dc; // std::codecvt<wchar_t> c; // コンパイルエラー: protectedデストラクタ }