summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C b/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
new file mode 100644
index 000000000..160296f64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
@@ -0,0 +1,18 @@
+// PR c++/48313
+// { dg-options -std=c++0x }
+
+template<typename F>
+void f(F&&) { }
+
+void g() { }
+
+template<typename T> void h() { }
+
+int main()
+{
+ f( g ); // OK
+ void (&p)() = h<int>;
+ f( p ); // OK
+ f( h<int> ); // ???
+}
+