Remove useless test variable and use a more accurate dg-error pattern so
that only the ill-formed expression compilation error is considered.
libstdc++-v3/ChangeLog:
* testsuite/23_containers/map/operators/1_neg.cc (test01): Remove test variable
and use 'no match' dg-error patter.
* testsuite/23_containers/set/operators/1_neg.cc (test01): Likewise.
std::map<unsigned, int>::iterator itr(mapByIndex.begin());
// NB: notice, it's not mapByIndex!!
- bool __attribute__((unused)) test = itr != mapByName.end(); // { dg-error "no" }
- test &= itr == mapByName.end(); // { dg-error "no" }
+ itr != mapByName.end(); // { dg-error "no match" }
+ itr == mapByName.end(); // { dg-error "no match" }
}
std::set<unsigned int>::iterator itr(setByIndex.begin());
// NB: it's not setByIndex!!
- bool __attribute__((unused)) test = itr != setByName.end(); // { dg-error "no" }
- test &= itr == setByName.end(); // { dg-error "no" }
+ itr != setByName.end(); // { dg-error "no match" }
+ itr == setByName.end(); // { dg-error "no match" }
}