class type out_record_channel =An
out_record_channelcan be used to output files with record structure. This is purely abstract, as Unix does not support such files natively, so this kind of channel is usually mapped to a flat representation when stored in a real file, e.g. record boundaries become newline characters.
The record model is as follows: At the beginning of the channel,
output_eor, a new record can be potentially started.
However, the record counts only as existing when either at least
one byte is output, or the record is explicitly ended with a
This rule allows it to represent channels containing no records. There is an ambiguity at the end of the channel, however: It is possible that there are characters between the last EOR and the EOF. This could also be represented by printing another EOR just before EOF. The preferred representation is the latter.
This model correlates to the usual rules for line-structured
files, so think EOR = EOL.