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:
parent
d274181c1f
commit
99a40e79d4
3 changed files with 53 additions and 67 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue