Skip to content

Explicitly convert streampos to streamoff#2587

Merged
TylerMSFT merged 2 commits into
MicrosoftDocs:masterfrom
yecril71pl:patch-2
Nov 9, 2020
Merged

Explicitly convert streampos to streamoff#2587
TylerMSFT merged 2 commits into
MicrosoftDocs:masterfrom
yecril71pl:patch-2

Conversation

@yecril71pl

Copy link
Copy Markdown
Contributor
  1. Explicitly convert streampos to streamoff.
  2. Print '\n' instead of endl.

The expression (cout << y) works as described only if no shift operator of streampos into ostream is defined.  That operator may be defined by user code and the result may be different.
Explicitly convert streampos to streamoff.
@PRMerger14

Copy link
Copy Markdown
Contributor

@yecril71pl : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@TylerMSFT TylerMSFT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching the second one. The first change is already live.

@TylerMSFT TylerMSFT merged commit 888d3ed into MicrosoftDocs:master Nov 9, 2020
@yecril71pl yecril71pl deleted the patch-2 branch November 9, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants