aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-05-08 22:08:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2018-05-08 22:08:52 -0400
commit655b16da125b1210096b2f394ba0f222631fb44b (patch)
tree2ef60e2d4df2148fc0df8ab3e39ea8ace4d624cf /gcc/testsuite/g++.dg
parent6f9a76b1a1937ca399a79515005dc0dad97f694c (diff)
downloadgcc-655b16da125b1210096b2f394ba0f222631fb44b.zip
gcc-655b16da125b1210096b2f394ba0f222631fb44b.tar.gz
gcc-655b16da125b1210096b2f394ba0f222631fb44b.tar.bz2
PR c++/85706 - class deduction under decltype
* pt.c (for_each_template_parm_r): Handle DECLTYPE_TYPE. Clear *walk_subtrees whether or not we walked into the operand. (type_uses_auto): Only look at deduced contexts. From-SVN: r260066
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/concepts/class-deduction2.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction2.C b/gcc/testsuite/g++.dg/concepts/class-deduction2.C
new file mode 100644
index 0000000..286e59a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/concepts/class-deduction2.C
@@ -0,0 +1,9 @@
+// PR c++/85706
+// { dg-additional-options "-std=c++17 -fconcepts" }
+
+template<class T> struct S {
+ S(T);
+};
+
+template<class = void>
+auto f() -> decltype(S(42)); // error