mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Upgrade to 2022-era LLVM LIBCXX
This commit is contained in:
parent
2f4ca71f26
commit
8e68384e15
2078 changed files with 165657 additions and 65010 deletions
29
third_party/libcxx/initializer_list
vendored
29
third_party/libcxx/initializer_list
vendored
|
@ -1,5 +1,5 @@
|
|||
// -*- C++ -*-
|
||||
//===----------------------- initializer_list -----------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
|
@ -42,11 +42,12 @@ template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in
|
|||
|
||||
*/
|
||||
|
||||
#include "third_party/libcxx/__config"
|
||||
#include "third_party/libcxx/cstddef"
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
namespace std // purposefully not versioned
|
||||
|
@ -61,7 +62,7 @@ class _LIBCPP_TEMPLATE_VIS initializer_list
|
|||
size_t __size_;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
|
||||
: __begin_(__b),
|
||||
__size_(__s)
|
||||
|
@ -76,25 +77,25 @@ public:
|
|||
typedef const _Ep* const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
size_t size() const _NOEXCEPT {return __size_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep* begin() const _NOEXCEPT {return __begin_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep* end() const _NOEXCEPT {return __begin_ + __size_;}
|
||||
};
|
||||
|
||||
template<class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep*
|
||||
begin(initializer_list<_Ep> __il) _NOEXCEPT
|
||||
{
|
||||
|
@ -103,15 +104,15 @@ begin(initializer_list<_Ep> __il) _NOEXCEPT
|
|||
|
||||
template<class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_LIBCPP_CONSTEXPR_SINCE_CXX14
|
||||
const _Ep*
|
||||
end(initializer_list<_Ep> __il) _NOEXCEPT
|
||||
{
|
||||
return __il.end();
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
} // std
|
||||
} // namespace std
|
||||
|
||||
#endif // _LIBCPP_INITIALIZER_LIST
|
||||
#endif // _LIBCPP_INITIALIZER_LIST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue