forked from jasder/antlr
Merge pull request #1371 from FloorGoddijn/master
CPP runtime : Added a specialized ctor for Any for nullptr.
This commit is contained in:
commit
e32799f048
|
@ -74,7 +74,7 @@ struct Any
|
||||||
|
|
||||||
auto derived = dynamic_cast<Derived<T> *>(_ptr);
|
auto derived = dynamic_cast<Derived<T> *>(_ptr);
|
||||||
|
|
||||||
return derived;
|
return derived != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
|
@ -156,6 +156,11 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<> inline
|
||||||
|
Any::Any(std::nullptr_t&& ) : _ptr(nullptr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace antlrcpp
|
} // namespace antlrcpp
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in New Issue