Remove the std::operator== override in CPPUtils.h

This commit is contained in:
Nathan Burles 2016-08-02 09:00:10 +01:00
parent 183b7ce0a9
commit a1d61541b7
2 changed files with 1 additions and 26 deletions

View File

@ -483,7 +483,7 @@ ATN ATNDeserializer::deserialize(const std::vector<uint16_t>& input) {
continue;
}
if (transition->target == endState) {
if (transition->target == endState || *(transition->target) == *endState) {
transition->target = bypassStop;
}
}

View File

@ -85,28 +85,3 @@ namespace antlrcpp {
std::string what(std::exception_ptr eptr = std::current_exception());
} // namespace antlrcpp
namespace std {
// Comparing weak and shared pointers.
template <typename T>
bool operator == (const std::weak_ptr<T> &lhs, const std::weak_ptr<T> &rhs) {
if (lhs.expired() && rhs.expired())
return true;
if (lhs.expired() || rhs.expired())
return false;
return (lhs.lock() == rhs.lock());
}
template <typename T>
bool operator == (const Ref<T> &lhs, const Ref<T> &rhs) {
if (!lhs && !rhs)
return true;
if (!lhs || !rhs)
return false;
return (*lhs == *rhs);
}
} // namespace std