diff options
Diffstat (limited to 'system/include/libcxx/initializer_list')
-rw-r--r-- | system/include/libcxx/initializer_list | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/system/include/libcxx/initializer_list b/system/include/libcxx/initializer_list index 181313d1..663e49b6 100644 --- a/system/include/libcxx/initializer_list +++ b/system/include/libcxx/initializer_list @@ -29,15 +29,15 @@ public: typedef const E* iterator; typedef const E* const_iterator; - initializer_list() noexcept; + initializer_list() noexcept; // constexpr in C++14 - size_t size() const noexcept; - const E* begin() const noexcept; - const E* end() const noexcept; + size_t size() const noexcept; // constexpr in C++14 + const E* begin() const noexcept; // constexpr in C++14 + const E* end() const noexcept; // constexpr in C++14 }; -template<class E> const E* begin(initializer_list<E> il) noexcept; -template<class E> const E* end(initializer_list<E> il) noexcept; +template<class E> const E* begin(initializer_list<E> il) noexcept; // constexpr in C++14 +template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14 } // std @@ -56,12 +56,13 @@ namespace std // purposefully not versioned #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template<class _Ep> -class _LIBCPP_TYPE_VIS initializer_list +class _LIBCPP_TYPE_VIS_ONLY initializer_list { const _Ep* __begin_; size_t __size_; _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR_AFTER_CXX11 initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT : __begin_(__b), __size_(__s) @@ -75,15 +76,26 @@ public: typedef const _Ep* iterator; typedef const _Ep* const_iterator; - _LIBCPP_ALWAYS_INLINE initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {} + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR_AFTER_CXX11 + initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {} - _LIBCPP_ALWAYS_INLINE size_t size() const _NOEXCEPT {return __size_;} - _LIBCPP_ALWAYS_INLINE const _Ep* begin() const _NOEXCEPT {return __begin_;} - _LIBCPP_ALWAYS_INLINE const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;} + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR_AFTER_CXX11 + size_t size() const _NOEXCEPT {return __size_;} + + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR_AFTER_CXX11 + const _Ep* begin() const _NOEXCEPT {return __begin_;} + + _LIBCPP_ALWAYS_INLINE + _LIBCPP_CONSTEXPR_AFTER_CXX11 + const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;} }; template<class _Ep> inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR_AFTER_CXX11 const _Ep* begin(initializer_list<_Ep> __il) _NOEXCEPT { @@ -92,6 +104,7 @@ begin(initializer_list<_Ep> __il) _NOEXCEPT template<class _Ep> inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_CONSTEXPR_AFTER_CXX11 const _Ep* end(initializer_list<_Ep> __il) _NOEXCEPT { |