[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#187599: acknowledged by developer (Not a bug: Cannot subtract from streampos)



There exists a conversion from streampos to streamoff, so that the
expression can be interpreted as

=09(streamoff)pos - 1

or

=09pos.operator-(1)

In both cases conversions are used (from streampos to streamoff, and
from int to long). The ambiguouity can be resolved be writing

=09pos - 1L

Probably the best way of writing it would then be "pos - (streamoff)1", yielding a streampos. I didn't know that streamoff existed, and its existence does explain the problem I was having. Thank you very much!

Regards,
Bart




Reply to: