3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-21 17:44:43 +00:00

Replace custom util/optional with std::optional (#8162)

* Initial plan

* Replace optional with std::optional in source files

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

* Fix array_map contains() and remove optional_benchmark test

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

* Address code review feedback - simplify array_map and test

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-11 19:47:39 -08:00 committed by GitHub
parent 40250bfcb8
commit 4d188f07e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 34 additions and 592 deletions

View file

@ -24,7 +24,7 @@ Notes:
#include "ast/pb_decl_plugin.h"
#include "ast/for_each_expr.h"
#include "ast/rewriter/expr_replacer.h"
#include "util/optional.h"
#include <optional>
#include "tactic/arith/bv2int_rewriter.h"
#include "tactic/arith/bv2real_rewriter.h"
#include "ast/converters/generic_model_converter.h"
@ -209,7 +209,7 @@ class nla2bv_tactic : public tactic {
void add_int_var(app* n) {
expr_ref s_bv(m_manager);
sort_ref bv_sort(m_manager);
optional<numeral> low, up;
std::optional<numeral> low, up;
numeral tmp;
bool is_strict;
if (m_bounds.has_lower(n, tmp, is_strict)) {