diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-08-08 15:29:07 +0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-08-09 09:53:12 +0700 |
commit | 6f894d481d19e05fbc10f3ce7d74d9180d1cbb64 (patch) | |
tree | 8260bbd04f17fbee780c654b35175e89c10129fa /system/include/libcxx/array | |
parent | 6c275bebb45d6aac7e4a024b825ab34971b178d2 (diff) |
Update libcxx to revision 187959, 2013-08-08.
Diffstat (limited to 'system/include/libcxx/array')
-rw-r--r-- | system/include/libcxx/array | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/system/include/libcxx/array b/system/include/libcxx/array index bcf53478..86d1fc0b 100644 --- a/system/include/libcxx/array +++ b/system/include/libcxx/array @@ -59,14 +59,14 @@ struct array // element access: reference operator[](size_type n); - const_reference operator[](size_type n) const; - const_reference at(size_type n) const; + const_reference operator[](size_type n) const; // constexpr in C++14 + const_reference at(size_type n) const; // constexpr in C++14 reference at(size_type n); reference front(); - const_reference front() const; + const_reference front() const; // constexpr in C++14 reference back(); - const_reference back() const; + const_reference back() const; // constexpr in C++14 T* data() noexcept; const T* data() const noexcept; @@ -92,9 +92,9 @@ template <class T> class tuple_size; template <int I, class T> class tuple_element; 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>&) noexcept; -template <int I, class T, size_t N> const T& get(const array<T, N>&) noexcept; -template <int I, class T, size_t N> T&& get(array<T, N>&&) noexcept; +template <int I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in C++14 +template <int I, class T, size_t N> const T& get(const array<T, N>&) noexcept; // constexpr in C++14 +template <int I, class T, size_t N> T&& get(array<T, N>&&) noexcept; // constexpr in C++14 } // std @@ -181,14 +181,14 @@ struct _LIBCPP_TYPE_VIS array // element access: _LIBCPP_INLINE_VISIBILITY reference operator[](size_type __n) {return __elems_[__n];} - _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const {return __elems_[__n];} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference operator[](size_type __n) const {return __elems_[__n];} reference at(size_type __n); - const_reference at(size_type __n) const; + _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const; _LIBCPP_INLINE_VISIBILITY reference front() {return __elems_[0];} - _LIBCPP_INLINE_VISIBILITY const_reference front() const {return __elems_[0];} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference front() const {return __elems_[0];} _LIBCPP_INLINE_VISIBILITY reference back() {return __elems_[_Size > 0 ? _Size-1 : 0];} - _LIBCPP_INLINE_VISIBILITY const_reference back() const {return __elems_[_Size > 0 ? _Size-1 : 0];} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const {return __elems_[_Size > 0 ? _Size-1 : 0];} _LIBCPP_INLINE_VISIBILITY value_type* data() _NOEXCEPT {return __elems_;} @@ -210,6 +210,7 @@ array<_Tp, _Size>::at(size_type __n) } template <class _Tp, size_t _Size> +_LIBCPP_CONSTEXPR_AFTER_CXX11 typename array<_Tp, _Size>::const_reference array<_Tp, _Size>::at(size_type __n) const { @@ -306,32 +307,32 @@ public: }; template <size_t _Ip, class _Tp, size_t _Size> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp& get(array<_Tp, _Size>& __a) _NOEXCEPT { static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array)"); - return __a[_Ip]; + return __a.__elems_[_Ip]; } template <size_t _Ip, class _Tp, size_t _Size> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Tp& get(const array<_Tp, _Size>& __a) _NOEXCEPT { static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array)"); - return __a[_Ip]; + return __a.__elems_[_Ip]; } #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <size_t _Ip, class _Tp, size_t _Size> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp&& get(array<_Tp, _Size>&& __a) _NOEXCEPT { static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)"); - return _VSTD::move(__a[_Ip]); + return _VSTD::move(__a.__elems_[_Ip]); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES |