LWG 1191

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119545 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/utility b/include/utility
index 1faca45..f4c94be 100644
--- a/include/utility
+++ b/include/utility
@@ -100,6 +100,10 @@
     const typename const tuple_element<I, std::pair<T1, T2> >::type&
     get(const std::pair<T1, T2>&);
 
+template<size_t I, class T1, class T2>
+    typename tuple_element<I, std::pair<T1, T2> >::type&&
+    get(std::pair<T1, T2>&&);
+
 }  // std
 
 */
@@ -425,6 +429,16 @@
     _LIBCPP_INLINE_VISIBILITY
     const _T1&
     get(const pair<_T1, _T2>& __p) {return __p.first;}
+
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+    template <class _T1, class _T2>
+    static
+    _LIBCPP_INLINE_VISIBILITY
+    _T1&&
+    get(pair<_T1, _T2>&& __p) {return _STD::forward<_T1>(__p.first);}
+
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 };
 
 template <>
@@ -441,6 +455,16 @@
     _LIBCPP_INLINE_VISIBILITY
     const _T2&
     get(const pair<_T1, _T2>& __p) {return __p.second;}
+
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+    template <class _T1, class _T2>
+    static
+    _LIBCPP_INLINE_VISIBILITY
+    _T2&&
+    get(pair<_T1, _T2>&& __p) {return _STD::forward<_T2>(__p.second);}
+
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 };
 
 template <size_t _Ip, class _T1, class _T2>
@@ -459,6 +483,18 @@
     return __get_pair<_Ip>::get(__p);
 }
 
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+template <size_t _Ip, class _T1, class _T2>
+_LIBCPP_INLINE_VISIBILITY inline
+typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
+get(pair<_T1, _T2>&& __p)
+{
+    return __get_pair<_Ip>::get(_STD::move(__p));
+}
+
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
 _LIBCPP_END_NAMESPACE_STD