Implement a C++20 compile-time utility to verify whether a callable matches a target function type. Requirements: create a primary template is_callable_with_signature<Fn, R(Args...)> that yields true if Fn is invocable with Args... and the return type is convertible to R; provide two implementations—
(
-
SFINAE/traits-based and
(
-
concepts/requires-based; support free functions, lambdas, functors with overloaded operator(), member function pointers, and std::function; include minimal tests with static_assert and examples that should fail to compile if the signature does not match; discuss handling noexcept, cv/ref qualifiers, and implicit conversions.