Skip to content

Commit 92a7d9a

Browse files
Hide inheritance of guardt on exprt
This ensures only methods of the guardt interface are used.
1 parent cc39780 commit 92a7d9a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/util/guard.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Author: Daniel Kroening, [email protected]
1616

1717
#include "std_expr.h"
1818

19-
class guardt:public exprt
19+
class guardt : private exprt
2020
{
2121
public:
2222
guardt()
@@ -45,6 +45,16 @@ class guardt:public exprt
4545

4646
void guard_expr(exprt &dest) const;
4747

48+
bool is_true() const
49+
{
50+
return exprt::is_true();
51+
}
52+
53+
bool is_false() const
54+
{
55+
return exprt::is_false();
56+
}
57+
4858
friend guardt &operator -= (guardt &g1, const guardt &g2);
4959
friend guardt &operator |= (guardt &g1, const guardt &g2);
5060
};

0 commit comments

Comments
 (0)