Skip to content

Commit 91d941b

Browse files
committed
protect exprt::opX()
This prevents direct access to exprt::opX() -- the expectation is that the relevant specializations are used, which continue to offer these methods.
1 parent 3229307 commit 91d941b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/expr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class exprt:public irept
9898
const operandst &operands() const
9999
{ return (const operandst &)get_sub(); }
100100

101+
protected:
101102
exprt &op0()
102103
{ return operands().front(); }
103104

@@ -122,6 +123,7 @@ class exprt:public irept
122123
const exprt &op3() const
123124
{ return operands()[3]; }
124125

126+
public:
125127
void reserve_operands(operandst::size_type n)
126128
{ operands().reserve(n) ; }
127129

0 commit comments

Comments
 (0)