diff options
author | Jason Merrill <jason@redhat.com> | 2016-06-21 14:19:13 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-06-21 14:19:13 -0400 |
commit | 2befd3f722b21e47f238c61400955eb9e65ce782 (patch) | |
tree | b2ca415533cd375bcd773bd499901ff83b30da51 /gcc/testsuite | |
parent | e547455bd62b59821c4ab9e900d7d0ff14fd69c8 (diff) | |
download | gcc-2befd3f722b21e47f238c61400955eb9e65ce782.zip gcc-2befd3f722b21e47f238c61400955eb9e65ce782.tar.gz gcc-2befd3f722b21e47f238c61400955eb9e65ce782.tar.bz2 |
Fix constraint satisfaction in uninstantiated template.
* constraint.cc (constraints_satisfied_p): Keep as many levels of
args as our template has levels of parms.
From-SVN: r237655
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.dg/concepts/memtmpl1.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/concepts/memtmpl1.C b/gcc/testsuite/g++.dg/concepts/memtmpl1.C new file mode 100644 index 0000000..6f3d5a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/memtmpl1.C @@ -0,0 +1,15 @@ +// { dg-options "-std=c++1z -fconcepts" } + +template <class T> +struct A { + template <class U> + requires sizeof(T) == 1 + static void f(U); + template <class U> + requires sizeof(T) == 2 + static void f(U); + void g() + { + f(42); + } +}; |