search for: dynamic_pointer_cast

Displaying 1 result from an estimated 1 matches for "dynamic_pointer_cast".

2017 Jul 31
2
RTTI with smart pointers
Hi, I would like to use std::shared_ptr in my pass. However I'm facing a problem wrt RTTI. If I have a code like: std::shared_ptr<BaseClass> x(new DerivedClass()); ... std::shared_ptr<DerivedClass> p = std::dynamic_pointer_cast<DerivedClass>(x); It does not compile since the default RTTI infrastructure is not used by LLVM. Also, it's not clear to me if the 'classof' approach works in this case (I did try it with no success). Is it possible to have a dynamic_cast using std smart pointers in LLVM? Thank...