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