@@ -105,13 +105,14 @@ class exprt:public irept
105
105
void reserve_operands (operandst::size_type n)
106
106
{ operands ().reserve (n) ; }
107
107
108
- DEPRECATED (" use copy_to_operands( expr) instead" )
108
+ DEPRECATED (" use add_to_operands(std::move( expr) ) instead" )
109
109
void move_to_operands (exprt &expr);
110
110
111
- DEPRECATED (" use copy_to_operands(e1, e2 ) instead" )
111
+ DEPRECATED (" use add_to_operands(std::move(e1), std::move(e2) ) instead" )
112
112
void move_to_operands (exprt &e1 , exprt &e2 );
113
113
114
- DEPRECATED (" use copy_to_operands(e1, e2, e3) instead" )
114
+ DEPRECATED (
115
+ " use add_to_operands(std::move(e1), std::move(e2), std::move(e3)) instead" )
115
116
void move_to_operands (exprt &e1 , exprt &e2 , exprt &e3 );
116
117
117
118
// / Copy the given argument to the end of `exprt`'s operands.
@@ -121,9 +122,16 @@ class exprt:public irept
121
122
operands ().push_back (expr);
122
123
}
123
124
124
- // / Copy the given argument to the end of `exprt`'s operands.
125
+ // / Add the given argument to the end of `exprt`'s operands.
126
+ // / \param expr: `exprt` to append to the operands
127
+ void add_to_operands (const exprt &expr)
128
+ {
129
+ copy_to_operands (expr);
130
+ }
131
+
132
+ // / Add the given argument to the end of `exprt`'s operands.
125
133
// / \param expr: `exprt` to append to the operands
126
- void copy_to_operands (exprt &&expr)
134
+ void add_to_operands (exprt &&expr)
127
135
{
128
136
operands ().push_back (std::move (expr));
129
137
}
@@ -141,10 +149,18 @@ class exprt:public irept
141
149
op.push_back (e2 );
142
150
}
143
151
144
- // / Copy the given arguments to the end of `exprt`'s operands.
152
+ // / Add the given arguments to the end of `exprt`'s operands.
153
+ // / \param e1: first `exprt` to append to the operands
154
+ // / \param e2: second `exprt` to append to the operands
155
+ void add_to_operands (const exprt &e1 , const exprt &e2 )
156
+ {
157
+ copy_to_operands (e1 , e2 );
158
+ }
159
+
160
+ // / Add the given arguments to the end of `exprt`'s operands.
145
161
// / \param e1: first `exprt` to append to the operands
146
162
// / \param e2: second `exprt` to append to the operands
147
- void copy_to_operands (exprt &&e1 , exprt &&e2 )
163
+ void add_to_operands (exprt &&e1 , exprt &&e2 )
148
164
{
149
165
operandst &op = operands ();
150
166
#ifndef USE_LIST
@@ -154,6 +170,15 @@ class exprt:public irept
154
170
op.push_back (std::move (e2 ));
155
171
}
156
172
173
+ // / Add the given arguments to the end of `exprt`'s operands.
174
+ // / \param e1: first `exprt` to append to the operands
175
+ // / \param e2: second `exprt` to append to the operands
176
+ // / \param e3: third `exprt` to append to the operands
177
+ void add_to_operands (const exprt &e1 , const exprt &e2 , const exprt &e3 )
178
+ {
179
+ copy_to_operands (e1 , e2 , e3 );
180
+ }
181
+
157
182
// / Copy the given arguments to the end of `exprt`'s operands.
158
183
// / \param e1: first `exprt` to append to the operands
159
184
// / \param e2: second `exprt` to append to the operands
@@ -169,11 +194,11 @@ class exprt:public irept
169
194
op.push_back (e3 );
170
195
}
171
196
172
- // / Copy the given arguments to the end of `exprt`'s operands.
197
+ // / Add the given arguments to the end of `exprt`'s operands.
173
198
// / \param e1: first `exprt` to append to the operands
174
199
// / \param e2: second `exprt` to append to the operands
175
200
// / \param e3: third `exprt` to append to the operands
176
- void copy_to_operands (exprt &&e1 , exprt &&e2 , exprt &&e3 )
201
+ void add_to_operands (exprt &&e1 , exprt &&e2 , exprt &&e3 )
177
202
{
178
203
operandst &op = operands ();
179
204
#ifndef USE_LIST
0 commit comments