std::codecvt::~codecvt
De cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Déclaré dans l'en-tête <locale> | ||
protected: ~codecvt(); | ||
Détruit une facette std::codecvt. Ce destructeur est protégée et virtuelle (en raison de destructeur classe de base être virtuel). Un objet de std::codecvt type, comme la plupart des aspects, ne peut être détruit lorsque l'objet std::locale dernière qui implémente cette facette est hors de portée ou si une classe définie par l'utilisateur est dérivé de std::codecvt et met en œuvre un destructeur public .
Original:
Destructs a std::codecvt facet. This destructor is protected and virtual (due to classe de base destructor being virtual). An object of type std::codecvt, like most facets, can only be destroyed when the last std::locale object that implements this facet goes out of scope or if a user-defined class is derived from std::codecvt and implements a public destructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier]Exemple
#include <iostream>#include <locale>struct Destructible_codecvt :publicstd::codecvt<wchar_t>{ Destructible_codecvt(std::size_t refs =0): codecvt(refs){} ~Destructible_codecvt(){};// public dtor};int main(){ Destructible_codecvt dc;// std::codecvt<wchar_t> c; // compile error: protected destructor}