名前空間
変種
操作

std::wbuffer_convert::~wbuffer_convert

提供: cppreference.com

 
 
ローカライゼーションライブラリ
ロケールおよびファセット
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
文字分類
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
変換
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリの基底クラスです
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリ
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ロケール固有のファセット
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コー​​ド変換ファセット
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
Cロケール
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::wbuffer_convert
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wbuffer_convert::wbuffer_convert
wbuffer_convert::~wbuffer_convert
wbuffer_convert::rdbuf
wbuffer_convert::state
 
Defined in header <locale>
~wbuffer_convert();
wbuffer_convertオブジェクトと削除には、変換ファセットへのポインタを破棄.
Original:
Destroys the wbuffer_convert object and deletes the pointer to the conversion facet.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] ノート

一部の実装では、保護されたデストラクタを持つロケール固有のファセットを含む、任意の面を削除することができます。他の実装では、ファセットが<codecvt>からロケールに依存しない、ファセットに類似公共デストラクタを持ってする必要が.
Original:
Some implementations are able to delete any facet, including the locale-specific facets with protected destructors. Other implementations require the facet to have a public destructor, similar to the the locale-independent facets from <codecvt>.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]

#include <locale>
#include <utility>
#include <iostream>
#include <codecvt>
 
// utility wrapper to adapt locale-bound facets for wstring/wbuffer convert
template<class Facet>
struct deletable_facet : Facet
{
    template<class ...Args>
    deletable_facet(Args&& ...args) : Facet(std::forward<Args>(args)...) {}
    ~deletable_facet() {}
};
 
int main()
{
    // GB18030 / UCS4 conversion, using locale-based facet directly
    // typedef std::codecvt_byname<char32_t, char, std::mbstate_t> gbfacet_t;
    // Compiler error: "calling a protected destructor of codecvt_byname<> in ~wbuffer_convert"
    // std::wbuffer_convert<gbfacet_t, char32_t> gbto32(std::cout.rdbuf(),
    //                                        new gbfacet_t("zh_CN.gb18030"));
 
    // GB18030 / UCS4 conversion facet using a facet with public destructor
    typedef deletable_facet<std::codecvt_byname<char32_t, char, std::mbstate_t>> gbfacet_t;
    std::wbuffer_convert<gbfacet_t, char32_t> gbto32(std::cout.rdbuf(),
                                           new gbfacet_t("zh_CN.gb18030"));
} // destructor called here


[編集] も参照してください

wstring_convertとその変換ファセットを破棄します
Original:
destructs the wstring_convert and its conversion facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::wstring_convert) [edit]