Merge pull request #1371 from FloorGoddijn/master

CPP runtime :  Added a specialized ctor for Any for nullptr.
This commit is contained in:
Terence Parr 2016-11-19 14:23:53 -08:00 committed by GitHub
commit e32799f048
1 changed files with 6 additions and 1 deletions

View File

@ -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