Using a dynamic_cast instead of a static_cast is needed to safely cast from a base to a derived type. The previous static_pointer_cast isn't safe, however, when downcasting (and fails to compile when downcasting with virtual inheritance). Switching this to always use a dynamic_pointer_cast shouldn't incur any additional overhead when a static_pointer_cast is safe (i.e. when upcasting, or self-casting): compilers don't need RTTI checks in those cases.
| Name |
Last commit
|
Last Update |
|---|---|---|
| docs | Loading commit data... | |
| include/pybind11 | Loading commit data... | |
| pybind11 | Loading commit data... | |
| tests | Loading commit data... | |
| tools | Loading commit data... | |
| .appveyor.yml | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .readthedocs.yml | Loading commit data... | |
| .travis.yml | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CONTRIBUTING.md | Loading commit data... | |
| ISSUE_TEMPLATE.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| MANIFEST.in | Loading commit data... | |
| README.md | Loading commit data... | |
| setup.cfg | Loading commit data... | |
| setup.py | Loading commit data... |