Commit 41e24ad0 authored by daniel_e's avatar daniel_e
Browse files

(shared_polymorphic_cast): Avoid the address operator since it might be overloaded.

parent 304b755e
......@@ -208,7 +208,8 @@ SharedPtr<T> shared_dynamic_cast(const SharedPtr<U>& other)
template <class T, class U> inline
SharedPtr<T> shared_polymorphic_cast(const SharedPtr<U>& other)
return SharedPtr<T>(&dynamic_cast<T&>(*other)); // may throw std::bad_cast
dynamic_cast<T&>(*other); // may throw std::bad_cast
return SharedPtr<T>(static_cast<T*>(other.get()));
} // namespace Util
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment