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

Calling proxy methods on const pointers #315

Open
rpatters1 opened this issue Mar 27, 2023 · 0 comments
Open

Calling proxy methods on const pointers #315

rpatters1 opened this issue Mar 27, 2023 · 0 comments

Comments

@rpatters1
Copy link
Contributor

I just spent the better part of a day trying to figure out why a proxy method I had added to a class was not there on some instances of the class. I finally tracked it down to the fact that the pointer to the instance was a const pointer in C++ but the proxy method did not take a const pointer as its first parameter.

I can see some value in this if the programmer knows about this situation, but I can imagine many might give up in frustration before they figured it out. It's worth considering whether this would be better as a runtime error that produced a useful error message. At the very least, clarification in the documentation would be useful. If you are interested, I don't mind modifying the docs to call out this issue in a larger way.

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

1 participant