Commit cf9d612
committed
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.1 parent 5fb879c commit cf9d612
2 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | 692 | | |
696 | | - | |
697 | | - | |
698 | | - | |
| 693 | + | |
| 694 | + | |
699 | 695 | | |
700 | 696 | | |
701 | 697 | | |
| |||
0 commit comments