-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Logging
-
None
-
Fully Compatible
The present form of uassert, with the check expression last, inverts the order needed by readers of the code, who need to see the expression being evaluated, first, before considering the error to be logged.
It will need a different name for the macro, as the template magic to distinguish the variant argument orders would be too fragile for production use. In context, there would never be any confusion over which form was meant, and any mistakes would be caught by the compiler, so the names need not be very different. I suggest ussert would serve, but any name not longer than "uassert" would do as well.