-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make inplace_function's constructor SFINAE on non-callables.
Before this patch, `is_convertible_v<int(*)(), inplace_function<int(int)>>` was `true`. After this patch, it's `false`. For modern guidance on the SFINAE requirements of function wrapper constructors, I think the most up-to-date guideline is the `function_ref` paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0792r3.html#specification Notice that `inplace_function` does not (yet) respect cv-qualified abominable types as in `inplace_function<int(int) const>`, so, that wrinkle of the `function_ref` paper doesn't apply to us. Thanks to @Voultapher for the patch! Committed by @Quuxplusone. Fixes #149.
- Loading branch information
1 parent
b2422f4
commit a53e9e6
Showing
2 changed files
with
137 additions
and
6 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