mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Release Cosmopolitan v3.6.0
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
This commit is contained in:
parent
62ace3623a
commit
5660ec4741
1585 changed files with 117353 additions and 271644 deletions
70
third_party/libcxx/initializer_list
vendored
70
third_party/libcxx/initializer_list
vendored
|
@ -42,7 +42,6 @@ template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in
|
|||
|
||||
*/
|
||||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
|
||||
|
@ -50,65 +49,46 @@ template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
namespace std // purposefully not versioned
|
||||
namespace std // purposefully not versioned
|
||||
{
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template<class _Ep>
|
||||
class _LIBCPP_TEMPLATE_VIS initializer_list
|
||||
{
|
||||
const _Ep* __begin_;
|
||||
size_t __size_;
|
||||
template <class _Ep>
|
||||
class _LIBCPP_TEMPLATE_VIS initializer_list {
|
||||
const _Ep* __begin_;
|
||||
size_t __size_;
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
|
||||
: __begin_(__b),
|
||||
__size_(__s) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
|
||||
: __begin_(__b),
|
||||
__size_(__s)
|
||||
{}
|
||||
public:
|
||||
typedef _Ep value_type;
|
||||
typedef const _Ep& reference;
|
||||
typedef const _Ep& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef _Ep value_type;
|
||||
typedef const _Ep& reference;
|
||||
typedef const _Ep& const_reference;
|
||||
typedef size_t size_type;
|
||||
|
||||
typedef const _Ep* iterator;
|
||||
typedef const _Ep* const_iterator;
|
||||
typedef const _Ep* iterator;
|
||||
typedef const _Ep* const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
size_t size() const _NOEXCEPT {return __size_;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 size_t size() const _NOEXCEPT { return __size_; }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep* begin() const _NOEXCEPT {return __begin_;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* begin() const _NOEXCEPT { return __begin_; }
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* end() const _NOEXCEPT { return __begin_ + __size_; }
|
||||
};
|
||||
|
||||
template<class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep*
|
||||
begin(initializer_list<_Ep> __il) _NOEXCEPT
|
||||
{
|
||||
return __il.begin();
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* begin(initializer_list<_Ep> __il) _NOEXCEPT {
|
||||
return __il.begin();
|
||||
}
|
||||
|
||||
template<class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep*
|
||||
end(initializer_list<_Ep> __il) _NOEXCEPT
|
||||
{
|
||||
return __il.end();
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Ep* end(initializer_list<_Ep> __il) _NOEXCEPT {
|
||||
return __il.end();
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue