Skip to content

Commit 570ef6e

Browse files
committed
Use std::optional for smt_sortt::cast
1 parent b9c6c27 commit 570ef6e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/solvers/smt2_incremental/ast/smt_sorts.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
#define SORT_ID(the_id) \
2626
template <> \
27-
optionalt<smt_##the_id##_sortt> smt_sortt::cast<smt_##the_id##_sortt>() && \
27+
std::optional<smt_##the_id##_sortt> smt_sortt::cast<smt_##the_id##_sortt>() \
28+
&& \
2829
{ \
2930
if(id() == ID_smt_##the_id##_sort) \
3031
return {std::move(*static_cast<const smt_##the_id##_sortt *>(this))}; \

src/solvers/smt2_incremental/ast/smt_sorts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_SORTS_H
99

1010
#include <util/irep.h>
11-
#include <util/optional.h>
1211

12+
#include <optional>
1313
#include <type_traits>
1414

1515
class smt_sort_const_downcast_visitort;
@@ -47,7 +47,7 @@ class smt_sortt : protected irept
4747
const sub_classt *cast() const &;
4848

4949
template <typename sub_classt>
50-
optionalt<sub_classt> cast() &&;
50+
std::optional<sub_classt> cast() &&;
5151

5252
protected:
5353
using irept::irept;

0 commit comments

Comments
 (0)