[iostreams.requirements] (original) (raw)

31 Input/output library [input.output]

31.2.1 Imbue limitations [iostream.limits.imbue]

No function described in [input.output] except forios_base​::​imbueand basic_filebuf​::​pubimbuecauses any instance ofbasic_ios​::​imbueorbasic_streambuf​::​imbueto be called.

If any user function called from a function declared in [input.output] or as an overriding virtual function of any class declared in [input.output]callsimbue, the behavior is undefined.

31.2.2 Types [stream.types]

using streamoff = _implementation-defined_;

The type streamoff is a synonym for one of the signed basic integral types of sufficient size to represent the maximum possible file size for the operating system.256

using streamsize = _implementation-defined_;

The typestreamsizeis a synonym for one of the signed basic integral types.

It is used to represent the number of characters transferred in an I/O operation, or the size of I/O buffers.257

31.2.3 Positioning type limitations [iostreams.limits.pos]

The classes of [input.output] with template argumentscharTandtraitsbehave as described iftraits​::​pos_typeandtraits​::​off_typearestreamposandstreamoffrespectively.

Except as noted explicitly below, their behavior whentraits​::​pos_typeandtraits​::​off_typeare other types isimplementation-defined.

[Note 1:

For each of the specializations of char_traits defined in[char.traits.specializations],state_type denotes mbstate_t,pos_type denotes fpos<mbstate_t>, and off_type denotes streamoff.

— _end note_]

In the classes of [input.output], a template parameter with namecharT represents a member of the set of types containing char, wchar_t, and any other implementation-defined character container types ([defns.character.container]) that meet the requirements for a character on which any of the iostream components can be instantiated.

31.2.4 Thread safety [iostreams.threadsafety]

If one thread makes a library call a that writes a value to a stream and, as a result, another thread reads this value from the stream through a library call b such that this does not result in a data race, then_a_'s write synchronizes with_b_'s read.