Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-11-17 22:52:17 +0300
committerHoward Hinnant <hhinnant@apple.com>2010-11-17 22:52:17 +0300
commit601afb30ec6ea4171acd812290e79ac49bdd19c5 (patch)
treea7e0c4f4581b3c6d66c52a3515138cf0feb43297 /libcxx/include/array
parenteebbbeb917efe74be9e8181ebf113671f7622ef5 (diff)
LWG 1191
llvm-svn: 119545
Diffstat (limited to 'libcxx/include/array')
-rw-r--r--libcxx/include/array13
1 files changed, 13 insertions, 0 deletions
diff --git a/libcxx/include/array b/libcxx/include/array
index 2c3d89cde9d5..3801262297f8 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -94,6 +94,7 @@ template <class T, size_t N> struct tuple_size<array<T, N>>;
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 @@ get(const array<_Tp, _Size>& __a)
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