Open efriedma-quic opened 4 years ago
Reduced slightly:
struct A { A(char); };
template<int x> A a = A{x};
template A a<257>; // ill-formed, but clang accepts
godbolt link - https://godbolt.org/z/fbWscjsGx.
clang produces a warning for int to char conversion while gcc gives an error for narrowing conversion for the above test case. CheckImplicitConversion of SemaChecking.cpp might be relevent here?
We still pick the first overload: https://godbolt.org/z/EPf3Gqzcv
but @zygoloid example we no longer accept.
but @zygoloid example we no longer accept.
I'm not seeing that: https://godbolt.org/z/18Eos4G3M (we should reject under -pedantic-errors
at least; and we do outside of template instantiation).
Extended Description
gcc accepts, clang rejects. I think gcc is right?