Closed
Description
clang 19.1
#include <concepts>
template <typename T>
void f(T) {}
template <typename T>
requires std::same_as<T, int>
void f(T) {}
int main() {
auto a = f<int>; // error: variable 'a' with type 'auto' has incompatible initializer of type '<overloaded function type>'
}
I don't know whether this should compile, but gcc does accept it. At least the diagnostic could use some work.