[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/io/basic_stringbuf/operator%3D [Back]  [Original]

std::basic_stringbuf::operator= cppreference.com
cppreference.com
Espaces de noms
Variantes

std::basic_stringbuf::operator=

De cppreference.com

<metanoindex/>

 
 
D'entre / sortie de bibliothque
I / O manipulateurs
C-style I / O
Tampons
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf (obsolte)
Cours d'eau
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstractions
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Fichier E / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Chane I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Tableau I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream (obsolte)
ostrstream (obsolte)
strstream (obsolte)
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Interface catgorie d'erreur
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category (C++11)
io_errc (C++11)
 
std::basic_stringbuf
Fonctions membres publiques
Original:
Public member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_stringbuf::basic_stringbuf
basic_stringbuf::operator= (C++11)
basic_stringbuf::swap (C++11)
basic_stringbuf::str
Protg fonctions membres
Original:
Protected member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_stringbuf::underflow
basic_stringbuf::pbackfail
basic_stringbuf::overflow
basic_stringbuf::setbuf
basic_stringbuf::seekoff
basic_stringbuf::seekpos
Tiers fonctions
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap(std::basic_stringbuf) (C++11)
 
<tbody> </tbody>
std::basic_stringbuf& operator=( std::basic_stringbuf&& rhs );
(depuis C++11)
std::basic_stringbuf& operator=( const std::basic_stringbuf& rhs ) = delete;
1)
Dplacez oprateur d'affectation: Dplace le contenu d'rhs en *this. Aprs le dmnagement, lhs a la chane associe, le mode d'ouverture, la localisation, et tout autre Etat anciennement dtenu par rhs. Les six pointeurs de std::basic_streambuf dans lhs sont garantis d'tre diffrent des pointeurs correspondants dans la rhs dplac-de moins que nulle .
Original:
Move assignment operator: Moves the contents of rhs into *this. After the move, lhs has the associated string, the open mode, the locale, and all other state formerly held by rhs. The six pointers of std::basic_streambuf in lhs are guaranteed to be different from the corresponding pointers in the moved-from rhs unless null.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
L'oprateur d'affectation de copie est supprime; basic_stringbuf n'est pas CopyAssignable .
Original:
The copy assignment operator is deleted; basic_stringbuf is not CopyAssignable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Paramtres

rhs -
une autre basic_stringbuf qui sera transfr partir
Original:
another basic_stringbuf that will be moved from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Retourne la valeur

*this

Exemple

#include <sstream>
#include <string>
#include <iostream>

int main()
{

    std::istringstream one("one");
    std::ostringstream two("two");

    std::cout << "Before move, one = \"" << one.str() << '"'
              << " two = \"" << two.str() << "\"\n";

    *one.rdbuf() = std::move(*two.rdbuf());

    std::cout << "Before move, one = \"" << one.str() << '"'
              << " two = \"" << two.str() << "\"\n";
}

Rsultat :

Before move, one = "one" two = "two"
Before move, one = "two" two = ""

Voir aussi

construit un objet basic_stringbuf
Original:
constructs a basic_stringbuf object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique) [edit]

Web Proxy Viewer  |  New URL  |  Original Page