LWG 1191
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119545 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/array b/include/array
index 2c3d89c..3801262 100644
--- a/include/array
+++ b/include/array
@@ -94,6 +94,7 @@
template <int I, class T, size_t N> struct tuple_element<I, array<T, N>>;
template <int I, class T, size_t N> T& get(array<T, N>&);
template <int I, class T, size_t N> const T& get(const array<T, N>&);
+template <int I, class T, size_t N> T&& get(array<T, N>&&);
} // std
@@ -295,6 +296,18 @@
return __a[_Ip];
}
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+template <size_t _Ip, class _Tp, size_t _Size>
+_LIBCPP_INLINE_VISIBILITY inline
+_Tp&&
+get(array<_Tp, _Size>&& __a)
+{
+ return _STD::move(__a[_Ip]);
+}
+
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_ARRAY