diff options
author | Marek Polacek <polacek@redhat.com> | 2024-09-03 13:32:35 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2024-09-03 13:32:53 -0400 |
commit | 5f3a6e26aab16a792176b33fbee1456a91aaebf2 (patch) | |
tree | e382cdc16e764110918c220ea709a265d498a86d /gcc | |
parent | f0ab3de6ec0e3540f2e57f3f5628005f0a4e3fa5 (diff) | |
download | gcc-5f3a6e26aab16a792176b33fbee1456a91aaebf2.zip gcc-5f3a6e26aab16a792176b33fbee1456a91aaebf2.tar.gz gcc-5f3a6e26aab16a792176b33fbee1456a91aaebf2.tar.bz2 |
c++: add fixed test [PR109095]
Fixed by r13-6693.
PR c++/109095
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/nontype-class66.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp2a/nontype-class66.C | 19 |
1 files changed, 19 insertions, 0 deletions
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 0000000..385b290 --- /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; |