summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/decltype-call4.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-call4.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C b/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C
new file mode 100644
index 00000000000..d504954bc63
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-call4.C
@@ -0,0 +1,13 @@
+// PR c++/81188
+// { dg-do compile { target c++11 } }
+
+template <class F>
+struct C {
+ F fast(long i) const;
+ auto operator[](long i) const -> decltype(this->fast(i));
+};
+
+template <class F>
+auto C<F>::operator[](long i) const -> decltype(this->fast(i)) {
+ return fast(i);
+}