Skip to content

tinyformat: Add compile-time checking for literal format strings

Placeholder Ryan Ofsky requested to merge github/fork/ryanofsky/pr/tcheck into master

Add compile-time checking for literal format strings passed to strprintf and tfm::format to make sure the right number of format arguments are passed.

There is still no compile-time checking if non-literal std::string or bilingual_str format strings are passed, but this is improved in other PRs:

  • #31061 implements compile-time checking for translated strings
  • #31072 increases compile-time checking by using literal strings as format strings, instead of std::string and bilingual_str
  • #31149 may drop the std::string overload for strprintf to require compile-time checking

Merge request reports

Loading