diff options
author | Eric Fiselier <eric@efcs.ca> | 2015-12-18 00:36:55 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2015-12-18 00:36:55 +0000 |
commit | 199bee0ea7750b8e96a25414c3c2a7b465336e36 (patch) | |
tree | 2cc65dae158a70aaf6aee6b02af5afe811ae43ba /include/__tuple | |
parent | 85df7a8775ed9f36a397c219ed24759981d71e69 (diff) |
[libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@255941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/__tuple')
-rw-r--r-- | include/__tuple | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/__tuple b/include/__tuple index 57581e842..8c3175977 100644 --- a/include/__tuple +++ b/include/__tuple @@ -86,6 +86,11 @@ template <size_t _Ip, class ..._Tp> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename tuple_element<_Ip, tuple<_Tp...> >::type&& get(tuple<_Tp...>&&) _NOEXCEPT; + +template <size_t _Ip, class ..._Tp> +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +const typename tuple_element<_Ip, tuple<_Tp...> >::type&& +get(const tuple<_Tp...>&&) _NOEXCEPT; #endif // pair specializations @@ -109,6 +114,11 @@ template <size_t _Ip, class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&&) _NOEXCEPT; + +template <size_t _Ip, class _T1, class _T2> +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +const typename tuple_element<_Ip, pair<_T1, _T2> >::type&& +get(const pair<_T1, _T2>&&) _NOEXCEPT; #endif // array specializations @@ -132,6 +142,11 @@ template <size_t _Ip, class _Tp, size_t _Size> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT; + +template <size_t _Ip, class _Tp, size_t _Size> +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 +const _Tp&& +get(const array<_Tp, _Size>&&) _NOEXCEPT; #endif #if !defined(_LIBCPP_HAS_NO_VARIADICS) |