Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer pre-inc/dec over post-inc/dec. #17

Open
shahzadlone opened this issue Feb 5, 2019 · 0 comments
Open

Prefer pre-inc/dec over post-inc/dec. #17

shahzadlone opened this issue Feb 5, 2019 · 0 comments
Labels
C++98 Changes that should go first in the patch series. upstream Intended to be sent to the upstream project

Comments

@shahzadlone
Copy link
Member

Use pre-inc/pre-dec over post-inc/post-dec where ever don't need a post-inc/post-dec (some times you want to return the result of the value before the operation is applied, post operation is valid to use in that case).

Even on integral / primitive types where do not need a post-inc/post-dec, always inforce pre-incr/pre-dec for the sake of consistency.

@shahzadlone shahzadlone changed the title Prefer pre-inc/dec over post-inc/dec. Prefer pre-inc/dec over post-inc/dec. [PATCH] Feb 5, 2019
@jonesmz jonesmz added the upstream Intended to be sent to the upstream project label Feb 5, 2019
@jonesmz jonesmz changed the title Prefer pre-inc/dec over post-inc/dec. [PATCH] Prefer pre-inc/dec over post-inc/dec. Feb 5, 2019
@jonesmz jonesmz added the C++98 Changes that should go first in the patch series. label Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++98 Changes that should go first in the patch series. upstream Intended to be sent to the upstream project
Projects
None yet
Development

No branches or pull requests

2 participants