Commit c9cde35
src: simplify is_callable by making it a concept
Using a C++20 `concept` here makes `is_callable` much simpler
than relying on SFINAE. It is equivalent for function types,
`std::function`, lambdas, and classes with `operator()`,
regardless of argument or return types.
PR-URL: #58169
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent 892b425 commit c9cde35
2 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | 663 | | |
667 | | - | |
668 | | - | |
669 | | - | |
| 664 | + | |
| 665 | + | |
670 | 666 | | |
671 | 667 | | |
672 | 668 | | |
| |||
0 commit comments