================
@@ -66,8 +66,9 @@ namespace DependentType {
   using ok = Pt<tT0<int, i>, tT0<int, iDi>>;
   using err1 = tT0<int, ii>; // expected-error {{too few template arguments 
for class template 'ii'}}
                              // expected-note@-1 {{different template 
parameters}}
-  using err2 = tT0<short, i>; // FIXME: should this be OK?
-  using err2a = tT0<long long, i>; // FIXME: should this be OK (if long long 
is larger than int)?
+  using err2 = tT0<short, i>;
+  using err2a = tT0<long long, i>; // expected-error@#tT0 {{cannot be narrowed 
from type 'long long' to 'int'}}
+                                   // expected-note@-1 {{different template 
parameters}}
----------------
mizvekov wrote:

We never allowed non-exact match for floats, so this would be a different 
problem. It would certainly be the design intention of P0522 to accept 
non-narrowing non-exact matches there.
Apparently only MSVC accepts non-exact matches here, so this would need some 
research and maybe a paper.

For enums sure, that works the same as integrals, I'll add a test case.

https://github.com/llvm/llvm-project/pull/124313
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to