Bugzilla – Bug 382
feature request: templated DynamicCast
Last modified: 2008-10-20 02:41:00 UTC
Quoting Gustavo from a post from about a month ago: "Although dynamic_cast<CsmaNetDevice*> (PeekPointer (dev)) is a bit more verbose. Ideally I think it would make a lot of sense to have a smart-pointer based dynamic cast variant, something like: static inline Ptr<T2> DynamicCast<T2> (Ptr<T1> ptr) { return Ptr<T2> (dynamic_cast<T2*> (PeekPointer (ptr))); } Unfortunately the idea got no traction, at the time." I'd like to suggest we consider adding this.
+1 from me :)
+1
changeset b03ea30335a3