rjmccall added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplateDeduction.cpp:2112
+          llvm::APSInt ArgRows(S.Context.getTypeSize(S.Context.IntTy),
+                               ConstantMatrixArg->getNumRows());
+          Result = DeduceNonTypeTemplateArgument(
----------------
Oh, and this needs to use `size_t`; not just the value but the type of a 
non-type template parameter can be deduced, so you should use an appropriate 
type.  Test case for this deduction is `template <auto R> void foo(matrix<int, 
R, 10>);` or something like that, with a check that `decltype(R)` is `size_t` 
(which you can do in any number of ways).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72281/new/

https://reviews.llvm.org/D72281



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to