Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    Does this answer your question? overloaded “operator++” returns a non const, and clang-tidy complains Commented Mar 3, 2021 at 21:50
  • No, it does not. This post doesn't mention the second Clang-Tidy warning. Also, adding that & at the end does not get rid of the warning, either. I first referred to exactly this post to find an answer, but because it didn't help me, I decided to ask a new question. Commented Mar 3, 2021 at 22:19
  • Done. Added an Edit explaining this and an example, as well Commented Mar 3, 2021 at 23:49
  • 1
    Clang-Tidy is wrong. Your 'Option 1' is a text book example of postfix increment. Commented Mar 4, 2021 at 9:22
  • So, in other words, you'd suggest to ignore or suppress the warning? Btw I'm pretty sure all of this does not matter at all for the assignment, It's just that I'd like to do it properly for my own learning factor Commented Mar 4, 2021 at 12:06