Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad const_cast in BinarySearchTree::find const overload #6

Closed
mgaunard opened this issue Dec 6, 2019 · 1 comment
Closed

Bad const_cast in BinarySearchTree::find const overload #6

mgaunard opened this issue Dec 6, 2019 · 1 comment

Comments

@mgaunard
Copy link

mgaunard commented Dec 6, 2019

const_cast<decltype(this)>(this)->find(query) just leads to infinite recursion, should use MyClass *.

@tinloaf
Copy link
Owner

tinloaf commented Dec 6, 2019

Good catch! Fixed in b585bed

Thanks 🎉

@tinloaf tinloaf closed this as completed Dec 6, 2019
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

No branches or pull requests

2 participants