std::messages::~messages
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <locale>
|
||
protected: ~messages(); |
||
Distrugge un aspetto std::messages. Questo distruttore è protetta e virtuale (a causa di distruttore della classe base essere virtuale). Un oggetto di tipo std::messages, come la maggior parte sfaccettature, possono essere distrutti solo quando l'oggetto std::locale ultimo che implementa questo aspetto va fuori di portata, o se una classe definita dall'utente è derivato da std::messages e implementa un distruttore pubblico.
Original:
Destructs a std::messages facet. This destructor is protected and virtual (due to della classe base destructor being virtual). An object of type std::messages, 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::messages 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.
[modifica] Esempio
#include <iostream> #include <locale> struct Destructible_messages : public std::messages<wchar_t> { Destructible_messages(std::size_t refs = 0) : messages(refs) {} ~Destructible_messages() {}; // public dtor }; int main() { Destructible_messages dc; // std::messages<wchar_t> c; // compile error: protected destructor }