From: Marek Polacek Date: Tue, 3 Sep 2024 17:32:35 +0000 (-0400) Subject: c++: add fixed test [PR109095] X-Git-Tag: basepoints/gcc-16~6125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f3a6e26aab16a792176b33fbee1456a91aaebf2;p=thirdparty%2Fgcc.git c++: add fixed test [PR109095] Fixed by r13-6693. PR c++/109095 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class66.C: New test. --- 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 00000000000..385b290521f --- /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;