lime added a comment. Well, Something happened after rebasing this patch on D126907 <https://reviews.llvm.org/D126907>. `s41` below was rejected as the constrain generated from `template <C>` was no longer considered to subsume the constrain generated from `template <typename T> requires C` in the template template argument, which is not the case <https://godbolt.org/z/Gq7h58hGb> in both GCC and MSVC. However, GCC and MSVC also accept the redeclaration for `S`, which might be ill-formed because of this rule <https://eel.is/c++draft/temp.decls#temp.over.link-7>. If this kind of redeclaration happens on `X`, GCC and MSVC will reject it. Rebasing this patch on D126907 <https://reviews.llvm.org/D126907> will also not make the both redeclaration valid.
Personally, I decided to make `s41` valid for Clang, a clue might be making the `QualType`s the same in the parameters of two generated constrains. template <typename T> concept C = T::f(); template <typename T> concept C1 = T::f(); template <C> struct X {}; template <typename T> requires C<T> struct X; // ill-formed for sure template <C1> struct Y {}; template <template <typename T> requires C<T> class> struct S {}; template <template <C> class> struct S; // GCC and MSVC accept this S<X> sx; // my target S<Y> sy; // ill-formed for sure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134128/new/ https://reviews.llvm.org/D134128 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits