C++ Language/Std/FilesystemAccess/StreamedIo

An IOStreams stream can target a file.

Additional information about streaming to a file