3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-13 04:13:01 +00:00

Modernize ostringstream to std::format in ast.cpp and array_decl_plugin.cpp

Co-authored-by: levnach <5377127+levnach@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-13 21:29:51 +00:00
parent d274181c1f
commit 99a40e79d4
3 changed files with 53 additions and 67 deletions

View file

@ -71,3 +71,11 @@ inline std::string& operator+=(std::string& s, mk_pp const& pp) {
return s = s + pp;
}
// Helper function to convert streamable objects (like mk_pp) to strings for use with std::format
template<typename T>
inline std::string to_string(T const& obj) {
std::ostringstream strm;
strm << obj;
return std::move(strm).str();
}