-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: Revert pfect args make iterator #4234
fix: Revert pfect args make iterator #4234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the test!
Short answer: I don't know. This is very involved code and I'd need a bit of time to really get my head around all the details that come into play here, and most likely I'd need to experiment because 1st time through I hardly ever get anything right. PR #3980 had no tests and no measurements. How do we know that any effort spent here is actually worthwhile? My best guess: there is very little to be had here, even with a lot of effort. But I could be wrong. I cannot afford spending more time thinking about this until there are tests of some sorts or measurements that promise a tangible gain. My recommendation:
|
@Skylion007 @henryiii I think we need this in v2.10.1 & v2.11 Aaron: Is there anything still needed here? Could we please merge this? |
@Skylion007 could you undraft? I think this would be a good interim solution, maybe we can revisit before 2.11/2.12. |
* Revert "chore: perfectly forward all make_iterator args (pybind#3980)" This reverts commit 8da58da. * Redo unrelated optimization in commit * Add tests for ambiguous overloads
Description
Closes #4100 . Apparently, the perfect forwarding here can cause some issues with the wrong template being selected here. One option is to revert the relevant commit that this PR demonstrates, but I am not sure that is the best long term fix as the ambiguous / wrong overload can be easily be selected since the two templates for make_iterator are under-constrained.
Suggested changelog entry: