Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A13-5-4 opposite operator clarification
#2
Answering your questions in order:
- Yes, your code is compliant - we're not quite sure how you came to the conclusion we were expecting <= to be implemented with >=
- Yes, as in your example the implementation of <= can use >
- The rule applies to three pairs: == & != <= & > >= & <

A possible compliant implementation would be to define == and < and use std::rel_ops
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: A13-5-4 opposite operator clarification - by misra cpp - 17-05-2024, 03:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)