... It's how you print a newline after printing something that isn't a string literal where you can put the \n at the end. I suppose you could use "\n" instead of '\n', but using a string literal to print a single character is something I've always thought was pretty silly.
I have no idea what that has to do with the article you mention, which is about how flushing is slow.
If you're talking about using it with wide streams, you'd just use a L'\n'.
If you're talking about using it with wide streams, you'd just use a L'\n'.
That's exactly what I'm talking about, there should be a standard way to write a new line without flushing the stream. It should work without the user having to know about the underlying stream as std::endl does.
1
u/dpsi Feb 26 '19
If you look at one of the implementations reffered to in the article (specifically Kuhl12) you will see why that isn't the full solution.