diff options
author | Jason Merrill <jason@redhat.com> | 2022-06-03 14:53:59 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-06-03 17:04:30 -0400 |
commit | 891d64721626f45fb95fa47a57a3f396b80f31e9 (patch) | |
tree | 8c40683d7ec4741244e1bee0f786682b5f6902c0 | |
parent | 0ecb6b906f215ec56df1a555139abe9ad95414fb (diff) | |
download | gcc-891d64721626f45fb95fa47a57a3f396b80f31e9.zip gcc-891d64721626f45fb95fa47a57a3f396b80f31e9.tar.gz gcc-891d64721626f45fb95fa47a57a3f396b80f31e9.tar.bz2 |
c++: more-specialized test
I noticed the need for this testcase while working on PR102629; since there
is no information about the target type, we don't want to choose the most
specialized overload.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/auto56.C: New test.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/auto56.C | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto56.C b/gcc/testsuite/g++.dg/cpp0x/auto56.C new file mode 100644 index 0000000..dd55ebf --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto56.C @@ -0,0 +1,6 @@ +// Check that we don't prefer #2 because it's more specialized. +// { dg-do compile { target c++11 } } + +template <class T> T f(T); +template <class T> T* f(T*); +auto p = &f<int>; // { dg-error "" } |