Since C++11, file streams provide rvalue and move semantics. In fact, ostreams provide an output
operator, and istreams provide an input iterator that accepts an rvalue reference for the stream. The
effect is that you can now use temporarily created stream objects, and they behave as expected. For
example, you can write to a temporarily created file stream:13