3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-25 11:34:01 +00:00

Reapply PR #8190: Replace std::ostringstream with C++20 std::format (#8204)

* Initial plan

* Reapply PR #8190: Replace std::ostringstream with C++20 std::format

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-15 21:30:29 -08:00 committed by GitHub
parent 7d899fdc43
commit 6e68911cbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 87 additions and 104 deletions

View file

@ -17,6 +17,7 @@ Revision History:
--*/
#include<sstream>
#include<format>
#include "ast/ast_pp.h"
#include "ast/array_decl_plugin.h"
@ -52,9 +53,7 @@ namespace datalog {
if (low <= val && val <= up) {
return true;
}
std::ostringstream buffer;
buffer << msg << ", value is not within bound " << low << " <= " << val << " <= " << up;
m_manager->raise_exception(buffer.str());
m_manager->raise_exception(std::format("{}, value is not within bound {} <= {} <= {}", msg, low, val, up));
return false;
}