diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:03 +0000 |
| commit | c9157d925c489f07ba9c0b2ce47e5149b75969a5 (patch) | |
| tree | 08bc4a3d9cad3f9ebffa558ddf140b9d9257b219 /contrib/llvm-project/libcxx/include/__iterator/access.h | |
| parent | 2a66844f606a35d68ad8a8061f4bea204274b3bc (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__iterator/access.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__iterator/access.h | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/contrib/llvm-project/libcxx/include/__iterator/access.h b/contrib/llvm-project/libcxx/include/__iterator/access.h index d7bcb3378d56..3ab3955e12a5 100644 --- a/contrib/llvm-project/libcxx/include/__iterator/access.h +++ b/contrib/llvm-project/libcxx/include/__iterator/access.h @@ -20,25 +20,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _Tp, size_t _Np> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 -_Tp* -begin(_Tp (&__array)[_Np]) -{ - return __array; +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT { + return __array; } template <class _Tp, size_t _Np> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 -_Tp* -end(_Tp (&__array)[_Np]) -{ - return __array + _Np; +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT { + return __array + _Np; } #if !defined(_LIBCPP_CXX03_LANG) template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(_Cp& __c) -> decltype(__c.begin()) { @@ -46,7 +40,7 @@ begin(_Cp& __c) -> decltype(__c.begin()) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(const _Cp& __c) -> decltype(__c.begin()) { @@ -54,7 +48,7 @@ begin(const _Cp& __c) -> decltype(__c.begin()) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(_Cp& __c) -> decltype(__c.end()) { @@ -62,7 +56,7 @@ end(_Cp& __c) -> decltype(__c.end()) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17 +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(const _Cp& __c) -> decltype(__c.end()) { @@ -72,17 +66,14 @@ end(const _Cp& __c) -> decltype(__c.end()) #if _LIBCPP_STD_VER >= 14 template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 -auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c)) -{ - return _VSTD::begin(__c); +_LIBCPP_HIDE_FROM_ABI constexpr auto cbegin(const _Cp& __c) noexcept(noexcept(std::begin(__c))) + -> decltype(std::begin(__c)) { + return std::begin(__c); } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14 -auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c)) -{ - return _VSTD::end(__c); +_LIBCPP_HIDE_FROM_ABI constexpr auto cend(const _Cp& __c) noexcept(noexcept(std::end(__c))) -> decltype(std::end(__c)) { + return std::end(__c); } #endif @@ -91,7 +82,7 @@ auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c)) #else // defined(_LIBCPP_CXX03_LANG) template <class _Cp> -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_HIDE_FROM_ABI typename _Cp::iterator begin(_Cp& __c) { @@ -99,7 +90,7 @@ begin(_Cp& __c) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator begin(const _Cp& __c) { @@ -107,7 +98,7 @@ begin(const _Cp& __c) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_HIDE_FROM_ABI typename _Cp::iterator end(_Cp& __c) { @@ -115,7 +106,7 @@ end(_Cp& __c) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator end(const _Cp& __c) { |
