bool operator() (const ex &lh, const ex &rh) const { return lh.is_equal(rh); }
};
+struct op0_is_equal : public std::binary_function<ex, ex, bool> {
+ bool operator() (const ex &lh, const ex &rh) const { return lh.op(0).is_equal(rh.op(0)); }
+};
+
struct ex_swap : public std::binary_function<ex, ex, void> {
void operator() (ex &lh, ex &rh) const { lh.swap(rh); }
};
int remaining = local_size - global_size;
exvector::const_iterator it = local_dummy_indices.begin(), itend = local_dummy_indices.end();
while (it != itend && remaining > 0) {
- if (find_if(global_dummy_indices.begin(), global_dummy_indices.end(), bind2nd(ex_is_equal(), *it)) == global_dummy_indices.end()) {
+ if (find_if(global_dummy_indices.begin(), global_dummy_indices.end(), bind2nd(op0_is_equal(), *it)) == global_dummy_indices.end()) {
global_dummy_indices.push_back(*it);
global_size++;
remaining--;