std::collate::~collate
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. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <locale>
|
||
protected: ~collate(); |
||
Destrói uma faceta
std::collate. Esse destruidor é protegido e virtual (devido a classe base destruidor de ser virtual). Um objeto de std::collate tipo, como a maioria das facetas, só podem ser destruídos quando o objeto std::locale última que implementa esta faceta sai do escopo ou se uma classe definida pelo usuário é derivado std::collate e implementa um destruidor público.Original:
Destructs a
std::collate facet. This destructor is protected and virtual (due to classe base destructor being virtual). An object of type std::collate, 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::collate 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.
Exemplo
#include <iostream>
#include <locale>
struct Destructible_collate : public std::collate<wchar_t>
{
Destructible_collate(std::size_t refs = 0) : collate(refs) {}
~Destructible_collate() {}; // public dtor
};
int main()
{
Destructible_collate dc;
// std::collate<wchar_t> c; // compile error: protected destructor
}