05-12-2024, 01:06 PM
Hi,
My interpretation of Rule 7.0.4 is that it does not allow this type of code:
This is quite frequent when interfacing with third-party as well as POSIX C APIs. Casting each argument to unsigned type would go in detriment of readability.
Would it make sense to add an exception for signed constants?
Thanks!
My interpretation of Rule 7.0.4 is that it does not allow this type of code:
Code:
my_function(FLAG_A | FLAG_B | FLAG_C);
This is quite frequent when interfacing with third-party as well as POSIX C APIs. Casting each argument to unsigned type would go in detriment of readability.
Would it make sense to add an exception for signed constants?
Thanks!