forked from jasder/antlr
Remove the std::operator== override in CPPUtils.h
This commit is contained in:
parent
183b7ce0a9
commit
a1d61541b7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue