public member function
<ios> <iostream>
std::basic_ios::copyfmtbasic_ios& copyfmt (const basic_ios& rhs);
Copy formatting information
Copies the values of all the internal members of rhs (except the state flags and the associated stream buffer) to the corresponding members of*this
.
After the call, the following member functions return the same for rhs and *this
:
* Each stream object keeps its own copy of the
internal extensible array(
iword,
pword): Its contents are copied, not just a pointer to it.
* Each stream object keeps its own copy of the
internal extensible array(
iword,
pword): Its contents are copied, not just a pointer to it.
If any of the pointer values to be copied points to objects stored outside rhs and those objects are destroyed when rhs is destroyed, *this
stores instead pointers to newly constructed copies of these objects.
(*fn)(erase_event,*this,index)
. Then, at the end, right before the exceptions mask is copied, the function calls each registered callback fn wirh (*fn)(copyfmt_event,*this,index)
(this second round can be used, for example, to access and modify the copied internal extensible array).
*this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// copying formatting information
#include <iostream> // std::cout
#include <fstream> // std::ofstream
int main () {
std::ofstream filestr;
filestr.open ("test.txt");
std::cout.fill ('*');
std::cout.width (10);
filestr.copyfmt (std::cout);
std::cout << 40;
filestr << 40;
return 0;
}
"test.txt"
:
*this
), and accesses rhs.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4