This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Large file iostreams


Pétur Runólfsson wrote:

I wrote:

I came up with this list last night (this includes already reported
defects):


While trying to come up with a conforming streamoff and fpos<> I
found some more:

27.4.3.1 p2: The initial value of state() is not specified.

That's not necessarily a defect, is it? The default ctor is unspecified, so if stateT is a POD, the initial value of a default-constructed fpos object is also unspecified. There isn't much one can do with such an object, anyway (just like there isn't much one can do with any other uninitialized POD).


27.4.3.2 p1: The sentence "Operations specified in Table 88 are permitted." is ambiguous. It's not clear if this means "Users are permitted to use the operations in table 88" or "Implementations are permitted to provide the operations in table 88".

It could probably be worded better but the intent is clear from the note below the table:

    [Note: Every implementation is required to supply overloaded
    operators on fpos objects to satisfy the requirements of 27.4.3.2.
    It is unspecified whether these operators are members of fpos,
    global operators, or provided in some other way. --end note]


27.4.3.2: The operations q = p + o, p += o, q = p - o, p -= o, o = p - q are specified on objects of type fpos and streamoff. Objects of type const fpos and const streamoff should also be allowed on the right hand side.

What about volatile? Or const volatile? ;-)

27.4.3.2: The return value of state() on the objects returned by q = p + o, p += o, q = p - o and p -= o is not specified.

But what should the value be? It's perfectly fine to increment a position into a stream operating on a subsequence encoded in a fixed-width encoding but the effects are undefined otherwise. Since the effects don't depend on the value of fpos but on the subsequence I don't see how they could be specified here.

Martin



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]