-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusting the function passed to func_new/func_wrap to be universal r…
…eference so that we can perfectly forward it on. The issue, as shown by the test cases, is that previously the function was always copied when passed to func_new/wrap. This works fine for pointers, but when using a callable it's unnecessarily copied. Furthermore, for callables which aren't allowed to be copied (like lambda's with refernces, compilation actually fails. The fix is to move the callable when the callable is passed in as an xvalue.
- Loading branch information
Showing
2 changed files
with
53 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters