|
|
|
|
|
by fbkr
1659 days ago
|
|
Disclaimer: I dislike iostreams and in our environment <iostream> is completely banned. However, in C++98, how else would you handle when you have an arbitrary number of things to print in a type-safe way? e.g. cout << myInt << ": " << something << " - " << otherthing << " - " << etc << '\n';
printf is not type-safe, nor supports user defined types. I'd rather not write 8 lines of functions calls for the same thing either.I think it made some sense C++98, though it is an awful API in 2021. |
|
Possible with preprocessor.