Compared to PassFmt
I found the ValidFormatSpecifiers
to be more specific (I’m not a fan of abbrvs and // comments).
I don’t care about naming, so if you want to rename PassFmt
to something else, this is fine. However, the //
comment isn’t useless: It explains that the goal of this helper function is to be close as possible to the real code (and document the only difference). I found that useful as a single compilation unit that serves as a close proxy to the real code, with almost the same compile-time error messages (and behavior).
I understand you want better error messages on failure, but changing the behavior of the passing cases isn’t required for that.
Generally, if there isn’t a reason to change something, it is better to leave the code as-is, because it was most likely intentionally written in that way.