diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-02-19 17:53:30 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-02-19 17:53:30 +0000 |
| commit | 6c3f5ffbb8fea9f49d2aa2c3b7ee6e38bd877c98 (patch) | |
| tree | 9d899673dd353c6b0f44ed93cb3fae3bda42eadb /libcxx/include/iterator | |
| parent | 94008121fafecdf89f83a63249496e185bc9cd77 (diff) | |
| download | bcm5719-llvm-6c3f5ffbb8fea9f49d2aa2c3b7ee6e38bd877c98.tar.gz bcm5719-llvm-6c3f5ffbb8fea9f49d2aa2c3b7ee6e38bd877c98.zip | |
Implement LWG Issue: 2280. begin/end for arrays should be constexpr and noexcept, plus a drive-by fix for cbegin/cend suggested by Peter Sommerlad.
llvm-svn: 201703
Diffstat (limited to 'libcxx/include/iterator')
| -rw-r--r-- | libcxx/include/iterator | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/iterator b/libcxx/include/iterator index c6dd03340a7..28a946cb936 100644 --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -1386,7 +1386,7 @@ operator+(typename __wrap_iter<_Iter>::difference_type __n, } template <class _Tp, size_t _Np> -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp* begin(_Tp (&__array)[_Np]) { @@ -1394,7 +1394,7 @@ begin(_Tp (&__array)[_Np]) } template <class _Tp, size_t _Np> -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp* end(_Tp (&__array)[_Np]) { @@ -1466,17 +1466,17 @@ reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il) } template <class _Cp> -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 auto cbegin(const _Cp& __c) -> decltype(begin(__c)) { - return _VSTD::begin(__c); + return begin(__c); } template <class _Cp> -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 auto cend(const _Cp& __c) -> decltype(end(__c)) { - return _VSTD::end(__c); + return end(__c); } template <class _Cp> |

