aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/auto16.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/auto16.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto16.C7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto16.C b/gcc/testsuite/g++.dg/cpp0x/auto16.C
new file mode 100644
index 00000000000..1b4ae8f82b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto16.C
@@ -0,0 +1,7 @@
+// PR c++/40619
+// { dg-options "-std=c++0x" }
+
+template<typename U> struct X {};
+
+template<typename T> auto f(T t) -> X<decltype(t+1)> {}
+template<typename T> auto g(T t) -> X<decltype(t+1)> {}