An rvalue reference cannot bind to an lvalue, so static_cast the
result of the __tuple_leaf::get() call to an rvalue reference when
returning from tuple's get().

llvm-svn: 124190
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 912e161ce06c7cdcd02d604e0188ee695241ada2
diff --git a/include/tuple b/include/tuple
index 8c3e1c4..3f67ff8 100644
--- a/include/tuple
+++ b/include/tuple
@@ -589,7 +589,8 @@
 get(tuple<_Tp...>&& __t)
 {
     typedef typename tuple_element<_Ip, tuple<_Tp...> >::type type;
-    return static_cast<__tuple_leaf<_Ip, type>&&>(__t.base_).get();
+    return static_cast<typename tuple_element<_Ip, tuple<_Tp...> >::type&&>(
+             static_cast<__tuple_leaf<_Ip, type>&&>(__t.base_).get());
 }
 
 // tie