Skip to content

Conversation

MarekKnapek
Copy link

No description provided.

@tobspr
Copy link
Owner

tobspr commented Dec 27, 2016

Hi, thanks for your PR!

I am currently in vacation, and will look at it when I am back.

@MarekKnapek
Copy link
Author

MarekKnapek commented Jan 3, 2017

Hi Tobias, please remove both my pull requests, I just re-implemented your idea, you can have a look in my repository. My improvements are: 1) quickly return ptr or nullptr when we are casting from derived to base or from some_class to some_unrelated_class it is detectable through few templates, 2) cache also failed lookups, 3) enlarge the case to more elements (4 in my case). You have special case for casting from T to T but it doesn't work in all cases - I have the derived -> base cast as a superset of this idea. I have also simplified the reference cast. https://github.com/MarekKnapek/stuff/tree/master/C%2B%2B/fast_dynamic_cast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants