-
Notifications
You must be signed in to change notification settings - Fork 46
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
Don't use std::function #20
Comments
Hello, I just made your requested changes on #21 |
Hello, I made new changes on #21 I removed This will do the job for both functions and variables. I also updated the documentation regarding that. I think this way will be cleaner but I would like to have your opinion on that. Since we will need to make breaking changes with this issue (#18) it would be an opportunity to do the same regarding this |
I am actually not entire sure that it's better to "roll everything up" into a single function. It has some elegance benefit, but what if, in the future, you wanted to differentiate their behavior somehow? But maybe that's not interesting/not relevant. Like I said, no strong opinion. |
std::function is a heavy container, whose main use is encapsulating potentially complex invokable objects. See this discussion; why use it? A simple (typed) function pointer should probably do nicely.
The text was updated successfully, but these errors were encountered: