std::basic_iostream::basic_iostream
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> explicit basic_iostream( std::basic_streambuf<CharT,Traits>* sb ); |
(1) | |
basic_iostream( const basic_iostream& other ) = delete; |
(2) | (desde C++11) |
protected: basic_iostream( basic_iostream&& other ); |
(3) | (desde C++11) |
Constrói novo objeto de fluxo.
Original:
Constructs new stream object.
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.
1)
Inicializa com
sb streambuf. As classes base são inicializados como basic_istream<CharT,Traits>(sb) e basic_ostream<CharT,Traits>(sb). Após a chamada rdbuf() == sb e gcount() == 0.Original:
Initializes with streambuf
sb. The base classes are initialized as basic_istream<CharT,Traits>(sb) and basic_ostream<CharT,Traits>(sb). After the call rdbuf() == sb and gcount() == 0.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.
2)
Construção de cópia não é permitido.
Original:
Copy construction is not allowed.
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.
3)
Mova construtor: move-constrói a classe base primeiro
basic_istream como basic_istream<CharT,Traits>(std::move(rhs));, que por sua vez move-constrói e inicializa o std::basic_ios base virtual. A inicialização da outra base, basic_ostream, é definida pela implementação (por exemplo, um construtor padrão protegido pode ser adicionado ao std::basic_ostream, que não faz nada) porque mover-construção não pode usar rhs duas vezes. Esse construtor movimento é protegido: ele é chamado pelos construtores movimento das classes de fluxo derivados std::basic_fstream e std::basic_stringstream antes de mover-construir e associar o buffer de fluxo.Original:
Move constructor: move-constructs the first base class
basic_istream as basic_istream<CharT,Traits>(std::move(rhs));, which in turn move-constructs and initializes the virtual base std::basic_ios. The initialization of the other base, basic_ostream, is implementation-defined (e.g., a protected default constructor may be added to std::basic_ostream, which does nothing) because move-construction cannot use rhs twice. This move constructor is protected: it is called by the move constructors of the derived stream classes std::basic_fstream and std::basic_stringstream before they move-construct and associate the stream buffer.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.
Parâmetros
| sb | - | streambuf para inicializar com
Original: streambuf to initialize with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| other | - | outro fluxo para inicializar com
Original: another stream to initialize with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Veja também
(C++11) |
mover-atribui outro basic_iostream Original: move-assigns another basic_iostream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) |