Код: Выделить всё
#include
#include
template
static constexpr auto canCallWith() {
return std::is_invocable_v;
}
template
static constexpr auto canRetWith() {
return std::is_same::value;
}
template
static constexpr auto sigmatch() {
if constexpr (canCallWith()) {
if constexpr (canRetWith()) { return true; }
}
return false;
}
#include
void foo(int, double = 56) {}
int main() {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79365439/callable-signature-matching-that-prohibits-implicit-conversion-of-parameters[/url]