17-05-2024, 03:02 PM
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
- 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
the MISRA C++ Working Group