https://gcc.gnu.org/g:5f3a6e26aab16a792176b33fbee1456a91aaebf2
commit r15-3428-g5f3a6e26aab16a792176b33fbee1456a91aaebf2 Author: Marek Polacek <pola...@redhat.com> Date: Tue Sep 3 13:32:35 2024 -0400 c++: add fixed test [PR109095] Fixed by r13-6693. PR c++/109095 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class66.C: New test. Diff: --- gcc/testsuite/g++.dg/cpp2a/nontype-class66.C | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class66.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class66.C new file mode 100644 index 000000000000..385b290521fe --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class66.C @@ -0,0 +1,19 @@ +// PR c++/109095 +// { dg-do compile { target c++20 } } + +template< typename T > +struct bar +{}; + +template< int X > +struct baz +{}; + +template< auto N, template< auto N2 > typename TT > +struct foo; + +template< typename T, bar< T > B, template< T N2 > typename TT > +struct foo< B, TT > +{}; + +foo< bar< int >{}, baz > x;