@@ -44,7 +44,7 @@ struct object_creation_infot
4444
4545 // / Where runtime types differ from compile-time types, we need to mark the
4646 // / runtime types as needed by lazy methods.
47- optionalt <ci_lazy_methods_neededt> &needed_lazy_methods;
47+ std::optional <ci_lazy_methods_neededt> &needed_lazy_methods;
4848
4949 // / Map to keep track of reference-equal objects. Each entry has an ID (such
5050 // / that any two reference-equal objects have the same ID) and the expression
@@ -117,7 +117,7 @@ static bool is_enum_with_type_equal_to_declaring_type(
117117// / A runtime type that is different from the objects compile-time type should
118118// / be specified in `json` in this way.
119119// / Type values are of the format "my.package.name.ClassName".
120- static optionalt <std::string> get_type (const jsont &json)
120+ static std::optional <std::string> get_type (const jsont &json)
121121{
122122 if (!json.is_object ())
123123 return {};
@@ -267,9 +267,9 @@ static jsont get_untyped_string(const jsont &json)
267267// / \param symbol_table: used to look up the type given its name.
268268// / \return runtime type of the object, if specified by at least one of the
269269// / parameters.
270- static optionalt <java_class_typet> runtime_type (
270+ static std::optional <java_class_typet> runtime_type (
271271 const jsont &json,
272- const optionalt <std::string> &type_from_array,
272+ const std::optional <std::string> &type_from_array,
273273 const symbol_table_baset &symbol_table)
274274{
275275 const auto type_from_json = get_type (json);
@@ -304,9 +304,9 @@ static optionalt<java_class_typet> runtime_type(
304304// / field, this takes priority over \p type_from_array.
305305// / \param type_from_array: may contain a type name from a containing array.
306306// / \return if the type of an array was given, the type of its elements.
307- static optionalt <std::string> element_type_from_array_type (
307+ static std::optional <std::string> element_type_from_array_type (
308308 const jsont &json,
309- const optionalt <std::string> &type_from_array)
309+ const std::optional <std::string> &type_from_array)
310310{
311311 if (const auto json_array_type = get_type (json))
312312 {
@@ -332,7 +332,7 @@ static optionalt<std::string> element_type_from_array_type(
332332code_with_references_listt assign_from_json_rec (
333333 const exprt &expr,
334334 const jsont &json,
335- const optionalt <std::string> &type_from_array,
335+ const std::optional <std::string> &type_from_array,
336336 object_creation_infot &info);
337337
338338// / One of the base cases (primitive case) of the recursion.
@@ -392,7 +392,7 @@ static code_frontend_assignt assign_null(const exprt &expr)
392392static code_with_references_listt assign_array_data_component_from_json (
393393 const exprt &expr,
394394 const jsont &json,
395- const optionalt <std::string> &type_from_array,
395+ const std::optional <std::string> &type_from_array,
396396 object_creation_infot &info)
397397{
398398 const auto &java_class_type = followed_class_type (expr, info.symbol_table );
@@ -411,7 +411,7 @@ static code_with_references_listt assign_array_data_component_from_json(
411411 code_frontend_assignt{array_init_data, data_member_expr, info.loc });
412412
413413 size_t index = 0 ;
414- const optionalt <std::string> inferred_element_type =
414+ const std::optional <std::string> inferred_element_type =
415415 element_type_from_array_type (json, type_from_array);
416416 const json_arrayt json_array = get_untyped_array (json, element_type);
417417 for (auto it = json_array.begin (); it < json_array.end (); it++, index++)
@@ -457,7 +457,7 @@ static std::pair<code_with_references_listt, exprt>
457457assign_det_length_array_from_json (
458458 const exprt &expr,
459459 const jsont &json,
460- const optionalt <std::string> &type_from_array,
460+ const std::optional <std::string> &type_from_array,
461461 object_creation_infot &info)
462462{
463463 PRECONDITION (is_java_array_type (expr.type ()));
@@ -486,7 +486,7 @@ static code_with_references_listt assign_nondet_length_array_from_json(
486486 const exprt &array,
487487 const jsont &json,
488488 const exprt &given_length_expr,
489- const optionalt <std::string> &type_from_array,
489+ const std::optional <std::string> &type_from_array,
490490 object_creation_infot &info)
491491{
492492 PRECONDITION (is_java_array_type (array.type ()));
@@ -793,7 +793,7 @@ static get_or_create_reference_resultt get_or_create_reference(
793793static code_with_references_listt assign_reference_from_json (
794794 const exprt &expr,
795795 const jsont &json,
796- const optionalt <std::string> &type_from_array,
796+ const std::optional <std::string> &type_from_array,
797797 object_creation_infot &info)
798798{
799799 const std::string &id = has_enum_type (expr, info.symbol_table )
@@ -849,7 +849,7 @@ static code_with_references_listt assign_reference_from_json(
849849code_with_references_listt assign_from_json_rec (
850850 const exprt &expr,
851851 const jsont &json,
852- const optionalt <std::string> &type_from_array,
852+ const std::optional <std::string> &type_from_array,
853853 object_creation_infot &info)
854854{
855855 code_with_references_listt result;
@@ -915,7 +915,7 @@ code_with_references_listt assign_from_json(
915915 const jsont &json,
916916 const irep_idt &function_id,
917917 symbol_table_baset &symbol_table,
918- optionalt <ci_lazy_methods_neededt> &needed_lazy_methods,
918+ std::optional <ci_lazy_methods_neededt> &needed_lazy_methods,
919919 size_t max_user_array_length,
920920 std::unordered_map<std::string, object_creation_referencet> &references)
921921{
0 commit comments