-
Notifications
You must be signed in to change notification settings - Fork 164
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
feat: Added for_each_pixel overload for any_image #648
feat: Added for_each_pixel overload for any_image #648
Conversation
The suggested solution in the issue does not work, because we cannot use generic lambdas in C++11. I've marked my PR as WIP, because I am not quite sure whether it is a good idea to take the address of the callable and store a pointer to it in the helper function object. I could also refactor it to take it by value and move it into the helper functor. Any options on this? |
Codecov Report
@@ Coverage Diff @@
## develop #648 +/- ##
===========================================
+ Coverage 78.77% 78.79% +0.02%
===========================================
Files 117 117
Lines 5031 5036 +5
===========================================
+ Hits 3963 3968 +5
Misses 1068 1068 |
@marco-langer Thank you for the PR. Storing the functor directly, by value, is fine. |
What's the status of this PR? |
The PR is ready for review, if we are currently on C++11. However, yesterday I saw a comment of you saying that we are actually able to develop in C++14 already. If this is the case (the GIL github project description is not correct then), I would like to refactor this PR again to replace the functor and use a generic lambda to follow the suggestion in the linked issue. |
In commit 8b1c2d3 we announced possibility to switch over to C++14 in the There are lots of details to consider, but if you'd like to discuss pros and cons of the C++ upgrade in the context of GIL enhancements, please feel free and welcomed to open discussion. |
You are right, discussing further steps for a possible C++14/C++17 version upgrade sounds like a good idea. Let's keep this PR with C++11-style functors then and postpone a further modernization. |
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.
LGTM. Thank you!
Description
Fixes #579
References
Tasklist