Variables | |
| Internal::add_fill_s | tag::add_fill |
| Internal::like_print_s | tag::print |
| Internal::no_space_s | tag::no_space |
The first is a set of additional modifiers for use with the standard << operator. See add_fill , no_space and print for more details.
The second set introduces a new syntax using the comma operator for streams. It creates simple statements similar to print in Python or other languages. The stream object and any values to be printed are written as a comma separated list. Between the values printed, the stream's fill character is output to delimit values. Some examples:
cout, 12, \"hello\", 13, endl; cout, setfill('|'); cout, 12, 13, 14, endl;
12 hello 13 12|13|14
|
|
Ostream modifier which puts spaces between elements using the fill character. endl is treated specially, so a space is not put after an endl cout << add_fill << 1 << 2 << 3 << endl << 4<< 5 << endl; 1 2 3 5 4 |
|
|
An ostream modifier to use with print and add_fill which prevents a space being added before the next element. cout << @ref add_fill << 0 << 1 << no_space << 2 << 3 << endl; 0 12 3 |
|
|
Ostream modifier similar to add_fill, except that an endl is added at the end automatically cout << print << 1 << 2 << 3;
cout << "hello" << endl;
1 2 3 hello |
1.3.9.1