Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.1.1
#1
Hi,

We are having a discussion with one of our tool vendors about how to interpret MISRA C++ 2023 rule 10.1.1, more concretely, the impact of the implicit 'this' parameter. I won't say which party supports which interpretation for the sake of neutrality.

Example code:
https://godbolt.org/z/hxz4bzvan


Interpretation A)
Fn() has an implicit, non-const 'this' parameter, so the rule is violated (Fn() should have been declared const).


Interpretation B)
Fn() does not have any parameters, so the rule is not violated.


We would appreciate an unbiased opinion to settle this discussion.

Best regards,
Daniel "Merge" Merget
Reply


Messages In This Thread
Rule 10.1.1 - by Merge - 04-08-2025, 07:59 AM
RE: Rule 10.1.1 - by misra cpp - 08-08-2025, 01:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)