Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace nonstd::optional by C++17 std::optional #8034

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
/src/json-symtab-language/ @martin-cs
/src/langapi/ @kroening @tautschnig @peterschrammel
/src/xmllang/ @kroening @tautschnig @peterschrammel
/src/nonstd/ @peterschrammel
/src/solvers/flattening @martin-cs @kroening @tautschnig @peterschrammel
/src/solvers/floatbv @martin-cs @kroening
/src/solvers/miniBDD @tautschnig @kroening
Expand Down
3 changes: 0 additions & 3 deletions doc/architectural/folder-walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ containing the code for a different part of the system.
* \ref xmllang
* \ref util
* \ref miniz
* \ref nonstd

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

Expand Down Expand Up @@ -167,7 +166,6 @@ digraph directory_dependencies {
big_int [label = "big-int", URL = "\ref big-int"];
miniz [URL = "\ref miniz"];
util [URL = "\ref util"];
nonstd [URL = "\ref nonstd"];
json [URL = "\ref json"];
xmllang [URL = "\ref xmllang"];
assembler [URL = "\ref assembler"];
Expand Down Expand Up @@ -203,6 +201,5 @@ digraph directory_dependencies {
xmllang -> util;
assembler -> util;
util -> big_int;
util -> nonstd;
}
\enddot
2 changes: 1 addition & 1 deletion jbmc/src/java_bytecode/ci_lazy_methods.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class method_bytecodet
{
const auto it = map.find(method_id);
if(it == map.end())
return opt_reft();
return std::nullopt;
return std::cref(it->second);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ dfcc_loop_infot::find_head(goto_programt &goto_program) const
optionalt<goto_programt::targett>
dfcc_loop_infot::find_latch(goto_programt &goto_program) const
{
optionalt<goto_programt::targett> result = nullopt;
optionalt<goto_programt::targett> result = std::nullopt;
for(auto target = goto_program.instructions.begin();
target != goto_program.instructions.end();
target++)
Expand Down Expand Up @@ -728,7 +728,7 @@ dfcc_cfg_infot::get_outer_loop_identifier(const std::size_t loop_id) const
}
}
// return nullopt for loops that are not nested in other loops
return nullopt;
return std::nullopt;
}

bool dfcc_cfg_infot::is_valid_loop_or_top_level_id(const std::size_t id) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void dfcc_lift_memory_predicatest::lift_parameters_and_update_body(
// rewrite all occurrences of lifted parameters
instruction.transform([&replace_lifted_params](exprt expr) {
const bool changed = !replace_lifted_params.replace(expr);
return changed ? optionalt<exprt>{expr} : nullopt;
return changed ? optionalt<exprt>{expr} : std::nullopt;
});

// add address-of to all arguments expressions passed in lifted position to
Expand Down
2 changes: 1 addition & 1 deletion src/goto-programs/link_goto_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void finalize_linking(
{
instruction.transform([&object_type_updates](exprt expr) {
const bool changed = !object_type_updates.replace(expr);
return changed ? optionalt<exprt>{expr} : nullopt;
return changed ? optionalt<exprt>{expr} : std::nullopt;
});
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/nonstd/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/nonstd/module_dependencies.txt

This file was deleted.

Loading