Compile-time format string checking
The whole point of replacing printf is that a wrong format string shouldn't be a runtime surprise.
The whole point of replacing printf is that a wrong format string shouldn't be a runtime surprise.
Undefined Behavior (UB) occurs when the C++ standard places no requirements on what happens in a given situation. The program may crash, produce incorrect results, or appear to work correctly—there are no guarantees.