[PATCH] D134128: Resubmit an implemention for constrained template template parameters [P0857R0 Part B]
Liming Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 04:48:16 PDT 2022
lime added a comment.
I'm wondering whether classes like `TemplateArgumentLoc` could refer to the template head of the `TemplateArgument`, so the comparison of parameter mappings could be modified, and then the refered variable could be accepted.
================
Comment at: clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp:43
+
+S4<X> s41;
+S4<Y> s42;
----------------
This variable was rejected after rebasing the patch on D126907. The reason is that the atomic constraint generated from `S4` is not considered to subsume the one generated from `X`. And the difference between two atomic constraints is mainly the template arguments. If the concept `C` was like `template <typename> concept C = true`, this variable would be accepted.
A reasonable behavior might be either accepting the variable regardless of whether the constraint expression depends on template arguments, or rejecting the variable as the template heads of `S4` and `X` are not equivalent. Both GCC and MSVC accept the variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134128/new/
https://reviews.llvm.org/D134128
More information about the cfe-commits
mailing list