Skip to content

Commit 9795ca6

Browse files
Merge pull request #8034 from tautschnig/cleanup/optionalt
Replace nonstd::optional by C++17 std::optional
2 parents 278fb51 + 633010a commit 9795ca6

20 files changed

+27
-1194
lines changed

CODEOWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
/src/json-symtab-language/ @martin-cs @kroening @tautschnig @peterschrammel
2424
/src/langapi/ @kroening @tautschnig @peterschrammel
2525
/src/xmllang/ @kroening @tautschnig @peterschrammel
26-
/src/nonstd/ @peterschrammel
2726
/src/solvers/flattening @martin-cs @kroening @tautschnig @peterschrammel
2827
/src/solvers/floatbv @martin-cs @kroening
2928
/src/solvers/miniBDD @tautschnig @kroening

doc/architectural/folder-walkthrough.md

-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ containing the code for a different part of the system.
5151
* \ref xmllang
5252
* \ref util
5353
* \ref miniz
54-
* \ref nonstd
5554

5655
In the top level of `src` there are only a few files:
5756

@@ -167,7 +166,6 @@ digraph directory_dependencies {
167166
big_int [label = "big-int", URL = "\ref big-int"];
168167
miniz [URL = "\ref miniz"];
169168
util [URL = "\ref util"];
170-
nonstd [URL = "\ref nonstd"];
171169
json [URL = "\ref json"];
172170
xmllang [URL = "\ref xmllang"];
173171
assembler [URL = "\ref assembler"];
@@ -203,6 +201,5 @@ digraph directory_dependencies {
203201
xmllang -> util;
204202
assembler -> util;
205203
util -> big_int;
206-
util -> nonstd;
207204
}
208205
\enddot

jbmc/src/java_bytecode/ci_lazy_methods.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class method_bytecodet
8282
{
8383
const auto it = map.find(method_id);
8484
if(it == map.end())
85-
return opt_reft();
85+
return std::nullopt;
8686
return std::cref(it->second);
8787
}
8888
};

src/goto-instrument/contracts/dynamic-frames/dfcc_cfg_info.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ dfcc_loop_infot::find_head(goto_programt &goto_program) const
138138
optionalt<goto_programt::targett>
139139
dfcc_loop_infot::find_latch(goto_programt &goto_program) const
140140
{
141-
optionalt<goto_programt::targett> result = nullopt;
141+
optionalt<goto_programt::targett> result = std::nullopt;
142142
for(auto target = goto_program.instructions.begin();
143143
target != goto_program.instructions.end();
144144
target++)
@@ -728,7 +728,7 @@ dfcc_cfg_infot::get_outer_loop_identifier(const std::size_t loop_id) const
728728
}
729729
}
730730
// return nullopt for loops that are not nested in other loops
731-
return nullopt;
731+
return std::nullopt;
732732
}
733733

734734
bool dfcc_cfg_infot::is_valid_loop_or_top_level_id(const std::size_t id) const

src/goto-instrument/contracts/dynamic-frames/dfcc_lift_memory_predicates.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void dfcc_lift_memory_predicatest::lift_parameters_and_update_body(
331331
// rewrite all occurrences of lifted parameters
332332
instruction.transform([&replace_lifted_params](exprt expr) {
333333
const bool changed = !replace_lifted_params.replace(expr);
334-
return changed ? optionalt<exprt>{expr} : nullopt;
334+
return changed ? optionalt<exprt>{expr} : std::nullopt;
335335
});
336336

337337
// add address-of to all arguments expressions passed in lifted position to

src/goto-programs/link_goto_model.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void finalize_linking(
217217
{
218218
instruction.transform([&object_type_updates](exprt expr) {
219219
const bool changed = !object_type_updates.replace(expr);
220-
return changed ? optionalt<exprt>{expr} : nullopt;
220+
return changed ? optionalt<exprt>{expr} : std::nullopt;
221221
});
222222
}
223223
}

src/nonstd/README.md

-7
This file was deleted.

src/nonstd/module_dependencies.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)