mirror of
https://github.com/Z3Prover/z3
synced 2026-01-21 09:34: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:
parent
40250bfcb8
commit
4d188f07e9
15 changed files with 34 additions and 592 deletions
|
|
@ -10,7 +10,7 @@ Author:
|
|||
#pragma once
|
||||
|
||||
#include "util/inf_rational.h"
|
||||
#include "util/optional.h"
|
||||
#include <optional>
|
||||
|
||||
namespace lp_api {
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ namespace lp_api {
|
|||
}
|
||||
|
||||
|
||||
typedef optional<inf_rational> opt_inf_rational;
|
||||
typedef std::optional<inf_rational> opt_inf_rational;
|
||||
|
||||
|
||||
struct stats {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ Notes:
|
|||
#include "util/inf_rational.h"
|
||||
#include "smt/diff_logic.h"
|
||||
#include "smt/spanning_tree.h"
|
||||
#include <optional>
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
|
@ -152,7 +153,7 @@ namespace smt {
|
|||
unsigned m_step;
|
||||
edge_id m_enter_id;
|
||||
edge_id m_leave_id;
|
||||
optional<numeral> m_delta;
|
||||
std::optional<numeral> m_delta;
|
||||
|
||||
// Initialize the network with a feasible spanning tree
|
||||
void initialize();
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ namespace smt {
|
|||
bool network_flow<Ext>::choose_leaving_edge() {
|
||||
node src = m_graph.get_source(m_enter_id);
|
||||
node tgt = m_graph.get_target(m_enter_id);
|
||||
m_delta.set_invalid();
|
||||
m_delta.reset();
|
||||
edge_id leave_id = null_edge_id;
|
||||
svector<edge_id> path;
|
||||
bool_vector against;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue