diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2013-07-17 22:25:36 +0400 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2013-07-17 22:25:36 +0400 |
commit | 8bf1f08a2cea3d28e173555c11bfab59dd16b231 (patch) | |
tree | 37c1f9b79dd01398a31d9b0d0b477ebc8581c41f /libcxx/include/utility | |
parent | 39655749295f739a5dc51cbe5a5e541485ba2a5b (diff) |
Make std::get constexpr
llvm-svn: 186525
Diffstat (limited to 'libcxx/include/utility')
-rw-r--r-- | libcxx/include/utility | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility index 2d2670d6924e..d36cf9dd7661 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -107,15 +107,15 @@ template <class T1, class T2> struct tuple_element<1, 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>&) noexcept; + get(std::pair<T1, T2>&) noexcept; // constexpr in C++14 template<size_t I, class T1, class T2> const typename const tuple_element<I, std::pair<T1, T2> >::type& - get(const std::pair<T1, T2>&) noexcept; + get(const std::pair<T1, T2>&) noexcept; // constexpr in C++14 template<size_t I, class T1, class T2> typename tuple_element<I, std::pair<T1, T2> >::type&& - get(std::pair<T1, T2>&&) noexcept; + get(std::pair<T1, T2>&&) noexcept; // constexpr in C++14 template<class T1, class T2> constexpr T1& get(std::pair<T1, T2>&) noexcept; // C++14 @@ -546,13 +546,13 @@ struct __get_pair<0> { template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T1& get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;} template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _T1& get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;} @@ -560,7 +560,7 @@ struct __get_pair<0> template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T1&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T1>(__p.first);} @@ -572,13 +572,13 @@ struct __get_pair<1> { template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T2& get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;} template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _T2& get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;} @@ -586,7 +586,7 @@ struct __get_pair<1> template <class _T1, class _T2> static - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T2&& get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T2>(__p.second);} @@ -594,7 +594,7 @@ struct __get_pair<1> }; template <size_t _Ip, class _T1, class _T2> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(pair<_T1, _T2>& __p) _NOEXCEPT { @@ -602,7 +602,7 @@ get(pair<_T1, _T2>& __p) _NOEXCEPT } template <size_t _Ip, class _T1, class _T2> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(const pair<_T1, _T2>& __p) _NOEXCEPT { @@ -612,7 +612,7 @@ get(const pair<_T1, _T2>& __p) _NOEXCEPT #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <size_t _Ip, class _T1, class _T2> -_LIBCPP_INLINE_VISIBILITY inline +_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR_AFTER_CXX11 typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&& __p) _NOEXCEPT { |