mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-12 08:35:31 +01:00
fe39acf88ftinyformat: Add compile-time checking for literal format strings (Ryan Ofsky)184f34f2d0util: Support dynamic width & precision in ConstevalFormatString (Ryan Ofsky) Pull request description: 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](https://github.com/bitcoin/bitcoin/pull/31061) implements compile-time checking for translated strings - [#31072](https://github.com/bitcoin/bitcoin/pull/31072) increases compile-time checking by using literal strings as format strings, instead of `std::string` and `bilingual_str` - [#31149](https://github.com/bitcoin/bitcoin/pull/31149) may drop the `std::string` overload for `strprintf` to [require](https://github.com/bitcoin/bitcoin/pull/31149#issuecomment-2444579999) compile-time checking ACKs for top commit: maflcko: re-ACKfe39acf88f🕐 l0rinc: ACKfe39acf88fhodlinator: re-ACKfe39acf88fTree-SHA512: f1ddef0c96b9468c5ffe31b42dc19f1922583dd14f2e180b618d992c98614c5cc7db9f9cd917ef503f833bbc7dbec78e4489d0035416dce6840837e1d66d87cb