@@ -661,13 +661,9 @@ struct MallocedBuffer {
|
661 | 661 | }; |
662 | 662 | |
663 | 663 | // Test whether some value can be called with (). |
664 | | -template <typename T, typename = void> |
665 | | -struct is_callable : std::is_function<T> { }; |
666 | | - |
667 | 664 | template <typename T> |
668 | | -struct is_callable<T, typename std::enable_if< |
669 | | - std::is_same<decltype(void(&T::operator())), void>::value |
670 | | - >::type> : std::true_type { }; |
| 665 | +concept is_callable = |
| 666 | + std::is_function<T>::value || requires { &T::operator(); }; |
671 | 667 | |
672 | 668 | template <typename T, void (*function)(T*)> |
673 | 669 | struct FunctionDeleter { |
|