Talk:cpp/io/fpos

EqualityComparable seems to be missing for the State template parameter
From the description: All specializations of fpos meet the DefaultConstructible, CopyConstructible, CopyAssignable, Destructible, and EqualityComparable requirements.

But the State template parameter does not include EqualityComparable. This seems to be an omission correct?

ticotico (talk) 09:05, 9 October 2022 (PDT)


 * It's correct by the standard at least --Ybab321 (talk) 10:42, 9 October 2022 (PDT)

Explicit conversion from (possibly const) fpos to std::streamoff. The result is the stored offset.
It looks like this conversion is not explicit. In MSVC:

https://learn.microsoft.com/en-us/cpp/standard-library/fpos-class?view=msvc-170#op_streamoff

The same is in clang and gcc: there is no explicit conversion operator to std::streamoff.

128.69.57.118 16:43, 15 March 2023 (PDT)


 * The requirement is that an explicit conversion from std to std is supported, implicit conversion isn't disallowed AFAIK, so vendors and conforming here --Ybab321 (talk) 03:28, 16 March 2023 (PDT)