mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 15:38:22 +00:00
Delete redundant libcxx files
This commit is contained in:
parent
868af3f950
commit
e2e0b042c1
23 changed files with 0 additions and 22773 deletions
1281
third_party/libcxx.bak/__bit_reference
vendored
1281
third_party/libcxx.bak/__bit_reference
vendored
File diff suppressed because it is too large
Load diff
1484
third_party/libcxx.bak/__config
vendored
1484
third_party/libcxx.bak/__config
vendored
File diff suppressed because it is too large
Load diff
280
third_party/libcxx.bak/__debug
vendored
280
third_party/libcxx.bak/__debug
vendored
|
@ -1,280 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- __debug ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_DEBUG_H
|
||||
#define _LIBCPP_DEBUG_H
|
||||
|
||||
#include <__config>
|
||||
#include <iosfwd>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_NULLPTR)
|
||||
# include <cstddef>
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY)
|
||||
# include <cstdlib>
|
||||
# include <cstdio>
|
||||
# include <cstddef>
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT)
|
||||
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : \
|
||||
_VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 2
|
||||
#ifndef _LIBCPP_DEBUG_ASSERT
|
||||
#define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(x, m)
|
||||
#endif
|
||||
#define _LIBCPP_DEBUG_MODE(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_ASSERT
|
||||
# define _LIBCPP_ASSERT(x, m) ((void)0)
|
||||
#endif
|
||||
#ifndef _LIBCPP_DEBUG_ASSERT
|
||||
# define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0)
|
||||
#endif
|
||||
#ifndef _LIBCPP_DEBUG_MODE
|
||||
#define _LIBCPP_DEBUG_MODE(...) ((void)0)
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
__libcpp_debug_info()
|
||||
: __file_(nullptr), __line_(-1), __pred_(nullptr), __msg_(nullptr) {}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
__libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m)
|
||||
: __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {}
|
||||
|
||||
_LIBCPP_FUNC_VIS std::string what() const;
|
||||
|
||||
const char* __file_;
|
||||
int __line_;
|
||||
const char* __pred_;
|
||||
const char* __msg_;
|
||||
};
|
||||
|
||||
/// __libcpp_debug_function_type - The type of the assertion failure handler.
|
||||
typedef void(*__libcpp_debug_function_type)(__libcpp_debug_info const&);
|
||||
|
||||
/// __libcpp_debug_function - The handler function called when a _LIBCPP_ASSERT
|
||||
/// fails.
|
||||
extern _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_function_type __libcpp_debug_function;
|
||||
|
||||
/// __libcpp_abort_debug_function - A debug handler that aborts when called.
|
||||
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
|
||||
void __libcpp_abort_debug_function(__libcpp_debug_info const&);
|
||||
|
||||
/// __libcpp_set_debug_function - Set the debug handler to the specified
|
||||
/// function.
|
||||
_LIBCPP_FUNC_VIS
|
||||
bool __libcpp_set_debug_function(__libcpp_debug_function_type __func);
|
||||
|
||||
#if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY)
|
||||
|
||||
struct _LIBCPP_TYPE_VIS __c_node;
|
||||
|
||||
struct _LIBCPP_TYPE_VIS __i_node
|
||||
{
|
||||
void* __i_;
|
||||
__i_node* __next_;
|
||||
__c_node* __c_;
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
__i_node(const __i_node&) = delete;
|
||||
__i_node& operator=(const __i_node&) = delete;
|
||||
#else
|
||||
private:
|
||||
__i_node(const __i_node&);
|
||||
__i_node& operator=(const __i_node&);
|
||||
public:
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__i_node(void* __i, __i_node* __next, __c_node* __c)
|
||||
: __i_(__i), __next_(__next), __c_(__c) {}
|
||||
~__i_node();
|
||||
};
|
||||
|
||||
struct _LIBCPP_TYPE_VIS __c_node
|
||||
{
|
||||
void* __c_;
|
||||
__c_node* __next_;
|
||||
__i_node** beg_;
|
||||
__i_node** end_;
|
||||
__i_node** cap_;
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
__c_node(const __c_node&) = delete;
|
||||
__c_node& operator=(const __c_node&) = delete;
|
||||
#else
|
||||
private:
|
||||
__c_node(const __c_node&);
|
||||
__c_node& operator=(const __c_node&);
|
||||
public:
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__c_node(void* __c, __c_node* __next)
|
||||
: __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
|
||||
virtual ~__c_node();
|
||||
|
||||
virtual bool __dereferenceable(const void*) const = 0;
|
||||
virtual bool __decrementable(const void*) const = 0;
|
||||
virtual bool __addable(const void*, ptrdiff_t) const = 0;
|
||||
virtual bool __subscriptable(const void*, ptrdiff_t) const = 0;
|
||||
|
||||
void __add(__i_node* __i);
|
||||
_LIBCPP_HIDDEN void __remove(__i_node* __i);
|
||||
};
|
||||
|
||||
template <class _Cont>
|
||||
struct _C_node
|
||||
: public __c_node
|
||||
{
|
||||
_C_node(void* __c, __c_node* __n)
|
||||
: __c_node(__c, __n) {}
|
||||
|
||||
virtual bool __dereferenceable(const void*) const;
|
||||
virtual bool __decrementable(const void*) const;
|
||||
virtual bool __addable(const void*, ptrdiff_t) const;
|
||||
virtual bool __subscriptable(const void*, ptrdiff_t) const;
|
||||
};
|
||||
|
||||
template <class _Cont>
|
||||
inline bool
|
||||
_C_node<_Cont>::__dereferenceable(const void* __i) const
|
||||
{
|
||||
typedef typename _Cont::const_iterator iterator;
|
||||
const iterator* __j = static_cast<const iterator*>(__i);
|
||||
_Cont* _Cp = static_cast<_Cont*>(__c_);
|
||||
return _Cp->__dereferenceable(__j);
|
||||
}
|
||||
|
||||
template <class _Cont>
|
||||
inline bool
|
||||
_C_node<_Cont>::__decrementable(const void* __i) const
|
||||
{
|
||||
typedef typename _Cont::const_iterator iterator;
|
||||
const iterator* __j = static_cast<const iterator*>(__i);
|
||||
_Cont* _Cp = static_cast<_Cont*>(__c_);
|
||||
return _Cp->__decrementable(__j);
|
||||
}
|
||||
|
||||
template <class _Cont>
|
||||
inline bool
|
||||
_C_node<_Cont>::__addable(const void* __i, ptrdiff_t __n) const
|
||||
{
|
||||
typedef typename _Cont::const_iterator iterator;
|
||||
const iterator* __j = static_cast<const iterator*>(__i);
|
||||
_Cont* _Cp = static_cast<_Cont*>(__c_);
|
||||
return _Cp->__addable(__j, __n);
|
||||
}
|
||||
|
||||
template <class _Cont>
|
||||
inline bool
|
||||
_C_node<_Cont>::__subscriptable(const void* __i, ptrdiff_t __n) const
|
||||
{
|
||||
typedef typename _Cont::const_iterator iterator;
|
||||
const iterator* __j = static_cast<const iterator*>(__i);
|
||||
_Cont* _Cp = static_cast<_Cont*>(__c_);
|
||||
return _Cp->__subscriptable(__j, __n);
|
||||
}
|
||||
|
||||
class _LIBCPP_TYPE_VIS __libcpp_db
|
||||
{
|
||||
__c_node** __cbeg_;
|
||||
__c_node** __cend_;
|
||||
size_t __csz_;
|
||||
__i_node** __ibeg_;
|
||||
__i_node** __iend_;
|
||||
size_t __isz_;
|
||||
|
||||
__libcpp_db();
|
||||
public:
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
__libcpp_db(const __libcpp_db&) = delete;
|
||||
__libcpp_db& operator=(const __libcpp_db&) = delete;
|
||||
#else
|
||||
private:
|
||||
__libcpp_db(const __libcpp_db&);
|
||||
__libcpp_db& operator=(const __libcpp_db&);
|
||||
public:
|
||||
#endif
|
||||
~__libcpp_db();
|
||||
|
||||
class __db_c_iterator;
|
||||
class __db_c_const_iterator;
|
||||
class __db_i_iterator;
|
||||
class __db_i_const_iterator;
|
||||
|
||||
__db_c_const_iterator __c_end() const;
|
||||
__db_i_const_iterator __i_end() const;
|
||||
|
||||
typedef __c_node*(_InsertConstruct)(void*, void*, __c_node*);
|
||||
|
||||
template <class _Cont>
|
||||
_LIBCPP_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) {
|
||||
return ::new(__mem) _C_node<_Cont>(__c, __next);
|
||||
}
|
||||
|
||||
template <class _Cont>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __insert_c(_Cont* __c)
|
||||
{
|
||||
__insert_c(static_cast<void*>(__c), &__create_C_node<_Cont>);
|
||||
}
|
||||
|
||||
void __insert_i(void* __i);
|
||||
void __insert_c(void* __c, _InsertConstruct* __fn);
|
||||
void __erase_c(void* __c);
|
||||
|
||||
void __insert_ic(void* __i, const void* __c);
|
||||
void __iterator_copy(void* __i, const void* __i0);
|
||||
void __erase_i(void* __i);
|
||||
|
||||
void* __find_c_from_i(void* __i) const;
|
||||
void __invalidate_all(void* __c);
|
||||
__c_node* __find_c_and_lock(void* __c) const;
|
||||
__c_node* __find_c(void* __c) const;
|
||||
void unlock() const;
|
||||
|
||||
void swap(void* __c1, void* __c2);
|
||||
|
||||
|
||||
bool __dereferenceable(const void* __i) const;
|
||||
bool __decrementable(const void* __i) const;
|
||||
bool __addable(const void* __i, ptrdiff_t __n) const;
|
||||
bool __subscriptable(const void* __i, ptrdiff_t __n) const;
|
||||
bool __less_than_comparable(const void* __i, const void* __j) const;
|
||||
private:
|
||||
_LIBCPP_HIDDEN
|
||||
__i_node* __insert_iterator(void* __i);
|
||||
_LIBCPP_HIDDEN
|
||||
__i_node* __find_iterator(const void* __i) const;
|
||||
|
||||
friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db();
|
||||
};
|
||||
|
||||
_LIBCPP_FUNC_VIS __libcpp_db* __get_db();
|
||||
_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db();
|
||||
|
||||
|
||||
#endif // _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_DEBUG_H
|
||||
|
653
third_party/libcxx.bak/__functional_base
vendored
653
third_party/libcxx.bak/__functional_base
vendored
|
@ -1,653 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_FUNCTIONAL_BASE
|
||||
#define _LIBCPP_FUNCTIONAL_BASE
|
||||
|
||||
#include <__config>
|
||||
#include <type_traits>
|
||||
#include <typeinfo>
|
||||
#include <exception>
|
||||
#include <new>
|
||||
#include <utility>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Arg1, class _Arg2, class _Result>
|
||||
struct _LIBCPP_TEMPLATE_VIS binary_function
|
||||
{
|
||||
typedef _Arg1 first_argument_type;
|
||||
typedef _Arg2 second_argument_type;
|
||||
typedef _Result result_type;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __has_result_type
|
||||
{
|
||||
private:
|
||||
struct __two {char __lx; char __lxx;};
|
||||
template <class _Up> static __two __test(...);
|
||||
template <class _Up> static char __test(typename _Up::result_type* = 0);
|
||||
public:
|
||||
static const bool value = sizeof(__test<_Tp>(0)) == 1;
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <class _Tp = void>
|
||||
#else
|
||||
template <class _Tp>
|
||||
#endif
|
||||
struct _LIBCPP_TEMPLATE_VIS less : binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
||||
bool operator()(const _Tp& __x, const _Tp& __y) const
|
||||
{return __x < __y;}
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <>
|
||||
struct _LIBCPP_TEMPLATE_VIS less<void>
|
||||
{
|
||||
template <class _T1, class _T2>
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
|
||||
auto operator()(_T1&& __t, _T2&& __u) const
|
||||
_NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
|
||||
-> decltype (_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
|
||||
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
|
||||
typedef void is_transparent;
|
||||
};
|
||||
#endif
|
||||
|
||||
// __weak_result_type
|
||||
|
||||
template <class _Tp>
|
||||
struct __derives_from_unary_function
|
||||
{
|
||||
private:
|
||||
struct __two {char __lx; char __lxx;};
|
||||
static __two __test(...);
|
||||
template <class _Ap, class _Rp>
|
||||
static unary_function<_Ap, _Rp>
|
||||
__test(const volatile unary_function<_Ap, _Rp>*);
|
||||
public:
|
||||
static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
|
||||
typedef decltype(__test((_Tp*)0)) type;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __derives_from_binary_function
|
||||
{
|
||||
private:
|
||||
struct __two {char __lx; char __lxx;};
|
||||
static __two __test(...);
|
||||
template <class _A1, class _A2, class _Rp>
|
||||
static binary_function<_A1, _A2, _Rp>
|
||||
__test(const volatile binary_function<_A1, _A2, _Rp>*);
|
||||
public:
|
||||
static const bool value = !is_same<decltype(__test((_Tp*)0)), __two>::value;
|
||||
typedef decltype(__test((_Tp*)0)) type;
|
||||
};
|
||||
|
||||
template <class _Tp, bool = __derives_from_unary_function<_Tp>::value>
|
||||
struct __maybe_derive_from_unary_function // bool is true
|
||||
: public __derives_from_unary_function<_Tp>::type
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __maybe_derive_from_unary_function<_Tp, false>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp, bool = __derives_from_binary_function<_Tp>::value>
|
||||
struct __maybe_derive_from_binary_function // bool is true
|
||||
: public __derives_from_binary_function<_Tp>::type
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __maybe_derive_from_binary_function<_Tp, false>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp, bool = __has_result_type<_Tp>::value>
|
||||
struct __weak_result_type_imp // bool is true
|
||||
: public __maybe_derive_from_unary_function<_Tp>,
|
||||
public __maybe_derive_from_binary_function<_Tp>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename _Tp::result_type result_type;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __weak_result_type_imp<_Tp, false>
|
||||
: public __maybe_derive_from_unary_function<_Tp>,
|
||||
public __maybe_derive_from_binary_function<_Tp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
struct __weak_result_type
|
||||
: public __weak_result_type_imp<_Tp>
|
||||
{
|
||||
};
|
||||
|
||||
// 0 argument case
|
||||
|
||||
template <class _Rp>
|
||||
struct __weak_result_type<_Rp ()>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp>
|
||||
struct __weak_result_type<_Rp (&)()>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp>
|
||||
struct __weak_result_type<_Rp (*)()>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||
};
|
||||
|
||||
// 1 argument case
|
||||
|
||||
template <class _Rp, class _A1>
|
||||
struct __weak_result_type<_Rp (_A1)>
|
||||
: public unary_function<_A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1>
|
||||
struct __weak_result_type<_Rp (&)(_A1)>
|
||||
: public unary_function<_A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1>
|
||||
struct __weak_result_type<_Rp (*)(_A1)>
|
||||
: public unary_function<_A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp>
|
||||
struct __weak_result_type<_Rp (_Cp::*)()>
|
||||
: public unary_function<_Cp*, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp>
|
||||
struct __weak_result_type<_Rp (_Cp::*)() const>
|
||||
: public unary_function<const _Cp*, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp>
|
||||
struct __weak_result_type<_Rp (_Cp::*)() volatile>
|
||||
: public unary_function<volatile _Cp*, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp>
|
||||
struct __weak_result_type<_Rp (_Cp::*)() const volatile>
|
||||
: public unary_function<const volatile _Cp*, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
// 2 argument case
|
||||
|
||||
template <class _Rp, class _A1, class _A2>
|
||||
struct __weak_result_type<_Rp (_A1, _A2)>
|
||||
: public binary_function<_A1, _A2, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1, class _A2>
|
||||
struct __weak_result_type<_Rp (*)(_A1, _A2)>
|
||||
: public binary_function<_A1, _A2, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1, class _A2>
|
||||
struct __weak_result_type<_Rp (&)(_A1, _A2)>
|
||||
: public binary_function<_A1, _A2, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1)>
|
||||
: public binary_function<_Cp*, _A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1) const>
|
||||
: public binary_function<const _Cp*, _A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1) volatile>
|
||||
: public binary_function<volatile _Cp*, _A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile>
|
||||
: public binary_function<const volatile _Cp*, _A1, _Rp>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
// 3 or more arguments
|
||||
|
||||
template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
|
||||
struct __weak_result_type<_Rp (_A1, _A2, _A3, _A4...)>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
|
||||
struct __weak_result_type<_Rp (&)(_A1, _A2, _A3, _A4...)>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
|
||||
struct __weak_result_type<_Rp (*)(_A1, _A2, _A3, _A4...)>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...)>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) volatile>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
|
||||
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
|
||||
{
|
||||
typedef _Rp result_type;
|
||||
};
|
||||
|
||||
template <class _Tp, class ..._Args>
|
||||
struct __invoke_return
|
||||
{
|
||||
typedef decltype(__invoke(_VSTD::declval<_Tp>(), _VSTD::declval<_Args>()...)) type;
|
||||
};
|
||||
|
||||
#else // defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
#include <__functional_base_03>
|
||||
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
|
||||
template <class _Ret>
|
||||
struct __invoke_void_return_wrapper
|
||||
{
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <class ..._Args>
|
||||
static _Ret __call(_Args&&... __args) {
|
||||
return __invoke(_VSTD::forward<_Args>(__args)...);
|
||||
}
|
||||
#else
|
||||
template <class _Fn>
|
||||
static _Ret __call(_Fn __f) {
|
||||
return __invoke(__f);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0>
|
||||
static _Ret __call(_Fn __f, _A0& __a0) {
|
||||
return __invoke(__f, __a0);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0, class _A1>
|
||||
static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1) {
|
||||
return __invoke(__f, __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0, class _A1, class _A2>
|
||||
static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2){
|
||||
return __invoke(__f, __a0, __a1, __a2);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <>
|
||||
struct __invoke_void_return_wrapper<void>
|
||||
{
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <class ..._Args>
|
||||
static void __call(_Args&&... __args) {
|
||||
__invoke(_VSTD::forward<_Args>(__args)...);
|
||||
}
|
||||
#else
|
||||
template <class _Fn>
|
||||
static void __call(_Fn __f) {
|
||||
__invoke(__f);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0>
|
||||
static void __call(_Fn __f, _A0& __a0) {
|
||||
__invoke(__f, __a0);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0, class _A1>
|
||||
static void __call(_Fn __f, _A0& __a0, _A1& __a1) {
|
||||
__invoke(__f, __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _Fn, class _A0, class _A1, class _A2>
|
||||
static void __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2) {
|
||||
__invoke(__f, __a0, __a1, __a2);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS reference_wrapper
|
||||
: public __weak_result_type<_Tp>
|
||||
{
|
||||
public:
|
||||
// types
|
||||
typedef _Tp type;
|
||||
private:
|
||||
type* __f_;
|
||||
|
||||
public:
|
||||
// construct/copy/destroy
|
||||
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
|
||||
: __f_(_VSTD::addressof(__f)) {}
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
|
||||
#endif
|
||||
|
||||
// access
|
||||
_LIBCPP_INLINE_VISIBILITY operator type& () const _NOEXCEPT {return *__f_;}
|
||||
_LIBCPP_INLINE_VISIBILITY type& get() const _NOEXCEPT {return *__f_;}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
// invoke
|
||||
template <class... _ArgTypes>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_of<type&, _ArgTypes...>::type
|
||||
operator() (_ArgTypes&&... __args) const {
|
||||
return __invoke(get(), _VSTD::forward<_ArgTypes>(__args)...);
|
||||
}
|
||||
#else
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return<type>::type
|
||||
operator() () const {
|
||||
return __invoke(get());
|
||||
}
|
||||
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return0<type, _A0>::type
|
||||
operator() (_A0& __a0) const {
|
||||
return __invoke(get(), __a0);
|
||||
}
|
||||
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return0<type, _A0 const>::type
|
||||
operator() (_A0 const& __a0) const {
|
||||
return __invoke(get(), __a0);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return1<type, _A0, _A1>::type
|
||||
operator() (_A0& __a0, _A1& __a1) const {
|
||||
return __invoke(get(), __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return1<type, _A0 const, _A1>::type
|
||||
operator() (_A0 const& __a0, _A1& __a1) const {
|
||||
return __invoke(get(), __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return1<type, _A0, _A1 const>::type
|
||||
operator() (_A0& __a0, _A1 const& __a1) const {
|
||||
return __invoke(get(), __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return1<type, _A0 const, _A1 const>::type
|
||||
operator() (_A0 const& __a0, _A1 const& __a1) const {
|
||||
return __invoke(get(), __a0, __a1);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0, _A1, _A2>::type
|
||||
operator() (_A0& __a0, _A1& __a1, _A2& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0 const, _A1, _A2>::type
|
||||
operator() (_A0 const& __a0, _A1& __a1, _A2& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0, _A1 const, _A2>::type
|
||||
operator() (_A0& __a0, _A1 const& __a1, _A2& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0, _A1, _A2 const>::type
|
||||
operator() (_A0& __a0, _A1& __a1, _A2 const& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0 const, _A1 const, _A2>::type
|
||||
operator() (_A0 const& __a0, _A1 const& __a1, _A2& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0 const, _A1, _A2 const>::type
|
||||
operator() (_A0 const& __a0, _A1& __a1, _A2 const& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0, _A1 const, _A2 const>::type
|
||||
operator() (_A0& __a0, _A1 const& __a1, _A2 const& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
|
||||
template <class _A0, class _A1, class _A2>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename __invoke_return2<type, _A0 const, _A1 const, _A2 const>::type
|
||||
operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const {
|
||||
return __invoke(get(), __a0, __a1, __a2);
|
||||
}
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
};
|
||||
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reference_wrapper<_Tp>
|
||||
ref(_Tp& __t) _NOEXCEPT
|
||||
{
|
||||
return reference_wrapper<_Tp>(__t);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reference_wrapper<_Tp>
|
||||
ref(reference_wrapper<_Tp> __t) _NOEXCEPT
|
||||
{
|
||||
return ref(__t.get());
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reference_wrapper<const _Tp>
|
||||
cref(const _Tp& __t) _NOEXCEPT
|
||||
{
|
||||
return reference_wrapper<const _Tp>(__t);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reference_wrapper<const _Tp>
|
||||
cref(reference_wrapper<_Tp> __t) _NOEXCEPT
|
||||
{
|
||||
return cref(__t.get());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <class _Tp> void ref(const _Tp&&) = delete;
|
||||
template <class _Tp> void cref(const _Tp&&) = delete;
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <class _Tp, class, class = void>
|
||||
struct __is_transparent : false_type {};
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
struct __is_transparent<_Tp, _Up,
|
||||
typename __void_t<typename _Tp::is_transparent>::type>
|
||||
: true_type {};
|
||||
#endif
|
||||
|
||||
// allocator_arg_t
|
||||
|
||||
struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; };
|
||||
|
||||
#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
|
||||
extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg;
|
||||
#else
|
||||
/* _LIBCPP_INLINE_VAR */ constexpr allocator_arg_t allocator_arg = allocator_arg_t();
|
||||
#endif
|
||||
|
||||
// uses_allocator
|
||||
|
||||
template <class _Tp>
|
||||
struct __has_allocator_type
|
||||
{
|
||||
private:
|
||||
struct __two {char __lx; char __lxx;};
|
||||
template <class _Up> static __two __test(...);
|
||||
template <class _Up> static char __test(typename _Up::allocator_type* = 0);
|
||||
public:
|
||||
static const bool value = sizeof(__test<_Tp>(0)) == 1;
|
||||
};
|
||||
|
||||
template <class _Tp, class _Alloc, bool = __has_allocator_type<_Tp>::value>
|
||||
struct __uses_allocator
|
||||
: public integral_constant<bool,
|
||||
is_convertible<_Alloc, typename _Tp::allocator_type>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
struct __uses_allocator<_Tp, _Alloc, false>
|
||||
: public false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
struct _LIBCPP_TEMPLATE_VIS uses_allocator
|
||||
: public __uses_allocator<_Tp, _Alloc>
|
||||
{
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
template <class _Tp, class _Alloc>
|
||||
_LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
// allocator construction
|
||||
|
||||
template <class _Tp, class _Alloc, class ..._Args>
|
||||
struct __uses_alloc_ctor_imp
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename __uncvref<_Alloc>::type _RawAlloc;
|
||||
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
|
||||
static const bool __ic =
|
||||
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
|
||||
static const int value = __ua ? 2 - __ic : 0;
|
||||
};
|
||||
|
||||
template <class _Tp, class _Alloc, class ..._Args>
|
||||
struct __uses_alloc_ctor
|
||||
: integral_constant<int, __uses_alloc_ctor_imp<_Tp, _Alloc, _Args...>::value>
|
||||
{};
|
||||
|
||||
template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
// FIXME: This should have a version which takes a non-const alloc.
|
||||
template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
|
||||
}
|
||||
|
||||
// FIXME: This should have a version which takes a non-const alloc.
|
||||
template <class _Tp, class _Allocator, class... _Args>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
|
||||
{
|
||||
new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_FUNCTIONAL_BASE
|
645
third_party/libcxx.bak/__split_buffer
vendored
645
third_party/libcxx.bak/__split_buffer
vendored
|
@ -1,645 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
#ifndef _LIBCPP_SPLIT_BUFFER
|
||||
#define _LIBCPP_SPLIT_BUFFER
|
||||
|
||||
#include <__config>
|
||||
#include <type_traits>
|
||||
#include <algorithm>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <bool>
|
||||
class __split_buffer_common
|
||||
{
|
||||
protected:
|
||||
void __throw_length_error() const;
|
||||
void __throw_out_of_range() const;
|
||||
};
|
||||
|
||||
template <class _Tp, class _Allocator = allocator<_Tp> >
|
||||
struct __split_buffer
|
||||
: private __split_buffer_common<true>
|
||||
{
|
||||
private:
|
||||
__split_buffer(const __split_buffer&);
|
||||
__split_buffer& operator=(const __split_buffer&);
|
||||
public:
|
||||
typedef _Tp value_type;
|
||||
typedef _Allocator allocator_type;
|
||||
typedef typename remove_reference<allocator_type>::type __alloc_rr;
|
||||
typedef allocator_traits<__alloc_rr> __alloc_traits;
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
typedef typename __alloc_traits::size_type size_type;
|
||||
typedef typename __alloc_traits::difference_type difference_type;
|
||||
typedef typename __alloc_traits::pointer pointer;
|
||||
typedef typename __alloc_traits::const_pointer const_pointer;
|
||||
typedef pointer iterator;
|
||||
typedef const_pointer const_iterator;
|
||||
|
||||
pointer __first_;
|
||||
pointer __begin_;
|
||||
pointer __end_;
|
||||
__compressed_pair<pointer, allocator_type> __end_cap_;
|
||||
|
||||
typedef typename add_lvalue_reference<allocator_type>::type __alloc_ref;
|
||||
typedef typename add_lvalue_reference<allocator_type>::type __alloc_const_ref;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY __alloc_rr& __alloc() _NOEXCEPT {return __end_cap_.second();}
|
||||
_LIBCPP_INLINE_VISIBILITY const __alloc_rr& __alloc() const _NOEXCEPT {return __end_cap_.second();}
|
||||
_LIBCPP_INLINE_VISIBILITY pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();}
|
||||
_LIBCPP_INLINE_VISIBILITY const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
__split_buffer()
|
||||
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit __split_buffer(__alloc_rr& __a);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit __split_buffer(const __alloc_rr& __a);
|
||||
__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
|
||||
~__split_buffer();
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
__split_buffer(__split_buffer&& __c)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
|
||||
__split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
|
||||
__split_buffer& operator=(__split_buffer&& __c)
|
||||
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<allocator_type>::value) ||
|
||||
!__alloc_traits::propagate_on_container_move_assignment::value);
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY iterator end() _NOEXCEPT {return __end_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT {return __end_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void clear() _NOEXCEPT
|
||||
{__destruct_at_end(__begin_);}
|
||||
_LIBCPP_INLINE_VISIBILITY size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
|
||||
_LIBCPP_INLINE_VISIBILITY bool empty() const {return __end_ == __begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
|
||||
_LIBCPP_INLINE_VISIBILITY size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
|
||||
_LIBCPP_INLINE_VISIBILITY size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY reference front() {return *__begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference front() const {return *__begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY reference back() {return *(__end_ - 1);}
|
||||
_LIBCPP_INLINE_VISIBILITY const_reference back() const {return *(__end_ - 1);}
|
||||
|
||||
void reserve(size_type __n);
|
||||
void shrink_to_fit() _NOEXCEPT;
|
||||
void push_front(const_reference __x);
|
||||
_LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
void push_front(value_type&& __x);
|
||||
void push_back(value_type&& __x);
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
|
||||
|
||||
void __construct_at_end(size_type __n);
|
||||
void __construct_at_end(size_type __n, const_reference __x);
|
||||
template <class _InputIter>
|
||||
typename enable_if
|
||||
<
|
||||
__is_input_iterator<_InputIter>::value &&
|
||||
!__is_forward_iterator<_InputIter>::value,
|
||||
void
|
||||
>::type
|
||||
__construct_at_end(_InputIter __first, _InputIter __last);
|
||||
template <class _ForwardIterator>
|
||||
typename enable_if
|
||||
<
|
||||
__is_forward_iterator<_ForwardIterator>::value,
|
||||
void
|
||||
>::type
|
||||
__construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin)
|
||||
{__destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __destruct_at_begin(pointer __new_begin, false_type);
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __destruct_at_begin(pointer __new_begin, true_type);
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __destruct_at_end(pointer __new_last) _NOEXCEPT
|
||||
{__destruct_at_end(__new_last, false_type());}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
|
||||
|
||||
void swap(__split_buffer& __x)
|
||||
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
|
||||
__is_nothrow_swappable<__alloc_rr>::value);
|
||||
|
||||
bool __invariants() const;
|
||||
|
||||
private:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(__split_buffer& __c, true_type)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
|
||||
{
|
||||
__alloc() = _VSTD::move(__c.__alloc());
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT
|
||||
{}
|
||||
|
||||
struct _ConstructTransaction {
|
||||
explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
|
||||
: __pos_(*__p), __end_(*__p + __n), __dest_(__p) {
|
||||
}
|
||||
~_ConstructTransaction() {
|
||||
*__dest_ = __pos_;
|
||||
}
|
||||
pointer __pos_;
|
||||
const pointer __end_;
|
||||
private:
|
||||
pointer *__dest_;
|
||||
};
|
||||
};
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
bool
|
||||
__split_buffer<_Tp, _Allocator>::__invariants() const
|
||||
{
|
||||
if (__first_ == nullptr)
|
||||
{
|
||||
if (__begin_ != nullptr)
|
||||
return false;
|
||||
if (__end_ != nullptr)
|
||||
return false;
|
||||
if (__end_cap() != nullptr)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (__begin_ < __first_)
|
||||
return false;
|
||||
if (__end_ < __begin_)
|
||||
return false;
|
||||
if (__end_cap() < __end_)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Default constructs __n objects starting at __end_
|
||||
// throws if construction throws
|
||||
// Precondition: __n > 0
|
||||
// Precondition: size() + __n <= capacity()
|
||||
// Postcondition: size() == size() + __n
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
|
||||
{
|
||||
_ConstructTransaction __tx(&this->__end_, __n);
|
||||
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
|
||||
__alloc_traits::construct(this->__alloc(), _VSTD::__to_raw_pointer(__tx.__pos_));
|
||||
}
|
||||
}
|
||||
|
||||
// Copy constructs __n objects starting at __end_ from __x
|
||||
// throws if construction throws
|
||||
// Precondition: __n > 0
|
||||
// Precondition: size() + __n <= capacity()
|
||||
// Postcondition: size() == old size() + __n
|
||||
// Postcondition: [i] == __x for all i in [size() - __n, __n)
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
|
||||
{
|
||||
_ConstructTransaction __tx(&this->__end_, __n);
|
||||
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
|
||||
__alloc_traits::construct(this->__alloc(),
|
||||
_VSTD::__to_raw_pointer(__tx.__pos_), __x);
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _InputIter>
|
||||
typename enable_if
|
||||
<
|
||||
__is_input_iterator<_InputIter>::value &&
|
||||
!__is_forward_iterator<_InputIter>::value,
|
||||
void
|
||||
>::type
|
||||
__split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last)
|
||||
{
|
||||
__alloc_rr& __a = this->__alloc();
|
||||
for (; __first != __last; ++__first)
|
||||
{
|
||||
if (__end_ == __end_cap())
|
||||
{
|
||||
size_type __old_cap = __end_cap() - __first_;
|
||||
size_type __new_cap = _VSTD::max<size_type>(2 * __old_cap, 8);
|
||||
__split_buffer __buf(__new_cap, 0, __a);
|
||||
for (pointer __p = __begin_; __p != __end_; ++__p, ++__buf.__end_)
|
||||
__alloc_traits::construct(__buf.__alloc(),
|
||||
_VSTD::__to_raw_pointer(__buf.__end_), _VSTD::move(*__p));
|
||||
swap(__buf);
|
||||
}
|
||||
__alloc_traits::construct(__a, _VSTD::__to_raw_pointer(this->__end_), *__first);
|
||||
++this->__end_;
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _ForwardIterator>
|
||||
typename enable_if
|
||||
<
|
||||
__is_forward_iterator<_ForwardIterator>::value,
|
||||
void
|
||||
>::type
|
||||
__split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
|
||||
{
|
||||
_ConstructTransaction __tx(&this->__end_, std::distance(__first, __last));
|
||||
for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, ++__first) {
|
||||
__alloc_traits::construct(this->__alloc(),
|
||||
_VSTD::__to_raw_pointer(__tx.__pos_), *__first);
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
|
||||
{
|
||||
while (__begin_ != __new_begin)
|
||||
__alloc_traits::destroy(__alloc(), __to_raw_pointer(__begin_++));
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type)
|
||||
{
|
||||
__begin_ = __new_begin;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
|
||||
{
|
||||
while (__new_last != __end_)
|
||||
__alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT
|
||||
{
|
||||
__end_ = __new_last;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
|
||||
: __end_cap_(nullptr, __a)
|
||||
{
|
||||
__first_ = __cap != 0 ? __alloc_traits::allocate(__alloc(), __cap) : nullptr;
|
||||
__begin_ = __end_ = __first_ + __start;
|
||||
__end_cap() = __first_ + __cap;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer()
|
||||
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
|
||||
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
|
||||
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
|
||||
{
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
|
||||
: __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
|
||||
{
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::~__split_buffer()
|
||||
{
|
||||
clear();
|
||||
if (__first_)
|
||||
__alloc_traits::deallocate(__alloc(), __first_, capacity());
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
|
||||
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
|
||||
: __first_(_VSTD::move(__c.__first_)),
|
||||
__begin_(_VSTD::move(__c.__begin_)),
|
||||
__end_(_VSTD::move(__c.__end_)),
|
||||
__end_cap_(_VSTD::move(__c.__end_cap_))
|
||||
{
|
||||
__c.__first_ = nullptr;
|
||||
__c.__begin_ = nullptr;
|
||||
__c.__end_ = nullptr;
|
||||
__c.__end_cap() = nullptr;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
|
||||
: __end_cap_(__second_tag(), __a)
|
||||
{
|
||||
if (__a == __c.__alloc())
|
||||
{
|
||||
__first_ = __c.__first_;
|
||||
__begin_ = __c.__begin_;
|
||||
__end_ = __c.__end_;
|
||||
__end_cap() = __c.__end_cap();
|
||||
__c.__first_ = nullptr;
|
||||
__c.__begin_ = nullptr;
|
||||
__c.__end_ = nullptr;
|
||||
__c.__end_cap() = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __cap = __c.size();
|
||||
__first_ = __alloc_traits::allocate(__alloc(), __cap);
|
||||
__begin_ = __end_ = __first_;
|
||||
__end_cap() = __first_ + __cap;
|
||||
typedef move_iterator<iterator> _Ip;
|
||||
__construct_at_end(_Ip(__c.begin()), _Ip(__c.end()));
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>&
|
||||
__split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
|
||||
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
|
||||
is_nothrow_move_assignable<allocator_type>::value) ||
|
||||
!__alloc_traits::propagate_on_container_move_assignment::value)
|
||||
{
|
||||
clear();
|
||||
shrink_to_fit();
|
||||
__first_ = __c.__first_;
|
||||
__begin_ = __c.__begin_;
|
||||
__end_ = __c.__end_;
|
||||
__end_cap() = __c.__end_cap();
|
||||
__move_assign_alloc(__c,
|
||||
integral_constant<bool,
|
||||
__alloc_traits::propagate_on_container_move_assignment::value>());
|
||||
__c.__first_ = __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
|
||||
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
|
||||
__is_nothrow_swappable<__alloc_rr>::value)
|
||||
{
|
||||
_VSTD::swap(__first_, __x.__first_);
|
||||
_VSTD::swap(__begin_, __x.__begin_);
|
||||
_VSTD::swap(__end_, __x.__end_);
|
||||
_VSTD::swap(__end_cap(), __x.__end_cap());
|
||||
__swap_allocator(__alloc(), __x.__alloc());
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::reserve(size_type __n)
|
||||
{
|
||||
if (__n < capacity())
|
||||
{
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__n, 0, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
|
||||
{
|
||||
if (capacity() > size())
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
__split_buffer<value_type, __alloc_rr&> __t(size(), 0, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
__t.__end_ = __t.__begin_ + (__end_ - __begin_);
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
|
||||
{
|
||||
if (__begin_ == __first_)
|
||||
{
|
||||
if (__end_ < __end_cap())
|
||||
{
|
||||
difference_type __d = __end_cap() - __end_;
|
||||
__d = (__d + 1) / 2;
|
||||
__begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
|
||||
__end_ += __d;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
__alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__begin_-1), __x);
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
|
||||
{
|
||||
if (__begin_ == __first_)
|
||||
{
|
||||
if (__end_ < __end_cap())
|
||||
{
|
||||
difference_type __d = __end_cap() - __end_;
|
||||
__d = (__d + 1) / 2;
|
||||
__begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
|
||||
__end_ += __d;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
__alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__begin_-1),
|
||||
_VSTD::move(__x));
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
|
||||
{
|
||||
if (__end_ == __end_cap())
|
||||
{
|
||||
if (__begin_ > __first_)
|
||||
{
|
||||
difference_type __d = __begin_ - __first_;
|
||||
__d = (__d + 1) / 2;
|
||||
__end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
|
||||
__begin_ -= __d;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
__alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_), __x);
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
|
||||
{
|
||||
if (__end_ == __end_cap())
|
||||
{
|
||||
if (__begin_ > __first_)
|
||||
{
|
||||
difference_type __d = __begin_ - __first_;
|
||||
__d = (__d + 1) / 2;
|
||||
__end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
|
||||
__begin_ -= __d;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
__alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_),
|
||||
_VSTD::move(__x));
|
||||
++__end_;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
__split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
{
|
||||
if (__end_ == __end_cap())
|
||||
{
|
||||
if (__begin_ > __first_)
|
||||
{
|
||||
difference_type __d = __begin_ - __first_;
|
||||
__d = (__d + 1) / 2;
|
||||
__end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
|
||||
__begin_ -= __d;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_type __c = max<size_type>(2 * static_cast<size_t>(__end_cap() - __first_), 1);
|
||||
__split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
|
||||
__t.__construct_at_end(move_iterator<pointer>(__begin_),
|
||||
move_iterator<pointer>(__end_));
|
||||
_VSTD::swap(__first_, __t.__first_);
|
||||
_VSTD::swap(__begin_, __t.__begin_);
|
||||
_VSTD::swap(__end_, __t.__end_);
|
||||
_VSTD::swap(__end_cap(), __t.__end_cap());
|
||||
}
|
||||
}
|
||||
__alloc_traits::construct(__alloc(), _VSTD::__to_raw_pointer(__end_),
|
||||
_VSTD::forward<_Args>(__args)...);
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_CXX03_LANG
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
|
||||
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
|
||||
{
|
||||
__x.swap(__y);
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP_SPLIT_BUFFER
|
552
third_party/libcxx.bak/__tuple
vendored
552
third_party/libcxx.bak/__tuple
vendored
|
@ -1,552 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP___TUPLE
|
||||
#define _LIBCPP___TUPLE
|
||||
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;
|
||||
|
||||
#if !defined(_LIBCPP_CXX03_LANG)
|
||||
template <class _Tp, class...>
|
||||
using __enable_if_tuple_size_imp = _Tp;
|
||||
|
||||
template <class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
|
||||
const _Tp,
|
||||
typename enable_if<!is_volatile<_Tp>::value>::type,
|
||||
integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
|
||||
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
|
||||
|
||||
template <class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
|
||||
volatile _Tp,
|
||||
typename enable_if<!is_const<_Tp>::value>::type,
|
||||
integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
|
||||
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
|
||||
|
||||
template <class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
|
||||
const volatile _Tp,
|
||||
integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
|
||||
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
|
||||
|
||||
#else
|
||||
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
|
||||
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
|
||||
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
|
||||
#endif
|
||||
|
||||
template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;
|
||||
|
||||
template <size_t _Ip, class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||
};
|
||||
|
||||
template <size_t _Ip, class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||
};
|
||||
|
||||
template <size_t _Ip, class _Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||
};
|
||||
|
||||
template <class _Tp> struct __tuple_like : false_type {};
|
||||
|
||||
template <class _Tp> struct __tuple_like<const _Tp> : public __tuple_like<_Tp> {};
|
||||
template <class _Tp> struct __tuple_like<volatile _Tp> : public __tuple_like<_Tp> {};
|
||||
template <class _Tp> struct __tuple_like<const volatile _Tp> : public __tuple_like<_Tp> {};
|
||||
|
||||
// tuple specializations
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template <size_t...> struct __tuple_indices {};
|
||||
|
||||
template <class _IdxType, _IdxType... _Values>
|
||||
struct __integer_sequence {
|
||||
template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
|
||||
using __convert = _ToIndexSeq<_ToIndexType, _Values...>;
|
||||
|
||||
template <size_t _Sp>
|
||||
using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
|
||||
};
|
||||
|
||||
#if !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
|
||||
namespace __detail {
|
||||
|
||||
template<typename _Tp, size_t ..._Extra> struct __repeat;
|
||||
template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
|
||||
typedef _LIBCPP_NODEBUG_TYPE __integer_sequence<_Tp,
|
||||
_Np...,
|
||||
sizeof...(_Np) + _Np...,
|
||||
2 * sizeof...(_Np) + _Np...,
|
||||
3 * sizeof...(_Np) + _Np...,
|
||||
4 * sizeof...(_Np) + _Np...,
|
||||
5 * sizeof...(_Np) + _Np...,
|
||||
6 * sizeof...(_Np) + _Np...,
|
||||
7 * sizeof...(_Np) + _Np...,
|
||||
_Extra...> type;
|
||||
};
|
||||
|
||||
template<size_t _Np> struct __parity;
|
||||
template<size_t _Np> struct __make : __parity<_Np % 8>::template __pmake<_Np> {};
|
||||
|
||||
template<> struct __make<0> { typedef __integer_sequence<size_t> type; };
|
||||
template<> struct __make<1> { typedef __integer_sequence<size_t, 0> type; };
|
||||
template<> struct __make<2> { typedef __integer_sequence<size_t, 0, 1> type; };
|
||||
template<> struct __make<3> { typedef __integer_sequence<size_t, 0, 1, 2> type; };
|
||||
template<> struct __make<4> { typedef __integer_sequence<size_t, 0, 1, 2, 3> type; };
|
||||
template<> struct __make<5> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4> type; };
|
||||
template<> struct __make<6> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5> type; };
|
||||
template<> struct __make<7> { typedef __integer_sequence<size_t, 0, 1, 2, 3, 4, 5, 6> type; };
|
||||
|
||||
template<> struct __parity<0> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type> {}; };
|
||||
template<> struct __parity<1> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 1> {}; };
|
||||
template<> struct __parity<2> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 2, _Np - 1> {}; };
|
||||
template<> struct __parity<3> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 3, _Np - 2, _Np - 1> {}; };
|
||||
template<> struct __parity<4> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
|
||||
template<> struct __parity<5> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
|
||||
template<> struct __parity<6> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
|
||||
template<> struct __parity<7> { template<size_t _Np> struct __pmake : __repeat<typename __make<_Np / 8>::type, _Np - 7, _Np - 6, _Np - 5, _Np - 4, _Np - 3, _Np - 2, _Np - 1> {}; };
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#endif // !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
|
||||
|
||||
#if __has_builtin(__make_integer_seq)
|
||||
template <size_t _Ep, size_t _Sp>
|
||||
using __make_indices_imp =
|
||||
typename __make_integer_seq<__integer_sequence, size_t, _Ep - _Sp>::template
|
||||
__to_tuple_indices<_Sp>;
|
||||
#else
|
||||
template <size_t _Ep, size_t _Sp>
|
||||
using __make_indices_imp =
|
||||
typename __detail::__make<_Ep - _Sp>::type::template __to_tuple_indices<_Sp>;
|
||||
|
||||
#endif
|
||||
|
||||
template <size_t _Ep, size_t _Sp = 0>
|
||||
struct __make_tuple_indices
|
||||
{
|
||||
static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
|
||||
typedef __make_indices_imp<_Ep, _Sp> type;
|
||||
};
|
||||
|
||||
|
||||
template <class ..._Tp> class _LIBCPP_TEMPLATE_VIS tuple;
|
||||
|
||||
template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
|
||||
|
||||
template <class ..._Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
|
||||
: public integral_constant<size_t, sizeof...(_Tp)>
|
||||
{
|
||||
};
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
typename tuple_element<_Ip, tuple<_Tp...> >::type&
|
||||
get(tuple<_Tp...>&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const typename tuple_element<_Ip, tuple<_Tp...> >::type&
|
||||
get(const tuple<_Tp...>&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
typename tuple_element<_Ip, tuple<_Tp...> >::type&&
|
||||
get(tuple<_Tp...>&&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
|
||||
get(const tuple<_Tp...>&&) _NOEXCEPT;
|
||||
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
// pair specializations
|
||||
|
||||
template <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
|
||||
|
||||
template <size_t _Ip, class _T1, class _T2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
typename tuple_element<_Ip, pair<_T1, _T2> >::type&
|
||||
get(pair<_T1, _T2>&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class _T1, class _T2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
|
||||
get(const pair<_T1, _T2>&) _NOEXCEPT;
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <size_t _Ip, class _T1, class _T2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
|
||||
get(pair<_T1, _T2>&&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class _T1, class _T2>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
|
||||
get(const pair<_T1, _T2>&&) _NOEXCEPT;
|
||||
#endif
|
||||
|
||||
// array specializations
|
||||
|
||||
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
|
||||
|
||||
template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
|
||||
|
||||
template <size_t _Ip, class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_Tp&
|
||||
get(array<_Tp, _Size>&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const _Tp&
|
||||
get(const array<_Tp, _Size>&) _NOEXCEPT;
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
template <size_t _Ip, class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
_Tp&&
|
||||
get(array<_Tp, _Size>&&) _NOEXCEPT;
|
||||
|
||||
template <size_t _Ip, class _Tp, size_t _Size>
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const _Tp&&
|
||||
get(const array<_Tp, _Size>&&) _NOEXCEPT;
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
// __tuple_types
|
||||
|
||||
template <class ..._Tp> struct __tuple_types {};
|
||||
|
||||
#if !__has_builtin(__type_pack_element)
|
||||
|
||||
namespace __indexer_detail {
|
||||
|
||||
template <size_t _Idx, class _Tp>
|
||||
struct __indexed { using type _LIBCPP_NODEBUG_TYPE = _Tp; };
|
||||
|
||||
template <class _Types, class _Indexes> struct __indexer;
|
||||
|
||||
template <class ..._Types, size_t ..._Idx>
|
||||
struct __indexer<__tuple_types<_Types...>, __tuple_indices<_Idx...>>
|
||||
: __indexed<_Idx, _Types>...
|
||||
{};
|
||||
|
||||
template <size_t _Idx, class _Tp>
|
||||
__indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);
|
||||
|
||||
} // namespace __indexer_detail
|
||||
|
||||
template <size_t _Idx, class ..._Types>
|
||||
using __type_pack_element _LIBCPP_NODEBUG_TYPE = typename decltype(
|
||||
__indexer_detail::__at_index<_Idx>(
|
||||
__indexer_detail::__indexer<
|
||||
__tuple_types<_Types...>,
|
||||
typename __make_tuple_indices<sizeof...(_Types)>::type
|
||||
>{})
|
||||
)::type;
|
||||
#endif
|
||||
|
||||
template <size_t _Ip, class ..._Types>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...>>
|
||||
{
|
||||
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
|
||||
typedef _LIBCPP_NODEBUG_TYPE __type_pack_element<_Ip, _Types...> type;
|
||||
};
|
||||
|
||||
|
||||
template <class ..._Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
|
||||
: public integral_constant<size_t, sizeof...(_Tp)>
|
||||
{
|
||||
};
|
||||
|
||||
template <class... _Tp> struct __tuple_like<__tuple_types<_Tp...> > : true_type {};
|
||||
|
||||
template <bool _ApplyLV, bool _ApplyConst, bool _ApplyVolatile>
|
||||
struct __apply_cv_mf;
|
||||
template <>
|
||||
struct __apply_cv_mf<false, false, false> {
|
||||
template <class _Tp> using __apply = _Tp;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<false, true, false> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const _Tp;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<false, false, true> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = volatile _Tp;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<false, true, true> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const volatile _Tp;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<true, false, false> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = _Tp&;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<true, true, false> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const _Tp&;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<true, false, true> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = volatile _Tp&;
|
||||
};
|
||||
template <>
|
||||
struct __apply_cv_mf<true, true, true> {
|
||||
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const volatile _Tp&;
|
||||
};
|
||||
template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
|
||||
using __apply_cv_t _LIBCPP_NODEBUG_TYPE = __apply_cv_mf<
|
||||
is_lvalue_reference<_Tp>::value,
|
||||
is_const<_RawTp>::value,
|
||||
is_volatile<_RawTp>::value>;
|
||||
|
||||
// __make_tuple_types
|
||||
|
||||
// __make_tuple_types<_Tuple<_Types...>, _Ep, _Sp>::type is a
|
||||
// __tuple_types<_Types...> using only those _Types in the range [_Sp, _Ep).
|
||||
// _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a
|
||||
// lvalue_reference type, then __tuple_types<_Types&...> is the result.
|
||||
|
||||
template <class _TupleTypes, class _TupleIndices>
|
||||
struct __make_tuple_types_flat;
|
||||
|
||||
template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
|
||||
struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
|
||||
// Specialization for pair, tuple, and __tuple_types
|
||||
template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
|
||||
using __apply_quals _LIBCPP_NODEBUG_TYPE = __tuple_types<
|
||||
typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
|
||||
>;
|
||||
};
|
||||
|
||||
template <class _Vt, size_t _Np, size_t ..._Idx>
|
||||
struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>> {
|
||||
template <size_t>
|
||||
using __value_type = _Vt;
|
||||
template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
|
||||
using __apply_quals = __tuple_types<
|
||||
typename _ApplyFn::template __apply<__value_type<_Idx>>...
|
||||
>;
|
||||
};
|
||||
|
||||
template <class _Tp, size_t _Ep = tuple_size<typename remove_reference<_Tp>::type>::value,
|
||||
size_t _Sp = 0,
|
||||
bool _SameSize = (_Ep == tuple_size<typename remove_reference<_Tp>::type>::value)>
|
||||
struct __make_tuple_types
|
||||
{
|
||||
static_assert(_Sp <= _Ep, "__make_tuple_types input error");
|
||||
using _RawTp = typename remove_cv<typename remove_reference<_Tp>::type>::type;
|
||||
using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
|
||||
using type = typename _Maker::template __apply_quals<_Tp>;
|
||||
};
|
||||
|
||||
template <class ..._Types, size_t _Ep>
|
||||
struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
|
||||
typedef _LIBCPP_NODEBUG_TYPE __tuple_types<_Types...> type;
|
||||
};
|
||||
|
||||
template <class ..._Types, size_t _Ep>
|
||||
struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
|
||||
typedef _LIBCPP_NODEBUG_TYPE __tuple_types<_Types...> type;
|
||||
};
|
||||
|
||||
template <bool ..._Preds>
|
||||
struct __all_dummy;
|
||||
|
||||
template <bool ..._Pred>
|
||||
using __all = _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>>;
|
||||
|
||||
struct __tuple_sfinae_base {
|
||||
template <template <class, class...> class _Trait,
|
||||
class ..._LArgs, class ..._RArgs>
|
||||
static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
|
||||
-> __all<typename enable_if<_Trait<_LArgs, _RArgs>::value, bool>::type{true}...>;
|
||||
template <template <class...> class>
|
||||
static auto __do_test(...) -> false_type;
|
||||
|
||||
template <class _FromArgs, class _ToArgs>
|
||||
using __constructible = decltype(__do_test<is_constructible>(_ToArgs{}, _FromArgs{}));
|
||||
template <class _FromArgs, class _ToArgs>
|
||||
using __convertible = decltype(__do_test<is_convertible>(_FromArgs{}, _ToArgs{}));
|
||||
template <class _FromArgs, class _ToArgs>
|
||||
using __assignable = decltype(__do_test<is_assignable>(_ToArgs{}, _FromArgs{}));
|
||||
};
|
||||
|
||||
// __tuple_convertible
|
||||
|
||||
template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
|
||||
bool = __tuple_like<_Up>::value>
|
||||
struct __tuple_convertible
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
struct __tuple_convertible<_Tp, _Up, true, true>
|
||||
: public __tuple_sfinae_base::__convertible<
|
||||
typename __make_tuple_types<_Tp>::type
|
||||
, typename __make_tuple_types<_Up>::type
|
||||
>
|
||||
{};
|
||||
|
||||
// __tuple_constructible
|
||||
|
||||
template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
|
||||
bool = __tuple_like<_Up>::value>
|
||||
struct __tuple_constructible
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
struct __tuple_constructible<_Tp, _Up, true, true>
|
||||
: public __tuple_sfinae_base::__constructible<
|
||||
typename __make_tuple_types<_Tp>::type
|
||||
, typename __make_tuple_types<_Up>::type
|
||||
>
|
||||
{};
|
||||
|
||||
// __tuple_assignable
|
||||
|
||||
template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
|
||||
bool = __tuple_like<_Up>::value>
|
||||
struct __tuple_assignable
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
struct __tuple_assignable<_Tp, _Up, true, true>
|
||||
: public __tuple_sfinae_base::__assignable<
|
||||
typename __make_tuple_types<_Tp>::type
|
||||
, typename __make_tuple_types<_Up&>::type
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
|
||||
{
|
||||
typedef _LIBCPP_NODEBUG_TYPE typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
|
||||
};
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <size_t _Ip, class ..._Tp>
|
||||
using tuple_element_t _LIBCPP_NODEBUG_TYPE = typename tuple_element <_Ip, _Tp...>::type;
|
||||
#endif
|
||||
|
||||
template <bool _IsTuple, class _SizeTrait, size_t _Expected>
|
||||
struct __tuple_like_with_size_imp : false_type {};
|
||||
|
||||
template <class _SizeTrait, size_t _Expected>
|
||||
struct __tuple_like_with_size_imp<true, _SizeTrait, _Expected>
|
||||
: integral_constant<bool, _SizeTrait::value == _Expected> {};
|
||||
|
||||
template <class _Tuple, size_t _ExpectedSize,
|
||||
class _RawTuple = typename __uncvref<_Tuple>::type>
|
||||
using __tuple_like_with_size _LIBCPP_NODEBUG_TYPE = __tuple_like_with_size_imp<
|
||||
__tuple_like<_RawTuple>::value,
|
||||
tuple_size<_RawTuple>, _ExpectedSize
|
||||
>;
|
||||
|
||||
struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
|
||||
|
||||
static constexpr bool __enable_explicit_default() { return false; }
|
||||
static constexpr bool __enable_implicit_default() { return false; }
|
||||
template <class ...>
|
||||
static constexpr bool __enable_explicit() { return false; }
|
||||
template <class ...>
|
||||
static constexpr bool __enable_implicit() { return false; }
|
||||
template <class ...>
|
||||
static constexpr bool __enable_assign() { return false; }
|
||||
};
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
|
||||
template <bool _CanCopy, bool _CanMove>
|
||||
struct __sfinae_ctor_base {};
|
||||
template <>
|
||||
struct __sfinae_ctor_base<false, false> {
|
||||
__sfinae_ctor_base() = default;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
|
||||
};
|
||||
template <>
|
||||
struct __sfinae_ctor_base<true, false> {
|
||||
__sfinae_ctor_base() = default;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base const&) = default;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base &&) = delete;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
|
||||
};
|
||||
template <>
|
||||
struct __sfinae_ctor_base<false, true> {
|
||||
__sfinae_ctor_base() = default;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base const&) = delete;
|
||||
__sfinae_ctor_base(__sfinae_ctor_base &&) = default;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base const&) = default;
|
||||
__sfinae_ctor_base& operator=(__sfinae_ctor_base&&) = default;
|
||||
};
|
||||
|
||||
template <bool _CanCopy, bool _CanMove>
|
||||
struct __sfinae_assign_base {};
|
||||
template <>
|
||||
struct __sfinae_assign_base<false, false> {
|
||||
__sfinae_assign_base() = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base const&) = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base &&) = default;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
|
||||
};
|
||||
template <>
|
||||
struct __sfinae_assign_base<true, false> {
|
||||
__sfinae_assign_base() = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base const&) = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base &&) = default;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base const&) = default;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base&&) = delete;
|
||||
};
|
||||
template <>
|
||||
struct __sfinae_assign_base<false, true> {
|
||||
__sfinae_assign_base() = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base const&) = default;
|
||||
__sfinae_assign_base(__sfinae_assign_base &&) = default;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
|
||||
__sfinae_assign_base& operator=(__sfinae_assign_base&&) = default;
|
||||
};
|
||||
#endif // _LIBCPP_STD_VER > 14
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP___TUPLE
|
34
third_party/libcxx.bak/__undef_macros
vendored
34
third_party/libcxx.bak/__undef_macros
vendored
|
@ -1,34 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===------------------------ __undef_macros ------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
||||
#ifdef min
|
||||
#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
|
||||
#if defined(_LIBCPP_WARNING)
|
||||
_LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX "
|
||||
"before any Windows header. #undefing min")
|
||||
#else
|
||||
#warning: macro min is incompatible with C++. #undefing min
|
||||
#endif
|
||||
#endif
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
#ifdef max
|
||||
#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
|
||||
#if defined(_LIBCPP_WARNING)
|
||||
_LIBCPP_WARNING("macro max is incompatible with C++. Try #define NOMINMAX "
|
||||
"before any Windows header. #undefing max")
|
||||
#else
|
||||
#warning: macro max is incompatible with C++. #undefing max
|
||||
#endif
|
||||
#endif
|
||||
#undef max
|
||||
#endif
|
5686
third_party/libcxx.bak/algorithm
vendored
5686
third_party/libcxx.bak/algorithm
vendored
File diff suppressed because it is too large
Load diff
48
third_party/libcxx.bak/climits
vendored
48
third_party/libcxx.bak/climits
vendored
|
@ -1,48 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- climits ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CLIMITS
|
||||
#define _LIBCPP_CLIMITS
|
||||
|
||||
/*
|
||||
climits synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
CHAR_BIT
|
||||
SCHAR_MIN
|
||||
SCHAR_MAX
|
||||
UCHAR_MAX
|
||||
CHAR_MIN
|
||||
CHAR_MAX
|
||||
MB_LEN_MAX
|
||||
SHRT_MIN
|
||||
SHRT_MAX
|
||||
USHRT_MAX
|
||||
INT_MIN
|
||||
INT_MAX
|
||||
UINT_MAX
|
||||
LONG_MIN
|
||||
LONG_MAX
|
||||
ULONG_MAX
|
||||
LLONG_MIN // C99
|
||||
LLONG_MAX // C99
|
||||
ULLONG_MAX // C99
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <limits.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CLIMITS
|
114
third_party/libcxx.bak/cstddef
vendored
114
third_party/libcxx.bak/cstddef
vendored
|
@ -1,114 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- cstddef ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CSTDDEF
|
||||
#define _LIBCPP_CSTDDEF
|
||||
|
||||
/*
|
||||
cstddef synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
offsetof(type,member-designator)
|
||||
NULL
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
Types:
|
||||
|
||||
ptrdiff_t
|
||||
size_t
|
||||
max_align_t
|
||||
nullptr_t
|
||||
byte // C++17
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <version>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
|
||||
#include_next <stddef.h>
|
||||
#include <__nullptr>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
|
||||
#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
|
||||
defined(__DEFINED_max_align_t) || defined(__NetBSD__)
|
||||
// Re-use the compiler's <stddef.h> max_align_t where possible.
|
||||
using ::max_align_t;
|
||||
#else
|
||||
typedef long double max_align_t;
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
namespace std // purposefully not versioned
|
||||
{
|
||||
enum class byte : unsigned char {};
|
||||
|
||||
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
|
||||
{ return __lhs = __lhs | __rhs; }
|
||||
|
||||
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
|
||||
{ return __lhs = __lhs & __rhs; }
|
||||
|
||||
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
|
||||
));
|
||||
}
|
||||
|
||||
constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
|
||||
{ return __lhs = __lhs ^ __rhs; }
|
||||
|
||||
constexpr byte operator~ (byte __b) noexcept
|
||||
{
|
||||
return static_cast<byte>(
|
||||
static_cast<unsigned char>(
|
||||
~static_cast<unsigned int>(__b)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include <type_traits> // rest of byte
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CSTDDEF
|
191
third_party/libcxx.bak/cstdint
vendored
191
third_party/libcxx.bak/cstdint
vendored
|
@ -1,191 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- cstdint ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CSTDINT
|
||||
#define _LIBCPP_CSTDINT
|
||||
|
||||
/*
|
||||
cstdint synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
INT8_MIN
|
||||
INT16_MIN
|
||||
INT32_MIN
|
||||
INT64_MIN
|
||||
|
||||
INT8_MAX
|
||||
INT16_MAX
|
||||
INT32_MAX
|
||||
INT64_MAX
|
||||
|
||||
UINT8_MAX
|
||||
UINT16_MAX
|
||||
UINT32_MAX
|
||||
UINT64_MAX
|
||||
|
||||
INT_LEAST8_MIN
|
||||
INT_LEAST16_MIN
|
||||
INT_LEAST32_MIN
|
||||
INT_LEAST64_MIN
|
||||
|
||||
INT_LEAST8_MAX
|
||||
INT_LEAST16_MAX
|
||||
INT_LEAST32_MAX
|
||||
INT_LEAST64_MAX
|
||||
|
||||
UINT_LEAST8_MAX
|
||||
UINT_LEAST16_MAX
|
||||
UINT_LEAST32_MAX
|
||||
UINT_LEAST64_MAX
|
||||
|
||||
INT_FAST8_MIN
|
||||
INT_FAST16_MIN
|
||||
INT_FAST32_MIN
|
||||
INT_FAST64_MIN
|
||||
|
||||
INT_FAST8_MAX
|
||||
INT_FAST16_MAX
|
||||
INT_FAST32_MAX
|
||||
INT_FAST64_MAX
|
||||
|
||||
UINT_FAST8_MAX
|
||||
UINT_FAST16_MAX
|
||||
UINT_FAST32_MAX
|
||||
UINT_FAST64_MAX
|
||||
|
||||
INTPTR_MIN
|
||||
INTPTR_MAX
|
||||
UINTPTR_MAX
|
||||
|
||||
INTMAX_MIN
|
||||
INTMAX_MAX
|
||||
|
||||
UINTMAX_MAX
|
||||
|
||||
PTRDIFF_MIN
|
||||
PTRDIFF_MAX
|
||||
|
||||
SIG_ATOMIC_MIN
|
||||
SIG_ATOMIC_MAX
|
||||
|
||||
SIZE_MAX
|
||||
|
||||
WCHAR_MIN
|
||||
WCHAR_MAX
|
||||
|
||||
WINT_MIN
|
||||
WINT_MAX
|
||||
|
||||
INT8_C(value)
|
||||
INT16_C(value)
|
||||
INT32_C(value)
|
||||
INT64_C(value)
|
||||
|
||||
UINT8_C(value)
|
||||
UINT16_C(value)
|
||||
UINT32_C(value)
|
||||
UINT64_C(value)
|
||||
|
||||
INTMAX_C(value)
|
||||
UINTMAX_C(value)
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
Types:
|
||||
|
||||
int8_t
|
||||
int16_t
|
||||
int32_t
|
||||
int64_t
|
||||
|
||||
uint8_t
|
||||
uint16_t
|
||||
uint32_t
|
||||
uint64_t
|
||||
|
||||
int_least8_t
|
||||
int_least16_t
|
||||
int_least32_t
|
||||
int_least64_t
|
||||
|
||||
uint_least8_t
|
||||
uint_least16_t
|
||||
uint_least32_t
|
||||
uint_least64_t
|
||||
|
||||
int_fast8_t
|
||||
int_fast16_t
|
||||
int_fast32_t
|
||||
int_fast64_t
|
||||
|
||||
uint_fast8_t
|
||||
uint_fast16_t
|
||||
uint_fast32_t
|
||||
uint_fast64_t
|
||||
|
||||
intptr_t
|
||||
uintptr_t
|
||||
|
||||
intmax_t
|
||||
uintmax_t
|
||||
|
||||
} // std
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <stdint.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using::int8_t;
|
||||
using::int16_t;
|
||||
using::int32_t;
|
||||
using::int64_t;
|
||||
|
||||
using::uint8_t;
|
||||
using::uint16_t;
|
||||
using::uint32_t;
|
||||
using::uint64_t;
|
||||
|
||||
using::int_least8_t;
|
||||
using::int_least16_t;
|
||||
using::int_least32_t;
|
||||
using::int_least64_t;
|
||||
|
||||
using::uint_least8_t;
|
||||
using::uint_least16_t;
|
||||
using::uint_least32_t;
|
||||
using::uint_least64_t;
|
||||
|
||||
using::int_fast8_t;
|
||||
using::int_fast16_t;
|
||||
using::int_fast32_t;
|
||||
using::int_fast64_t;
|
||||
|
||||
using::uint_fast8_t;
|
||||
using::uint_fast16_t;
|
||||
using::uint_fast32_t;
|
||||
using::uint_fast64_t;
|
||||
|
||||
using::intptr_t;
|
||||
using::uintptr_t;
|
||||
|
||||
using::intmax_t;
|
||||
using::uintmax_t;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CSTDINT
|
172
third_party/libcxx.bak/cstdio
vendored
172
third_party/libcxx.bak/cstdio
vendored
|
@ -1,172 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===---------------------------- cstdio ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CSTDIO
|
||||
#define _LIBCPP_CSTDIO
|
||||
|
||||
/*
|
||||
cstdio synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
BUFSIZ
|
||||
EOF
|
||||
FILENAME_MAX
|
||||
FOPEN_MAX
|
||||
L_tmpnam
|
||||
NULL
|
||||
SEEK_CUR
|
||||
SEEK_END
|
||||
SEEK_SET
|
||||
TMP_MAX
|
||||
_IOFBF
|
||||
_IOLBF
|
||||
_IONBF
|
||||
stderr
|
||||
stdin
|
||||
stdout
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
Types:
|
||||
|
||||
FILE
|
||||
fpos_t
|
||||
size_t
|
||||
|
||||
int remove(const char* filename);
|
||||
int rename(const char* old, const char* new);
|
||||
FILE* tmpfile(void);
|
||||
char* tmpnam(char* s);
|
||||
int fclose(FILE* stream);
|
||||
int fflush(FILE* stream);
|
||||
FILE* fopen(const char* restrict filename, const char* restrict mode);
|
||||
FILE* freopen(const char* restrict filename, const char * restrict mode,
|
||||
FILE * restrict stream);
|
||||
void setbuf(FILE* restrict stream, char* restrict buf);
|
||||
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
|
||||
int fprintf(FILE* restrict stream, const char* restrict format, ...);
|
||||
int fscanf(FILE* restrict stream, const char * restrict format, ...);
|
||||
int printf(const char* restrict format, ...);
|
||||
int scanf(const char* restrict format, ...);
|
||||
int snprintf(char* restrict s, size_t n, const char* restrict format, ...); // C99
|
||||
int sprintf(char* restrict s, const char* restrict format, ...);
|
||||
int sscanf(const char* restrict s, const char* restrict format, ...);
|
||||
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
|
||||
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg); // C99
|
||||
int vprintf(const char* restrict format, va_list arg);
|
||||
int vscanf(const char* restrict format, va_list arg); // C99
|
||||
int vsnprintf(char* restrict s, size_t n, const char* restrict format, // C99
|
||||
va_list arg);
|
||||
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
|
||||
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
|
||||
int fgetc(FILE* stream);
|
||||
char* fgets(char* restrict s, int n, FILE* restrict stream);
|
||||
int fputc(int c, FILE* stream);
|
||||
int fputs(const char* restrict s, FILE* restrict stream);
|
||||
int getc(FILE* stream);
|
||||
int getchar(void);
|
||||
char* gets(char* s); // removed in C++14
|
||||
int putc(int c, FILE* stream);
|
||||
int putchar(int c);
|
||||
int puts(const char* s);
|
||||
int ungetc(int c, FILE* stream);
|
||||
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
|
||||
FILE* restrict stream);
|
||||
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
|
||||
FILE* restrict stream);
|
||||
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
|
||||
int fseek(FILE* stream, long offset, int whence);
|
||||
int fsetpos(FILE*stream, const fpos_t* pos);
|
||||
long ftell(FILE* stream);
|
||||
void rewind(FILE* stream);
|
||||
void clearerr(FILE* stream);
|
||||
int feof(FILE* stream);
|
||||
int ferror(FILE* stream);
|
||||
void perror(const char* s);
|
||||
|
||||
} // std
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <stdio.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using ::FILE;
|
||||
using ::fpos_t;
|
||||
using ::size_t;
|
||||
|
||||
using ::fclose;
|
||||
using ::fflush;
|
||||
using ::setbuf;
|
||||
using ::setvbuf;
|
||||
using ::fprintf;
|
||||
using ::fscanf;
|
||||
using ::snprintf;
|
||||
using ::sprintf;
|
||||
using ::sscanf;
|
||||
using ::vfprintf;
|
||||
using ::vfscanf;
|
||||
using ::vsscanf;
|
||||
using ::vsnprintf;
|
||||
using ::vsprintf;
|
||||
using ::fgetc;
|
||||
using ::fgets;
|
||||
using ::fputc;
|
||||
using ::fputs;
|
||||
using ::getc;
|
||||
using ::putc;
|
||||
using ::ungetc;
|
||||
using ::fread;
|
||||
using ::fwrite;
|
||||
using ::fgetpos;
|
||||
using ::fseek;
|
||||
using ::fsetpos;
|
||||
using ::ftell;
|
||||
using ::rewind;
|
||||
using ::clearerr;
|
||||
using ::feof;
|
||||
using ::ferror;
|
||||
using ::perror;
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
|
||||
using ::fopen;
|
||||
using ::freopen;
|
||||
using ::remove;
|
||||
using ::rename;
|
||||
using ::tmpfile;
|
||||
using ::tmpnam;
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_STDIN
|
||||
using ::getchar;
|
||||
#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_C_HAS_NO_GETS)
|
||||
using ::gets;
|
||||
#endif
|
||||
using ::scanf;
|
||||
using ::vscanf;
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_STDOUT
|
||||
using ::printf;
|
||||
using ::putchar;
|
||||
using ::puts;
|
||||
using ::vprintf;
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CSTDIO
|
164
third_party/libcxx.bak/cstdlib
vendored
164
third_party/libcxx.bak/cstdlib
vendored
|
@ -1,164 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- cstdlib ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CSTDLIB
|
||||
#define _LIBCPP_CSTDLIB
|
||||
|
||||
/*
|
||||
cstdlib synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
EXIT_FAILURE
|
||||
EXIT_SUCCESS
|
||||
MB_CUR_MAX
|
||||
NULL
|
||||
RAND_MAX
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
Types:
|
||||
|
||||
size_t
|
||||
div_t
|
||||
ldiv_t
|
||||
lldiv_t // C99
|
||||
|
||||
double atof (const char* nptr);
|
||||
int atoi (const char* nptr);
|
||||
long atol (const char* nptr);
|
||||
long long atoll(const char* nptr); // C99
|
||||
double strtod (const char* restrict nptr, char** restrict endptr);
|
||||
float strtof (const char* restrict nptr, char** restrict endptr); // C99
|
||||
long double strtold (const char* restrict nptr, char** restrict endptr); // C99
|
||||
long strtol (const char* restrict nptr, char** restrict endptr, int base);
|
||||
long long strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
|
||||
unsigned long strtoul (const char* restrict nptr, char** restrict endptr, int base);
|
||||
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
|
||||
int rand(void);
|
||||
void srand(unsigned int seed);
|
||||
void* calloc(size_t nmemb, size_t size);
|
||||
void free(void* ptr);
|
||||
void* malloc(size_t size);
|
||||
void* realloc(void* ptr, size_t size);
|
||||
void abort(void);
|
||||
int atexit(void (*func)(void));
|
||||
void exit(int status);
|
||||
void _Exit(int status);
|
||||
char* getenv(const char* name);
|
||||
int system(const char* string);
|
||||
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
|
||||
int (*compar)(const void *, const void *));
|
||||
void qsort(void* base, size_t nmemb, size_t size,
|
||||
int (*compar)(const void *, const void *));
|
||||
int abs( int j);
|
||||
long abs( long j);
|
||||
long long abs(long long j); // C++0X
|
||||
long labs( long j);
|
||||
long long llabs(long long j); // C99
|
||||
div_t div( int numer, int denom);
|
||||
ldiv_t div( long numer, long denom);
|
||||
lldiv_t div(long long numer, long long denom); // C++0X
|
||||
ldiv_t ldiv( long numer, long denom);
|
||||
lldiv_t lldiv(long long numer, long long denom); // C99
|
||||
int mblen(const char* s, size_t n);
|
||||
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
|
||||
int wctomb(char* s, wchar_t wchar);
|
||||
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
|
||||
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
|
||||
int at_quick_exit(void (*func)(void)) // C++11
|
||||
void quick_exit(int status); // C++11
|
||||
void *aligned_alloc(size_t alignment, size_t size); // C11
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _LIBCPP_UNREACHABLE() __builtin_unreachable()
|
||||
#else
|
||||
#define _LIBCPP_UNREACHABLE() _VSTD::abort()
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using ::size_t;
|
||||
using ::div_t;
|
||||
using ::ldiv_t;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::lldiv_t;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::atof;
|
||||
using ::atoi;
|
||||
using ::atol;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::atoll;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::strtod;
|
||||
using ::strtof;
|
||||
using ::strtold;
|
||||
using ::strtol;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::strtoll;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::strtoul;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::strtoull;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::rand;
|
||||
using ::srand;
|
||||
using ::calloc;
|
||||
using ::free;
|
||||
using ::malloc;
|
||||
using ::realloc;
|
||||
using ::abort;
|
||||
using ::atexit;
|
||||
using ::exit;
|
||||
using ::_Exit;
|
||||
#ifndef _LIBCPP_WINDOWS_STORE_APP
|
||||
using ::getenv;
|
||||
using ::system;
|
||||
#endif
|
||||
using ::bsearch;
|
||||
using ::qsort;
|
||||
using ::abs;
|
||||
using ::labs;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::llabs;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::div;
|
||||
using ::ldiv;
|
||||
#ifndef _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::lldiv;
|
||||
#endif // _LIBCPP_HAS_NO_LONG_LONG
|
||||
using ::mblen;
|
||||
using ::mbtowc;
|
||||
using ::wctomb;
|
||||
using ::mbstowcs;
|
||||
using ::wcstombs;
|
||||
#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT)
|
||||
using ::at_quick_exit;
|
||||
using ::quick_exit;
|
||||
#endif
|
||||
#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES)
|
||||
using ::aligned_alloc;
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CSTDLIB
|
97
third_party/libcxx.bak/cstring
vendored
97
third_party/libcxx.bak/cstring
vendored
|
@ -1,97 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- cstring ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_CSTRING
|
||||
#define _LIBCPP_CSTRING
|
||||
|
||||
/*
|
||||
cstring synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
NULL
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
Types:
|
||||
|
||||
size_t
|
||||
|
||||
void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
|
||||
void* memmove(void* s1, const void* s2, size_t n);
|
||||
char* strcpy (char* restrict s1, const char* restrict s2);
|
||||
char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
|
||||
char* strcat (char* restrict s1, const char* restrict s2);
|
||||
char* strncat(char* restrict s1, const char* restrict s2, size_t n);
|
||||
int memcmp(const void* s1, const void* s2, size_t n);
|
||||
int strcmp (const char* s1, const char* s2);
|
||||
int strncmp(const char* s1, const char* s2, size_t n);
|
||||
int strcoll(const char* s1, const char* s2);
|
||||
size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
|
||||
const void* memchr(const void* s, int c, size_t n);
|
||||
void* memchr( void* s, int c, size_t n);
|
||||
const char* strchr(const char* s, int c);
|
||||
char* strchr( char* s, int c);
|
||||
size_t strcspn(const char* s1, const char* s2);
|
||||
const char* strpbrk(const char* s1, const char* s2);
|
||||
char* strpbrk( char* s1, const char* s2);
|
||||
const char* strrchr(const char* s, int c);
|
||||
char* strrchr( char* s, int c);
|
||||
size_t strspn(const char* s1, const char* s2);
|
||||
const char* strstr(const char* s1, const char* s2);
|
||||
char* strstr( char* s1, const char* s2);
|
||||
char* strtok(char* restrict s1, const char* restrict s2);
|
||||
void* memset(void* s, int c, size_t n);
|
||||
char* strerror(int errnum);
|
||||
size_t strlen(const char* s);
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
using ::size_t;
|
||||
using ::memcpy;
|
||||
using ::memmove;
|
||||
using ::strcpy;
|
||||
using ::strncpy;
|
||||
using ::strcat;
|
||||
using ::strncat;
|
||||
using ::memcmp;
|
||||
using ::strcmp;
|
||||
using ::strncmp;
|
||||
using ::strcoll;
|
||||
using ::strxfrm;
|
||||
using ::memchr;
|
||||
using ::strchr;
|
||||
using ::strcspn;
|
||||
using ::strpbrk;
|
||||
using ::strrchr;
|
||||
using ::strspn;
|
||||
using ::strstr;
|
||||
#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
|
||||
using ::strtok;
|
||||
#endif
|
||||
using ::memset;
|
||||
using ::strerror;
|
||||
using ::strlen;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CSTRING
|
118
third_party/libcxx.bak/initializer_list
vendored
118
third_party/libcxx.bak/initializer_list
vendored
|
@ -1,118 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- 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.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_INITIALIZER_LIST
|
||||
#define _LIBCPP_INITIALIZER_LIST
|
||||
|
||||
/*
|
||||
initializer_list synopsis
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template<class E>
|
||||
class initializer_list
|
||||
{
|
||||
public:
|
||||
typedef E value_type;
|
||||
typedef const E& reference;
|
||||
typedef const E& const_reference;
|
||||
typedef size_t size_type;
|
||||
|
||||
typedef const E* iterator;
|
||||
typedef const E* const_iterator;
|
||||
|
||||
initializer_list() noexcept; // constexpr in C++14
|
||||
|
||||
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; // constexpr in C++14
|
||||
template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in C++14
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
namespace std // purposefully not versioned
|
||||
{
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
||||
template<class _Ep>
|
||||
class _LIBCPP_TEMPLATE_VIS initializer_list
|
||||
{
|
||||
const _Ep* __begin_;
|
||||
size_t __size_;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
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 const _Ep* iterator;
|
||||
typedef const _Ep* const_iterator;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
size_t size() const _NOEXCEPT {return __size_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const _Ep* begin() const _NOEXCEPT {return __begin_;}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
_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
|
||||
{
|
||||
return __il.begin();
|
||||
}
|
||||
|
||||
template<class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
const _Ep*
|
||||
end(initializer_list<_Ep> __il) _NOEXCEPT
|
||||
{
|
||||
return __il.end();
|
||||
}
|
||||
|
||||
#endif // !defined(_LIBCPP_CXX03_LANG)
|
||||
|
||||
} // std
|
||||
|
||||
#endif // _LIBCPP_INITIALIZER_LIST
|
221
third_party/libcxx.bak/iosfwd
vendored
221
third_party/libcxx.bak/iosfwd
vendored
|
@ -1,221 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- iosfwd -----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_IOSFWD
|
||||
#define _LIBCPP_IOSFWD
|
||||
|
||||
/*
|
||||
iosfwd synopsis
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template<class charT> struct char_traits;
|
||||
template<> struct char_traits<char>;
|
||||
template<> struct char_traits<char8_t>; // C++20
|
||||
template<> struct char_traits<char16_t>;
|
||||
template<> struct char_traits<char32_t>;
|
||||
template<> struct char_traits<wchar_t>;
|
||||
|
||||
template<class T> class allocator;
|
||||
|
||||
class ios_base;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_ios;
|
||||
|
||||
template <class charT, class traits = char_traits<charT> > class basic_streambuf;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_istream;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_ostream;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_iostream;
|
||||
|
||||
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
class basic_stringbuf;
|
||||
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
class basic_istringstream;
|
||||
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
class basic_ostringstream;
|
||||
template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
class basic_stringstream;
|
||||
|
||||
template <class charT, class traits = char_traits<charT> > class basic_filebuf;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_ifstream;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_ofstream;
|
||||
template <class charT, class traits = char_traits<charT> > class basic_fstream;
|
||||
|
||||
template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
|
||||
template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
|
||||
|
||||
typedef basic_ios<char> ios;
|
||||
typedef basic_ios<wchar_t> wios;
|
||||
|
||||
typedef basic_streambuf<char> streambuf;
|
||||
typedef basic_istream<char> istream;
|
||||
typedef basic_ostream<char> ostream;
|
||||
typedef basic_iostream<char> iostream;
|
||||
|
||||
typedef basic_stringbuf<char> stringbuf;
|
||||
typedef basic_istringstream<char> istringstream;
|
||||
typedef basic_ostringstream<char> ostringstream;
|
||||
typedef basic_stringstream<char> stringstream;
|
||||
|
||||
typedef basic_filebuf<char> filebuf;
|
||||
typedef basic_ifstream<char> ifstream;
|
||||
typedef basic_ofstream<char> ofstream;
|
||||
typedef basic_fstream<char> fstream;
|
||||
|
||||
typedef basic_streambuf<wchar_t> wstreambuf;
|
||||
typedef basic_istream<wchar_t> wistream;
|
||||
typedef basic_ostream<wchar_t> wostream;
|
||||
typedef basic_iostream<wchar_t> wiostream;
|
||||
|
||||
typedef basic_stringbuf<wchar_t> wstringbuf;
|
||||
typedef basic_istringstream<wchar_t> wistringstream;
|
||||
typedef basic_ostringstream<wchar_t> wostringstream;
|
||||
typedef basic_stringstream<wchar_t> wstringstream;
|
||||
|
||||
typedef basic_filebuf<wchar_t> wfilebuf;
|
||||
typedef basic_ifstream<wchar_t> wifstream;
|
||||
typedef basic_ofstream<wchar_t> wofstream;
|
||||
typedef basic_fstream<wchar_t> wfstream;
|
||||
|
||||
template <class state> class fpos;
|
||||
typedef fpos<char_traits<char>::state_type> streampos;
|
||||
typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <wchar.h> // for mbstate_t
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
class _LIBCPP_TYPE_VIS ios_base;
|
||||
|
||||
template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;
|
||||
template<> struct char_traits<char>;
|
||||
#ifndef _LIBCPP_NO_HAS_CHAR8_T
|
||||
template<> struct char_traits<char8_t>;
|
||||
#endif
|
||||
template<> struct char_traits<char16_t>;
|
||||
template<> struct char_traits<char32_t>;
|
||||
template<> struct char_traits<wchar_t>;
|
||||
|
||||
template<class _Tp> class _LIBCPP_TEMPLATE_VIS allocator;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_ios;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_streambuf;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_istream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_ostream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_iostream;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_istringstream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_stringstream;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_filebuf;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_ifstream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_ofstream;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_fstream;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
|
||||
|
||||
typedef basic_ios<char> ios;
|
||||
typedef basic_ios<wchar_t> wios;
|
||||
|
||||
typedef basic_streambuf<char> streambuf;
|
||||
typedef basic_istream<char> istream;
|
||||
typedef basic_ostream<char> ostream;
|
||||
typedef basic_iostream<char> iostream;
|
||||
|
||||
typedef basic_stringbuf<char> stringbuf;
|
||||
typedef basic_istringstream<char> istringstream;
|
||||
typedef basic_ostringstream<char> ostringstream;
|
||||
typedef basic_stringstream<char> stringstream;
|
||||
|
||||
typedef basic_filebuf<char> filebuf;
|
||||
typedef basic_ifstream<char> ifstream;
|
||||
typedef basic_ofstream<char> ofstream;
|
||||
typedef basic_fstream<char> fstream;
|
||||
|
||||
typedef basic_streambuf<wchar_t> wstreambuf;
|
||||
typedef basic_istream<wchar_t> wistream;
|
||||
typedef basic_ostream<wchar_t> wostream;
|
||||
typedef basic_iostream<wchar_t> wiostream;
|
||||
|
||||
typedef basic_stringbuf<wchar_t> wstringbuf;
|
||||
typedef basic_istringstream<wchar_t> wistringstream;
|
||||
typedef basic_ostringstream<wchar_t> wostringstream;
|
||||
typedef basic_stringstream<wchar_t> wstringstream;
|
||||
|
||||
typedef basic_filebuf<wchar_t> wfilebuf;
|
||||
typedef basic_ifstream<wchar_t> wifstream;
|
||||
typedef basic_ofstream<wchar_t> wofstream;
|
||||
typedef basic_fstream<wchar_t> wfstream;
|
||||
|
||||
template <class _State> class _LIBCPP_TEMPLATE_VIS fpos;
|
||||
typedef fpos<mbstate_t> streampos;
|
||||
typedef fpos<mbstate_t> wstreampos;
|
||||
#ifndef _LIBCPP_NO_HAS_CHAR8_T
|
||||
typedef fpos<mbstate_t> u8streampos;
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef fpos<mbstate_t> u16streampos;
|
||||
typedef fpos<mbstate_t> u32streampos;
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
#if defined(_NEWLIB_VERSION)
|
||||
// On newlib, off_t is 'long int'
|
||||
typedef long int streamoff; // for char_traits in <string>
|
||||
#else
|
||||
typedef long long streamoff; // for char_traits in <string>
|
||||
#endif
|
||||
|
||||
template <class _CharT, // for <stdexcept>
|
||||
class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> >
|
||||
class _LIBCPP_TEMPLATE_VIS basic_string;
|
||||
typedef basic_string<char, char_traits<char>, allocator<char> > string;
|
||||
typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
|
||||
|
||||
|
||||
// Include other forward declarations here
|
||||
template <class _Tp, class _Alloc = allocator<_Tp> >
|
||||
class _LIBCPP_TEMPLATE_VIS vector;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_IOSFWD
|
57
third_party/libcxx.bak/libcxx.mk
vendored
57
third_party/libcxx.bak/libcxx.mk
vendored
|
@ -1,57 +0,0 @@
|
|||
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
||||
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
||||
|
||||
PKGS += THIRD_PARTY_LIBCXX
|
||||
|
||||
THIRD_PARTY_LIBCXX_ARTIFACTS += THIRD_PARTY_LIBCXX_A
|
||||
THIRD_PARTY_LIBCXX = $(THIRD_PARTY_LIBCXX_A_DEPS) $(THIRD_PARTY_LIBCXX_A)
|
||||
THIRD_PARTY_LIBCXX_A = o/$(MODE)/third_party/libcxx/libcxx.a
|
||||
THIRD_PARTY_LIBCXX_A_FILES := $(wildcard third_party/libcxx/*)
|
||||
THIRD_PARTY_LIBCXX_A_HDRS = $(filter %.h,$(THIRD_PARTY_LIBCXX_A_FILES))
|
||||
THIRD_PARTY_LIBCXX_A_INCS = $(filter %.inc,$(THIRD_PARTY_LIBCXX_A_FILES))
|
||||
THIRD_PARTY_LIBCXX_A_SRCS_S = $(filter %.S,$(THIRD_PARTY_LIBCXX_A_FILES))
|
||||
THIRD_PARTY_LIBCXX_A_SRCS_C = $(filter %.c,$(THIRD_PARTY_LIBCXX_A_FILES))
|
||||
THIRD_PARTY_LIBCXX_A_SRCS_CC = $(filter %.cc,$(THIRD_PARTY_LIBCXX_A_FILES))
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_SRCS = \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_S) \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_C)
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_OBJS = \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_S:%.S=o/$(MODE)/%.o) \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_C:%.c=o/$(MODE)/%.o) \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_CC:%.cc=o/$(MODE)/%.o)
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_CHECKS = \
|
||||
$(THIRD_PARTY_LIBCXX_A).pkg \
|
||||
$(THIRD_PARTY_LIBCXX_A_HDRS:%=o/$(MODE)/%.okk)
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_DIRECTDEPS = \
|
||||
LIBC_INTRIN \
|
||||
LIBC_NEXGEN32E \
|
||||
LIBC_MEM \
|
||||
LIBC_STUBS \
|
||||
LIBC_TINYMATH
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(THIRD_PARTY_LIBCXX_A_DIRECTDEPS),$($(x))))
|
||||
|
||||
$(THIRD_PARTY_LIBCXX_A): \
|
||||
third_party/libcxx/ \
|
||||
$(THIRD_PARTY_LIBCXX_A).pkg \
|
||||
$(THIRD_PARTY_LIBCXX_A_OBJS)
|
||||
|
||||
$(THIRD_PARTY_LIBCXX_A).pkg: \
|
||||
$(THIRD_PARTY_LIBCXX_A_OBJS) \
|
||||
$(foreach x,$(THIRD_PARTY_LIBCXX_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
THIRD_PARTY_LIBCXX_LIBS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)))
|
||||
THIRD_PARTY_LIBCXX_SRCS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)_SRCS))
|
||||
THIRD_PARTY_LIBCXX_HDRS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)_HDRS))
|
||||
THIRD_PARTY_LIBCXX_INCS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)_INCS))
|
||||
THIRD_PARTY_LIBCXX_CHECKS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)_CHECKS))
|
||||
THIRD_PARTY_LIBCXX_OBJS = $(foreach x,$(THIRD_PARTY_LIBCXX_ARTIFACTS),$($(x)_OBJS))
|
||||
|
||||
.PHONY: o/$(MODE)/third_party/libcxx
|
||||
o/$(MODE)/third_party/libcxx: $(THIRD_PARTY_LIBCXX_CHECKS)
|
||||
|
819
third_party/libcxx.bak/limits
vendored
819
third_party/libcxx.bak/limits
vendored
|
@ -1,819 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===---------------------------- limits ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_LIMITS
|
||||
#define _LIBCPP_LIMITS
|
||||
|
||||
/*
|
||||
limits synopsis
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template<class T>
|
||||
class numeric_limits
|
||||
{
|
||||
public:
|
||||
static constexpr bool is_specialized = false;
|
||||
static constexpr T min() noexcept;
|
||||
static constexpr T max() noexcept;
|
||||
static constexpr T lowest() noexcept;
|
||||
|
||||
static constexpr int digits = 0;
|
||||
static constexpr int digits10 = 0;
|
||||
static constexpr int max_digits10 = 0;
|
||||
static constexpr bool is_signed = false;
|
||||
static constexpr bool is_integer = false;
|
||||
static constexpr bool is_exact = false;
|
||||
static constexpr int radix = 0;
|
||||
static constexpr T epsilon() noexcept;
|
||||
static constexpr T round_error() noexcept;
|
||||
|
||||
static constexpr int min_exponent = 0;
|
||||
static constexpr int min_exponent10 = 0;
|
||||
static constexpr int max_exponent = 0;
|
||||
static constexpr int max_exponent10 = 0;
|
||||
|
||||
static constexpr bool has_infinity = false;
|
||||
static constexpr bool has_quiet_NaN = false;
|
||||
static constexpr bool has_signaling_NaN = false;
|
||||
static constexpr float_denorm_style has_denorm = denorm_absent;
|
||||
static constexpr bool has_denorm_loss = false;
|
||||
static constexpr T infinity() noexcept;
|
||||
static constexpr T quiet_NaN() noexcept;
|
||||
static constexpr T signaling_NaN() noexcept;
|
||||
static constexpr T denorm_min() noexcept;
|
||||
|
||||
static constexpr bool is_iec559 = false;
|
||||
static constexpr bool is_bounded = false;
|
||||
static constexpr bool is_modulo = false;
|
||||
|
||||
static constexpr bool traps = false;
|
||||
static constexpr bool tinyness_before = false;
|
||||
static constexpr float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
enum float_round_style
|
||||
{
|
||||
round_indeterminate = -1,
|
||||
round_toward_zero = 0,
|
||||
round_to_nearest = 1,
|
||||
round_toward_infinity = 2,
|
||||
round_toward_neg_infinity = 3
|
||||
};
|
||||
|
||||
enum float_denorm_style
|
||||
{
|
||||
denorm_indeterminate = -1,
|
||||
denorm_absent = 0,
|
||||
denorm_present = 1
|
||||
};
|
||||
|
||||
template<> class numeric_limits<cv bool>;
|
||||
|
||||
template<> class numeric_limits<cv char>;
|
||||
template<> class numeric_limits<cv signed char>;
|
||||
template<> class numeric_limits<cv unsigned char>;
|
||||
template<> class numeric_limits<cv wchar_t>;
|
||||
template<> class numeric_limits<cv char8_t>; // C++20
|
||||
template<> class numeric_limits<cv char16_t>;
|
||||
template<> class numeric_limits<cv char32_t>;
|
||||
|
||||
template<> class numeric_limits<cv short>;
|
||||
template<> class numeric_limits<cv int>;
|
||||
template<> class numeric_limits<cv long>;
|
||||
template<> class numeric_limits<cv long long>;
|
||||
template<> class numeric_limits<cv unsigned short>;
|
||||
template<> class numeric_limits<cv unsigned int>;
|
||||
template<> class numeric_limits<cv unsigned long>;
|
||||
template<> class numeric_limits<cv unsigned long long>;
|
||||
|
||||
template<> class numeric_limits<cv float>;
|
||||
template<> class numeric_limits<cv double>;
|
||||
template<> class numeric_limits<cv long double>;
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
#include <__config>
|
||||
#include <type_traits>
|
||||
|
||||
#if defined(_LIBCPP_COMPILER_MSVC)
|
||||
#include "support/win32/limits_msvc_win32.h"
|
||||
#endif // _LIBCPP_MSVCRT
|
||||
|
||||
#if defined(__IBMCPP__)
|
||||
#include "support/ibm/limits.h"
|
||||
#endif // __IBMCPP__
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
#include <version>
|
||||
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
enum float_round_style
|
||||
{
|
||||
round_indeterminate = -1,
|
||||
round_toward_zero = 0,
|
||||
round_to_nearest = 1,
|
||||
round_toward_infinity = 2,
|
||||
round_toward_neg_infinity = 3
|
||||
};
|
||||
|
||||
enum float_denorm_style
|
||||
{
|
||||
denorm_indeterminate = -1,
|
||||
denorm_absent = 0,
|
||||
denorm_present = 1
|
||||
};
|
||||
|
||||
template <class _Tp, bool = is_arithmetic<_Tp>::value>
|
||||
class __libcpp_numeric_limits
|
||||
{
|
||||
protected:
|
||||
typedef _Tp type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int digits = 0;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 0;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <class _Tp, int __digits, bool _IsSigned>
|
||||
struct __libcpp_compute_min
|
||||
{
|
||||
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
|
||||
};
|
||||
|
||||
template <class _Tp, int __digits>
|
||||
struct __libcpp_compute_min<_Tp, __digits, false>
|
||||
{
|
||||
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
class __libcpp_numeric_limits<_Tp, true>
|
||||
{
|
||||
protected:
|
||||
typedef _Tp type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
|
||||
static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
|
||||
static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
|
||||
defined(__wasm__)
|
||||
static _LIBCPP_CONSTEXPR const bool traps = true;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <>
|
||||
class __libcpp_numeric_limits<bool, true>
|
||||
{
|
||||
protected:
|
||||
typedef bool type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
||||
static _LIBCPP_CONSTEXPR const int digits = 1;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const type __min = false;
|
||||
static _LIBCPP_CONSTEXPR const type __max = true;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <>
|
||||
class __libcpp_numeric_limits<float, true>
|
||||
{
|
||||
protected:
|
||||
typedef float type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <>
|
||||
class __libcpp_numeric_limits<double, true>
|
||||
{
|
||||
protected:
|
||||
typedef double type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <>
|
||||
class __libcpp_numeric_limits<long double, true>
|
||||
{
|
||||
protected:
|
||||
typedef long double type;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
|
||||
|
||||
#if (defined(__ppc__) || defined(__ppc64__))
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS numeric_limits
|
||||
: private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
|
||||
{
|
||||
typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
|
||||
typedef typename __base::type type;
|
||||
public:
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp>
|
||||
: private numeric_limits<_Tp>
|
||||
{
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp>
|
||||
: private numeric_limits<_Tp>
|
||||
{
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
|
||||
|
||||
template <class _Tp>
|
||||
class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp>
|
||||
: private numeric_limits<_Tp>
|
||||
{
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
|
||||
template <class _Tp>
|
||||
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP_LIMITS
|
5371
third_party/libcxx.bak/memory
vendored
5371
third_party/libcxx.bak/memory
vendored
File diff suppressed because it is too large
Load diff
305
third_party/libcxx.bak/stdexcept
vendored
305
third_party/libcxx.bak/stdexcept
vendored
|
@ -1,305 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- stdexcept --------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_STDEXCEPT
|
||||
#define _LIBCPP_STDEXCEPT
|
||||
|
||||
/*
|
||||
stdexcept synopsis
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
class logic_error;
|
||||
class domain_error;
|
||||
class invalid_argument;
|
||||
class length_error;
|
||||
class out_of_range;
|
||||
class runtime_error;
|
||||
class range_error;
|
||||
class overflow_error;
|
||||
class underflow_error;
|
||||
|
||||
for each class xxx_error:
|
||||
|
||||
class xxx_error : public exception // at least indirectly
|
||||
{
|
||||
public:
|
||||
explicit xxx_error(const string& what_arg);
|
||||
explicit xxx_error(const char* what_arg);
|
||||
|
||||
virtual const char* what() const noexcept // returns what_arg
|
||||
};
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
#include <exception>
|
||||
#include <iosfwd> // for string forward decl
|
||||
#ifdef _LIBCPP_NO_EXCEPTIONS
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
class _LIBCPP_HIDDEN __libcpp_refstring
|
||||
{
|
||||
const char* __imp_;
|
||||
|
||||
bool __uses_refcount() const;
|
||||
public:
|
||||
explicit __libcpp_refstring(const char* __msg);
|
||||
__libcpp_refstring(const __libcpp_refstring& __s) _NOEXCEPT;
|
||||
__libcpp_refstring& operator=(const __libcpp_refstring& __s) _NOEXCEPT;
|
||||
~__libcpp_refstring();
|
||||
|
||||
const char* c_str() const _NOEXCEPT {return __imp_;}
|
||||
};
|
||||
#endif // !_LIBCPP_ABI_VCRUNTIME
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
namespace std // purposefully not using versioning namespace
|
||||
{
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI logic_error
|
||||
: public exception
|
||||
{
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
private:
|
||||
_VSTD::__libcpp_refstring __imp_;
|
||||
public:
|
||||
explicit logic_error(const string&);
|
||||
explicit logic_error(const char*);
|
||||
|
||||
logic_error(const logic_error&) _NOEXCEPT;
|
||||
logic_error& operator=(const logic_error&) _NOEXCEPT;
|
||||
|
||||
virtual ~logic_error() _NOEXCEPT;
|
||||
|
||||
virtual const char* what() const _NOEXCEPT;
|
||||
#else
|
||||
public:
|
||||
explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string
|
||||
_LIBCPP_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI runtime_error
|
||||
: public exception
|
||||
{
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
private:
|
||||
_VSTD::__libcpp_refstring __imp_;
|
||||
public:
|
||||
explicit runtime_error(const string&);
|
||||
explicit runtime_error(const char*);
|
||||
|
||||
runtime_error(const runtime_error&) _NOEXCEPT;
|
||||
runtime_error& operator=(const runtime_error&) _NOEXCEPT;
|
||||
|
||||
virtual ~runtime_error() _NOEXCEPT;
|
||||
|
||||
virtual const char* what() const _NOEXCEPT;
|
||||
#else
|
||||
public:
|
||||
explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string
|
||||
_LIBCPP_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {}
|
||||
#endif // _LIBCPP_ABI_VCRUNTIME
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI domain_error
|
||||
: public logic_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s) : logic_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~domain_error() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI invalid_argument
|
||||
: public logic_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s) : logic_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~invalid_argument() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI length_error
|
||||
: public logic_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {}
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~length_error() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI out_of_range
|
||||
: public logic_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s) : logic_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~out_of_range() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI range_error
|
||||
: public runtime_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~range_error() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI overflow_error
|
||||
: public runtime_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~overflow_error() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
class _LIBCPP_EXCEPTION_ABI underflow_error
|
||||
: public runtime_error
|
||||
{
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {}
|
||||
_LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s) : runtime_error(__s) {}
|
||||
|
||||
#ifndef _LIBCPP_ABI_VCRUNTIME
|
||||
virtual ~underflow_error() _NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // std
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
// in the dylib
|
||||
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_logic_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw logic_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_domain_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw domain_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_invalid_argument(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw invalid_argument(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_length_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw length_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_out_of_range(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw out_of_range(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_range_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw range_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_overflow_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw overflow_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||
void __throw_underflow_error(const char*__msg)
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw underflow_error(__msg);
|
||||
#else
|
||||
((void)__msg);
|
||||
_VSTD::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_STDEXCEPT
|
4061
third_party/libcxx.bak/type_traits
vendored
4061
third_party/libcxx.bak/type_traits
vendored
File diff suppressed because it is too large
Load diff
238
third_party/libcxx.bak/version
vendored
238
third_party/libcxx.bak/version
vendored
|
@ -1,238 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- version ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _LIBCPP_VERSIONH
|
||||
#define _LIBCPP_VERSIONH
|
||||
|
||||
/*
|
||||
version synopsis
|
||||
|
||||
Macro name Value Headers
|
||||
__cpp_lib_addressof_constexpr 201603L <memory>
|
||||
__cpp_lib_allocator_traits_is_always_equal 201411L <memory> <scoped_allocator> <string>
|
||||
<deque> <forward_list> <list>
|
||||
<vector> <map> <set>
|
||||
<unordered_map> <unordered_set>
|
||||
__cpp_lib_any 201606L <any>
|
||||
__cpp_lib_apply 201603L <tuple>
|
||||
__cpp_lib_array_constexpr 201603L <iterator> <array>
|
||||
__cpp_lib_as_const 201510L <utility>
|
||||
__cpp_lib_atomic_is_always_lock_free 201603L <atomic>
|
||||
__cpp_lib_atomic_ref 201806L <atomic>
|
||||
__cpp_lib_bind_front 201811L <functional>
|
||||
__cpp_lib_bit_cast 201806L <bit>
|
||||
__cpp_lib_bool_constant 201505L <type_traits>
|
||||
__cpp_lib_boyer_moore_searcher 201603L <functional>
|
||||
__cpp_lib_byte 201603L <cstddef>
|
||||
__cpp_lib_char8_t 201811L <atomic> <filesystem> <istream>
|
||||
<limits> <locale> <ostream>
|
||||
<string> <string_view>
|
||||
__cpp_lib_chrono 201611L <chrono>
|
||||
__cpp_lib_chrono_udls 201304L <chrono>
|
||||
__cpp_lib_clamp 201603L <algorithm>
|
||||
__cpp_lib_complex_udls 201309L <complex>
|
||||
__cpp_lib_concepts 201806L <concepts>
|
||||
__cpp_lib_constexpr_misc 201811L <array> <functional> <iterator>
|
||||
<string_view> <tuple> <utility>
|
||||
__cpp_lib_constexpr_swap_algorithms 201806L <algorithm>
|
||||
__cpp_lib_destroying_delete 201806L <new>
|
||||
__cpp_lib_enable_shared_from_this 201603L <memory>
|
||||
__cpp_lib_erase_if 201811L <string> <deque> <forward_list>
|
||||
<list> <vector> <map>
|
||||
<set> <unordered_map> <unordered_set>
|
||||
__cpp_lib_exchange_function 201304L <utility>
|
||||
__cpp_lib_execution 201603L <execution>
|
||||
__cpp_lib_filesystem 201703L <filesystem>
|
||||
__cpp_lib_gcd_lcm 201606L <numeric>
|
||||
__cpp_lib_generic_associative_lookup 201304L <map> <set>
|
||||
__cpp_lib_generic_unordered_lookup 201811L <unordered_map> <unordered_set>
|
||||
__cpp_lib_hardware_interference_size 201703L <new>
|
||||
__cpp_lib_has_unique_object_representations 201606L <type_traits>
|
||||
__cpp_lib_hypot 201603L <cmath>
|
||||
__cpp_lib_incomplete_container_elements 201505L <forward_list> <list> <vector>
|
||||
__cpp_lib_integer_sequence 201304L <utility>
|
||||
__cpp_lib_integral_constant_callable 201304L <type_traits>
|
||||
__cpp_lib_interpolate 201902L <numeric>
|
||||
__cpp_lib_invoke 201411L <functional>
|
||||
__cpp_lib_is_aggregate 201703L <type_traits>
|
||||
__cpp_lib_is_constant_evaluated 201811L <type_traits>
|
||||
__cpp_lib_is_final 201402L <type_traits>
|
||||
__cpp_lib_is_invocable 201703L <type_traits>
|
||||
__cpp_lib_is_null_pointer 201309L <type_traits>
|
||||
__cpp_lib_is_swappable 201603L <type_traits>
|
||||
__cpp_lib_launder 201606L <new>
|
||||
__cpp_lib_list_remove_return_type 201806L <forward_list> <list>
|
||||
__cpp_lib_logical_traits 201510L <type_traits>
|
||||
__cpp_lib_make_from_tuple 201606L <tuple>
|
||||
__cpp_lib_make_reverse_iterator 201402L <iterator>
|
||||
__cpp_lib_make_unique 201304L <memory>
|
||||
__cpp_lib_map_try_emplace 201411L <map>
|
||||
__cpp_lib_math_special_functions 201603L <cmath>
|
||||
__cpp_lib_memory_resource 201603L <memory_resource>
|
||||
__cpp_lib_node_extract 201606L <map> <set> <unordered_map>
|
||||
<unordered_set>
|
||||
__cpp_lib_nonmember_container_access 201411L <iterator> <array> <deque>
|
||||
<forward_list> <list> <map>
|
||||
<regex> <set> <string>
|
||||
<unordered_map> <unordered_set> <vector>
|
||||
__cpp_lib_not_fn 201603L <functional>
|
||||
__cpp_lib_null_iterators 201304L <iterator>
|
||||
__cpp_lib_optional 201606L <optional>
|
||||
__cpp_lib_parallel_algorithm 201603L <algorithm> <numeric>
|
||||
__cpp_lib_quoted_string_io 201304L <iomanip>
|
||||
__cpp_lib_ranges 201811L <algorithm> <functional> <iterator>
|
||||
<memory> <ranges>
|
||||
__cpp_lib_raw_memory_algorithms 201606L <memory>
|
||||
__cpp_lib_result_of_sfinae 201210L <functional> <type_traits>
|
||||
__cpp_lib_robust_nonmodifying_seq_ops 201304L <algorithm>
|
||||
__cpp_lib_sample 201603L <algorithm>
|
||||
__cpp_lib_scoped_lock 201703L <mutex>
|
||||
__cpp_lib_shared_mutex 201505L <shared_mutex>
|
||||
__cpp_lib_shared_ptr_arrays 201611L <memory>
|
||||
__cpp_lib_shared_ptr_weak_type 201606L <memory>
|
||||
__cpp_lib_shared_timed_mutex 201402L <shared_mutex>
|
||||
__cpp_lib_string_udls 201304L <string>
|
||||
__cpp_lib_string_view 201606L <string> <string_view>
|
||||
__cpp_lib_three_way_comparison 201711L <compare>
|
||||
__cpp_lib_to_chars 201611L <utility>
|
||||
__cpp_lib_transformation_trait_aliases 201304L <type_traits>
|
||||
__cpp_lib_transparent_operators 201510L <functional>
|
||||
201210L // C++14
|
||||
__cpp_lib_tuple_element_t 201402L <tuple>
|
||||
__cpp_lib_tuples_by_type 201304L <utility> <tuple>
|
||||
__cpp_lib_type_trait_variable_templates 201510L <type_traits>
|
||||
__cpp_lib_uncaught_exceptions 201411L <exception>
|
||||
__cpp_lib_unordered_map_try_emplace 201411L <unordered_map>
|
||||
__cpp_lib_variant 201606L <variant>
|
||||
__cpp_lib_void_t 201411L <type_traits>
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
# define __cpp_lib_chrono_udls 201304L
|
||||
# define __cpp_lib_complex_udls 201309L
|
||||
# define __cpp_lib_exchange_function 201304L
|
||||
# define __cpp_lib_generic_associative_lookup 201304L
|
||||
# define __cpp_lib_integer_sequence 201304L
|
||||
# define __cpp_lib_integral_constant_callable 201304L
|
||||
# define __cpp_lib_is_final 201402L
|
||||
# define __cpp_lib_is_null_pointer 201309L
|
||||
# define __cpp_lib_make_reverse_iterator 201402L
|
||||
# define __cpp_lib_make_unique 201304L
|
||||
# define __cpp_lib_null_iterators 201304L
|
||||
# define __cpp_lib_quoted_string_io 201304L
|
||||
# define __cpp_lib_result_of_sfinae 201210L
|
||||
# define __cpp_lib_robust_nonmodifying_seq_ops 201304L
|
||||
# if !defined(_LIBCPP_HAS_NO_THREADS)
|
||||
# define __cpp_lib_shared_timed_mutex 201402L
|
||||
# endif
|
||||
# define __cpp_lib_string_udls 201304L
|
||||
# define __cpp_lib_transformation_trait_aliases 201304L
|
||||
# define __cpp_lib_transparent_operators 201210L
|
||||
# define __cpp_lib_tuple_element_t 201402L
|
||||
# define __cpp_lib_tuples_by_type 201304L
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER > 14
|
||||
# if !defined(_LIBCPP_HAS_NO_BUILTIN_ADDRESSOF)
|
||||
# define __cpp_lib_addressof_constexpr 201603L
|
||||
# endif
|
||||
# define __cpp_lib_allocator_traits_is_always_equal 201411L
|
||||
# define __cpp_lib_any 201606L
|
||||
# define __cpp_lib_apply 201603L
|
||||
# define __cpp_lib_array_constexpr 201603L
|
||||
# define __cpp_lib_as_const 201510L
|
||||
# if !defined(_LIBCPP_HAS_NO_THREADS)
|
||||
# define __cpp_lib_atomic_is_always_lock_free 201603L
|
||||
# endif
|
||||
# define __cpp_lib_bool_constant 201505L
|
||||
// # define __cpp_lib_boyer_moore_searcher 201603L
|
||||
# define __cpp_lib_byte 201603L
|
||||
# define __cpp_lib_chrono 201611L
|
||||
# define __cpp_lib_clamp 201603L
|
||||
# define __cpp_lib_enable_shared_from_this 201603L
|
||||
// # define __cpp_lib_execution 201603L
|
||||
# define __cpp_lib_filesystem 201703L
|
||||
# define __cpp_lib_gcd_lcm 201606L
|
||||
# define __cpp_lib_hardware_interference_size 201703L
|
||||
# if defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS)
|
||||
# define __cpp_lib_has_unique_object_representations 201606L
|
||||
# endif
|
||||
# define __cpp_lib_hypot 201603L
|
||||
# define __cpp_lib_incomplete_container_elements 201505L
|
||||
# define __cpp_lib_invoke 201411L
|
||||
# if !defined(_LIBCPP_HAS_NO_IS_AGGREGATE)
|
||||
# define __cpp_lib_is_aggregate 201703L
|
||||
# endif
|
||||
# define __cpp_lib_is_invocable 201703L
|
||||
# define __cpp_lib_is_swappable 201603L
|
||||
# define __cpp_lib_launder 201606L
|
||||
# define __cpp_lib_logical_traits 201510L
|
||||
# define __cpp_lib_make_from_tuple 201606L
|
||||
# define __cpp_lib_map_try_emplace 201411L
|
||||
// # define __cpp_lib_math_special_functions 201603L
|
||||
// # define __cpp_lib_memory_resource 201603L
|
||||
# define __cpp_lib_node_extract 201606L
|
||||
# define __cpp_lib_nonmember_container_access 201411L
|
||||
# define __cpp_lib_not_fn 201603L
|
||||
# define __cpp_lib_optional 201606L
|
||||
// # define __cpp_lib_parallel_algorithm 201603L
|
||||
# define __cpp_lib_raw_memory_algorithms 201606L
|
||||
# define __cpp_lib_sample 201603L
|
||||
# define __cpp_lib_scoped_lock 201703L
|
||||
# if !defined(_LIBCPP_HAS_NO_THREADS)
|
||||
# define __cpp_lib_shared_mutex 201505L
|
||||
# endif
|
||||
// # define __cpp_lib_shared_ptr_arrays 201611L
|
||||
# define __cpp_lib_shared_ptr_weak_type 201606L
|
||||
# define __cpp_lib_string_view 201606L
|
||||
// # define __cpp_lib_to_chars 201611L
|
||||
# undef __cpp_lib_transparent_operators
|
||||
# define __cpp_lib_transparent_operators 201510L
|
||||
# define __cpp_lib_type_trait_variable_templates 201510L
|
||||
# define __cpp_lib_uncaught_exceptions 201411L
|
||||
# define __cpp_lib_unordered_map_try_emplace 201411L
|
||||
# define __cpp_lib_variant 201606L
|
||||
# define __cpp_lib_void_t 201411L
|
||||
#endif
|
||||
|
||||
#if _LIBCPP_STD_VER > 17
|
||||
# if !defined(_LIBCPP_HAS_NO_THREADS)
|
||||
// # define __cpp_lib_atomic_ref 201806L
|
||||
# endif
|
||||
// # define __cpp_lib_bind_front 201811L
|
||||
// # define __cpp_lib_bit_cast 201806L
|
||||
# if !defined(_LIBCPP_NO_HAS_CHAR8_T)
|
||||
# define __cpp_lib_char8_t 201811L
|
||||
# endif
|
||||
// # define __cpp_lib_concepts 201806L
|
||||
// # define __cpp_lib_constexpr_misc 201811L
|
||||
// # define __cpp_lib_constexpr_swap_algorithms 201806L
|
||||
# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
|
||||
# define __cpp_lib_destroying_delete 201806L
|
||||
# endif
|
||||
# define __cpp_lib_erase_if 201811L
|
||||
// # define __cpp_lib_generic_unordered_lookup 201811L
|
||||
# define __cpp_lib_interpolate 201902L
|
||||
# if !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
|
||||
# define __cpp_lib_is_constant_evaluated 201811L
|
||||
# endif
|
||||
// # define __cpp_lib_list_remove_return_type 201806L
|
||||
// # define __cpp_lib_ranges 201811L
|
||||
// # define __cpp_lib_three_way_comparison 201711L
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_VERSIONH
|
182
third_party/libcxx.bak/wchar.h
vendored
182
third_party/libcxx.bak/wchar.h
vendored
|
@ -1,182 +0,0 @@
|
|||
// clang-format off
|
||||
// -*- C++ -*-
|
||||
//===--------------------------- wchar.h ----------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if defined(__need_wint_t) || defined(__need_mbstate_t)
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include_next <wchar.h>
|
||||
|
||||
#elif !defined(_LIBCPP_WCHAR_H)
|
||||
#define _LIBCPP_WCHAR_H
|
||||
|
||||
/*
|
||||
wchar.h synopsis
|
||||
|
||||
Macros:
|
||||
|
||||
NULL
|
||||
WCHAR_MAX
|
||||
WCHAR_MIN
|
||||
WEOF
|
||||
|
||||
Types:
|
||||
|
||||
mbstate_t
|
||||
size_t
|
||||
tm
|
||||
wint_t
|
||||
|
||||
int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
|
||||
int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
|
||||
int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...);
|
||||
int swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...);
|
||||
int vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg);
|
||||
int vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg); // C99
|
||||
int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg);
|
||||
int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg); // C99
|
||||
int vwprintf(const wchar_t* restrict format, va_list arg);
|
||||
int vwscanf(const wchar_t* restrict format, va_list arg); // C99
|
||||
int wprintf(const wchar_t* restrict format, ...);
|
||||
int wscanf(const wchar_t* restrict format, ...);
|
||||
wint_t fgetwc(FILE* stream);
|
||||
wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
|
||||
wint_t fputwc(wchar_t c, FILE* stream);
|
||||
int fputws(const wchar_t* restrict s, FILE* restrict stream);
|
||||
int fwide(FILE* stream, int mode);
|
||||
wint_t getwc(FILE* stream);
|
||||
wint_t getwchar();
|
||||
wint_t putwc(wchar_t c, FILE* stream);
|
||||
wint_t putwchar(wchar_t c);
|
||||
wint_t ungetwc(wint_t c, FILE* stream);
|
||||
double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
|
||||
float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr); // C99
|
||||
long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr); // C99
|
||||
long wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
|
||||
long long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); // C99
|
||||
unsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
|
||||
unsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); // C99
|
||||
wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
|
||||
wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
|
||||
wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
|
||||
wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
|
||||
int wcscmp(const wchar_t* s1, const wchar_t* s2);
|
||||
int wcscoll(const wchar_t* s1, const wchar_t* s2);
|
||||
int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
|
||||
size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
|
||||
const wchar_t* wcschr(const wchar_t* s, wchar_t c);
|
||||
wchar_t* wcschr( wchar_t* s, wchar_t c);
|
||||
size_t wcscspn(const wchar_t* s1, const wchar_t* s2);
|
||||
size_t wcslen(const wchar_t* s);
|
||||
const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
|
||||
wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
|
||||
const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
|
||||
wchar_t* wcsrchr( wchar_t* s, wchar_t c);
|
||||
size_t wcsspn(const wchar_t* s1, const wchar_t* s2);
|
||||
const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
|
||||
wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
|
||||
wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr);
|
||||
const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
|
||||
wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
|
||||
int wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
|
||||
wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
|
||||
wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
|
||||
wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
|
||||
size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format,
|
||||
const tm* restrict timeptr);
|
||||
wint_t btowc(int c);
|
||||
int wctob(wint_t c);
|
||||
int mbsinit(const mbstate_t* ps);
|
||||
size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
|
||||
size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps);
|
||||
size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
|
||||
size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len,
|
||||
mbstate_t* restrict ps);
|
||||
size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
|
||||
mbstate_t* restrict ps);
|
||||
|
||||
*/
|
||||
|
||||
#include <__config>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
|
||||
#endif
|
||||
|
||||
#include_next <wchar.h>
|
||||
|
||||
// Determine whether we have const-correct overloads for wcschr and friends.
|
||||
#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
|
||||
# define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
|
||||
#elif defined(__GLIBC_PREREQ)
|
||||
# if __GLIBC_PREREQ(2, 10)
|
||||
# define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
|
||||
# endif
|
||||
#elif defined(_LIBCPP_MSVCRT)
|
||||
# if defined(_CRT_CONST_CORRECT_OVERLOADS)
|
||||
# define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
|
||||
extern "C++" {
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
const wchar_t* wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
wchar_t* wcspbrk( wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
wchar_t* wcsrchr( wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
wchar_t* wcsstr( wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
|
||||
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
|
||||
wchar_t* wmemchr( wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && defined(_LIBCPP_MSVCRT_LIKE)
|
||||
extern "C" {
|
||||
size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
|
||||
size_t nmc, size_t len, mbstate_t *__restrict ps);
|
||||
size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
|
||||
size_t nwc, size_t len, mbstate_t *__restrict ps);
|
||||
} // extern "C++"
|
||||
#endif // __cplusplus && _LIBCPP_MSVCRT
|
||||
|
||||
#endif // _LIBCPP_WCHAR_H
|
Loading…
Add table
Reference in a new issue