update libcxx to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
This commit is contained in:
parent
dab0cf6428
commit
70e05c67ce
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -69,7 +68,7 @@ public:
|
|||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
|
_LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
|
||||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
|
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
|
||||||
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__ctz(__mask_)));}
|
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
|
||||||
private:
|
private:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
|
__bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
|
||||||
@ -141,7 +140,7 @@ public:
|
|||||||
{return static_cast<bool>(*__seg_ & __mask_);}
|
{return static_cast<bool>(*__seg_ & __mask_);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
|
_LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
|
||||||
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__ctz(__mask_)));}
|
{return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
|
||||||
private:
|
private:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
_LIBCPP_CONSTEXPR
|
_LIBCPP_CONSTEXPR
|
||||||
@ -168,7 +167,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
||||||
__storage_type __b = *__first.__seg_ & __m;
|
__storage_type __b = *__first.__seg_ & __m;
|
||||||
if (__b)
|
if (__b)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
|
||||||
if (__n == __dn)
|
if (__n == __dn)
|
||||||
return __first + __n;
|
return __first + __n;
|
||||||
__n -= __dn;
|
__n -= __dn;
|
||||||
@ -177,14 +176,14 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
// do middle whole words
|
// do middle whole words
|
||||||
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
||||||
if (*__first.__seg_)
|
if (*__first.__seg_)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(*__first.__seg_)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(*__first.__seg_)));
|
||||||
// do last partial word
|
// do last partial word
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
{
|
{
|
||||||
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
||||||
__storage_type __b = *__first.__seg_ & __m;
|
__storage_type __b = *__first.__seg_ & __m;
|
||||||
if (__b)
|
if (__b)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
|
||||||
}
|
}
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(__n));
|
return _It(__first.__seg_, static_cast<unsigned>(__n));
|
||||||
}
|
}
|
||||||
@ -204,7 +203,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
||||||
__storage_type __b = ~*__first.__seg_ & __m;
|
__storage_type __b = ~*__first.__seg_ & __m;
|
||||||
if (__b)
|
if (__b)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
|
||||||
if (__n == __dn)
|
if (__n == __dn)
|
||||||
return __first + __n;
|
return __first + __n;
|
||||||
__n -= __dn;
|
__n -= __dn;
|
||||||
@ -215,7 +214,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
{
|
{
|
||||||
__storage_type __b = ~*__first.__seg_;
|
__storage_type __b = ~*__first.__seg_;
|
||||||
if (__b)
|
if (__b)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
|
||||||
}
|
}
|
||||||
// do last partial word
|
// do last partial word
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
@ -223,7 +222,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
||||||
__storage_type __b = ~*__first.__seg_ & __m;
|
__storage_type __b = ~*__first.__seg_ & __m;
|
||||||
if (__b)
|
if (__b)
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__ctz(__b)));
|
return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
|
||||||
}
|
}
|
||||||
return _It(__first.__seg_, static_cast<unsigned>(__n));
|
return _It(__first.__seg_, static_cast<unsigned>(__n));
|
||||||
}
|
}
|
||||||
@ -255,18 +254,18 @@ __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
|
|||||||
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
|
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
|
||||||
__storage_type __dn = _VSTD::min(__clz_f, __n);
|
__storage_type __dn = _VSTD::min(__clz_f, __n);
|
||||||
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
||||||
__r = _VSTD::__popcount(*__first.__seg_ & __m);
|
__r = _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
|
||||||
__n -= __dn;
|
__n -= __dn;
|
||||||
++__first.__seg_;
|
++__first.__seg_;
|
||||||
}
|
}
|
||||||
// do middle whole words
|
// do middle whole words
|
||||||
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
||||||
__r += _VSTD::__popcount(*__first.__seg_);
|
__r += _VSTD::__libcpp_popcount(*__first.__seg_);
|
||||||
// do last partial word
|
// do last partial word
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
{
|
{
|
||||||
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
||||||
__r += _VSTD::__popcount(*__first.__seg_ & __m);
|
__r += _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
|
||||||
}
|
}
|
||||||
return __r;
|
return __r;
|
||||||
}
|
}
|
||||||
@ -286,18 +285,18 @@ __count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_typ
|
|||||||
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
|
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
|
||||||
__storage_type __dn = _VSTD::min(__clz_f, __n);
|
__storage_type __dn = _VSTD::min(__clz_f, __n);
|
||||||
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
|
||||||
__r = _VSTD::__popcount(~*__first.__seg_ & __m);
|
__r = _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
|
||||||
__n -= __dn;
|
__n -= __dn;
|
||||||
++__first.__seg_;
|
++__first.__seg_;
|
||||||
}
|
}
|
||||||
// do middle whole words
|
// do middle whole words
|
||||||
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
|
||||||
__r += _VSTD::__popcount(~*__first.__seg_);
|
__r += _VSTD::__libcpp_popcount(~*__first.__seg_);
|
||||||
// do last partial word
|
// do last partial word
|
||||||
if (__n > 0)
|
if (__n > 0)
|
||||||
{
|
{
|
||||||
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
__storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
|
||||||
__r += _VSTD::__popcount(~*__first.__seg_ & __m);
|
__r += _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
|
||||||
}
|
}
|
||||||
return __r;
|
return __r;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------- __bsd_locale_defaults.h -----------------------===//
|
//===---------------------- __bsd_locale_defaults.h -----------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// The BSDs have lots of *_l functions. We don't want to define those symbols
|
// The BSDs have lots of *_l functions. We don't want to define those symbols
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------- __bsd_locale_fallbacks.h ----------------------===//
|
//===---------------------- __bsd_locale_fallbacks.h ----------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// The BSDs have lots of *_l functions. This file provides reimplementations
|
// The BSDs have lots of *_l functions. This file provides reimplementations
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- __config ---------------------------------===//
|
//===--------------------------- __config ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -33,12 +32,16 @@
|
|||||||
# define _GNUC_VER_NEW 0
|
# define _GNUC_VER_NEW 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _LIBCPP_VERSION 8000
|
#define _LIBCPP_VERSION 9000
|
||||||
|
|
||||||
#ifndef _LIBCPP_ABI_VERSION
|
#ifndef _LIBCPP_ABI_VERSION
|
||||||
# define _LIBCPP_ABI_VERSION 1
|
# define _LIBCPP_ABI_VERSION 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __STDC_HOSTED__
|
||||||
|
# define _LIBCPP_FREESTANDING
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _LIBCPP_STD_VER
|
#ifndef _LIBCPP_STD_VER
|
||||||
# if __cplusplus <= 201103L
|
# if __cplusplus <= 201103L
|
||||||
# define _LIBCPP_STD_VER 11
|
# define _LIBCPP_STD_VER 11
|
||||||
@ -93,10 +96,12 @@
|
|||||||
// Enable optimized version of __do_get_(un)signed which avoids redundant copies.
|
// Enable optimized version of __do_get_(un)signed which avoids redundant copies.
|
||||||
# define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
|
# define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
|
||||||
// Use the smallest possible integer type to represent the index of the variant.
|
// Use the smallest possible integer type to represent the index of the variant.
|
||||||
// Previously libc++ used "unsigned int" exclusivly.
|
// Previously libc++ used "unsigned int" exclusively.
|
||||||
# define _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
|
# define _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
|
||||||
// Unstable attempt to provide a more optimized std::function
|
// Unstable attempt to provide a more optimized std::function
|
||||||
# define _LIBCPP_ABI_OPTIMIZED_FUNCTION
|
# define _LIBCPP_ABI_OPTIMIZED_FUNCTION
|
||||||
|
// All the regex constants must be distinct and nonzero.
|
||||||
|
# define _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
|
||||||
#elif _LIBCPP_ABI_VERSION == 1
|
#elif _LIBCPP_ABI_VERSION == 1
|
||||||
# if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
|
# if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
|
||||||
// Enable compiling copies of now inline methods into the dylib to support
|
// Enable compiling copies of now inline methods into the dylib to support
|
||||||
@ -182,6 +187,10 @@
|
|||||||
#define _LIBCPP_CLANG_VER 0
|
#define _LIBCPP_CLANG_VER 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_COMPILER_GCC) && __cplusplus < 201103L
|
||||||
|
#error "libc++ does not support using GCC with C++03. Please enable C++11"
|
||||||
|
#endif
|
||||||
|
|
||||||
// FIXME: ABI detection should be done via compiler builtin macros. This
|
// FIXME: ABI detection should be done via compiler builtin macros. This
|
||||||
// is just a placeholder until Clang implements such macros. For now assume
|
// is just a placeholder until Clang implements such macros. For now assume
|
||||||
// that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
|
// that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
|
||||||
@ -201,6 +210,10 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
|
||||||
|
# define _LIBCPP_ABI_VCRUNTIME
|
||||||
|
#endif
|
||||||
|
|
||||||
// Need to detect which libc we're using if we're on Linux.
|
// Need to detect which libc we're using if we're on Linux.
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
# include <features.h>
|
# include <features.h>
|
||||||
@ -257,7 +270,7 @@
|
|||||||
# define _LIBCPP_WIN32API
|
# define _LIBCPP_WIN32API
|
||||||
# define _LIBCPP_LITTLE_ENDIAN
|
# define _LIBCPP_LITTLE_ENDIAN
|
||||||
# define _LIBCPP_SHORT_WCHAR 1
|
# define _LIBCPP_SHORT_WCHAR 1
|
||||||
// Both MinGW and native MSVC provide a "MSVC"-like enviroment
|
// Both MinGW and native MSVC provide a "MSVC"-like environment
|
||||||
# define _LIBCPP_MSVCRT_LIKE
|
# define _LIBCPP_MSVCRT_LIKE
|
||||||
// If mingw not explicitly detected, assume using MS C runtime only if
|
// If mingw not explicitly detected, assume using MS C runtime only if
|
||||||
// a MS compatibility version is specified.
|
// a MS compatibility version is specified.
|
||||||
@ -298,7 +311,7 @@
|
|||||||
// random data even when using sandboxing mechanisms such as chroots,
|
// random data even when using sandboxing mechanisms such as chroots,
|
||||||
// Capsicum, etc.
|
// Capsicum, etc.
|
||||||
# define _LIBCPP_USING_ARC4_RANDOM
|
# define _LIBCPP_USING_ARC4_RANDOM
|
||||||
#elif defined(__Fuchsia__)
|
#elif defined(__Fuchsia__) || defined(__wasi__)
|
||||||
# define _LIBCPP_USING_GETENTROPY
|
# define _LIBCPP_USING_GETENTROPY
|
||||||
#elif defined(__native_client__)
|
#elif defined(__native_client__)
|
||||||
// NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
|
// NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
|
||||||
@ -332,7 +345,7 @@
|
|||||||
# if defined(__FreeBSD__)
|
# if defined(__FreeBSD__)
|
||||||
# define _LIBCPP_HAS_QUICK_EXIT
|
# define _LIBCPP_HAS_QUICK_EXIT
|
||||||
# define _LIBCPP_HAS_C11_FEATURES
|
# define _LIBCPP_HAS_C11_FEATURES
|
||||||
# elif defined(__Fuchsia__)
|
# elif defined(__Fuchsia__) || defined(__wasi__)
|
||||||
# define _LIBCPP_HAS_QUICK_EXIT
|
# define _LIBCPP_HAS_QUICK_EXIT
|
||||||
# define _LIBCPP_HAS_TIMESPEC_GET
|
# define _LIBCPP_HAS_TIMESPEC_GET
|
||||||
# define _LIBCPP_HAS_C11_FEATURES
|
# define _LIBCPP_HAS_C11_FEATURES
|
||||||
@ -400,10 +413,6 @@ typedef __char32_t char32_t;
|
|||||||
#define _LIBCPP_HAS_NO_STRONG_ENUMS
|
#define _LIBCPP_HAS_NO_STRONG_ENUMS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(__has_feature(cxx_decltype))
|
|
||||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __has_feature(cxx_attributes)
|
#if __has_feature(cxx_attributes)
|
||||||
# define _LIBCPP_NORETURN [[noreturn]]
|
# define _LIBCPP_NORETURN [[noreturn]]
|
||||||
#else
|
#else
|
||||||
@ -434,18 +443,6 @@ typedef __char32_t char32_t;
|
|||||||
#define _LIBCPP_HAS_NO_VARIADICS
|
#define _LIBCPP_HAS_NO_VARIADICS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(__has_feature(cxx_generalized_initializers))
|
|
||||||
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __has_feature(is_base_of)
|
|
||||||
#define _LIBCPP_HAS_IS_BASE_OF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __has_feature(is_final)
|
|
||||||
#define _LIBCPP_HAS_IS_FINAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Objective-C++ features (opt-in)
|
// Objective-C++ features (opt-in)
|
||||||
#if __has_feature(objc_arc)
|
#if __has_feature(objc_arc)
|
||||||
#define _LIBCPP_HAS_OBJC_ARC
|
#define _LIBCPP_HAS_OBJC_ARC
|
||||||
@ -455,10 +452,6 @@ typedef __char32_t char32_t;
|
|||||||
#define _LIBCPP_HAS_OBJC_ARC_WEAK
|
#define _LIBCPP_HAS_OBJC_ARC_WEAK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !(__has_feature(cxx_constexpr))
|
|
||||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !(__has_feature(cxx_relaxed_constexpr))
|
#if !(__has_feature(cxx_relaxed_constexpr))
|
||||||
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
@ -471,14 +464,6 @@ typedef __char32_t char32_t;
|
|||||||
#define _LIBCPP_HAS_NO_NOEXCEPT
|
#define _LIBCPP_HAS_NO_NOEXCEPT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_feature(underlying_type)
|
|
||||||
#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __has_feature(is_literal)
|
|
||||||
#define _LIBCPP_IS_LITERAL(T) __is_literal(T)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
|
#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
|
||||||
#define _LIBCPP_HAS_NO_ASAN
|
#define _LIBCPP_HAS_NO_ASAN
|
||||||
#endif
|
#endif
|
||||||
@ -510,69 +495,20 @@ typedef __char32_t char32_t;
|
|||||||
|
|
||||||
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
||||||
|
|
||||||
#if _GNUC_VER >= 407
|
|
||||||
#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
|
|
||||||
#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
|
|
||||||
#define _LIBCPP_HAS_IS_FINAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && _GNUC_VER >= 403
|
|
||||||
#define _LIBCPP_HAS_IS_BASE_OF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !__EXCEPTIONS && !defined(_LIBCPP_NO_EXCEPTIONS)
|
#if !__EXCEPTIONS && !defined(_LIBCPP_NO_EXCEPTIONS)
|
||||||
#define _LIBCPP_NO_EXCEPTIONS
|
#define _LIBCPP_NO_EXCEPTIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// constexpr was added to GCC in 4.6.
|
|
||||||
#if _GNUC_VER < 406
|
|
||||||
# define _LIBCPP_HAS_NO_CONSTEXPR
|
|
||||||
// Can only use constexpr in c++11 mode.
|
|
||||||
#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
|
|
||||||
# define _LIBCPP_HAS_NO_CONSTEXPR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Determine if GCC supports relaxed constexpr
|
// Determine if GCC supports relaxed constexpr
|
||||||
#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L
|
#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L
|
||||||
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GCC 5 will support variable templates
|
// GCC 5 supports variable templates
|
||||||
#if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L
|
#if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L
|
||||||
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
|
|
||||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
|
||||||
#define _LIBCPP_HAS_NO_NULLPTR
|
|
||||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
||||||
#define _LIBCPP_HAS_NO_VARIADICS
|
|
||||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
#define _LIBCPP_HAS_NO_STRONG_ENUMS
|
|
||||||
#define _LIBCPP_HAS_NO_NOEXCEPT
|
|
||||||
|
|
||||||
#else // __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
|
|
||||||
#if _GNUC_VER < 403
|
|
||||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if _GNUC_VER < 404
|
|
||||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
|
||||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
|
||||||
#define _LIBCPP_HAS_NO_VARIADICS
|
|
||||||
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
#endif // _GNUC_VER < 404
|
|
||||||
|
|
||||||
#if _GNUC_VER < 406
|
|
||||||
#define _LIBCPP_HAS_NO_NOEXCEPT
|
|
||||||
#define _LIBCPP_HAS_NO_NULLPTR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
|
#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
|
||||||
#define _LIBCPP_HAS_NO_ASAN
|
#define _LIBCPP_HAS_NO_ASAN
|
||||||
#endif
|
#endif
|
||||||
@ -597,16 +533,12 @@ typedef __char32_t char32_t;
|
|||||||
#error "MSVC versions prior to Visual Studio 2015 are not supported"
|
#error "MSVC versions prior to Visual Studio 2015 are not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _LIBCPP_HAS_IS_BASE_OF
|
|
||||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
|
||||||
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
|
||||||
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
||||||
#define _LIBCPP_HAS_NO_NOEXCEPT
|
|
||||||
#define __alignof__ __alignof
|
#define __alignof__ __alignof
|
||||||
#define _LIBCPP_NORETURN __declspec(noreturn)
|
#define _LIBCPP_NORETURN __declspec(noreturn)
|
||||||
#define _ALIGNAS(x) __declspec(align(x))
|
#define _ALIGNAS(x) __declspec(align(x))
|
||||||
#define _ALIGNAS_TYPE(x) alignas(x)
|
#define _ALIGNAS_TYPE(x) alignas(x)
|
||||||
#define _LIBCPP_HAS_NO_VARIADICS
|
|
||||||
|
|
||||||
#define _LIBCPP_WEAK
|
#define _LIBCPP_WEAK
|
||||||
|
|
||||||
@ -623,12 +555,7 @@ typedef __char32_t char32_t;
|
|||||||
#define _ATTRIBUTE(x) __attribute__((x))
|
#define _ATTRIBUTE(x) __attribute__((x))
|
||||||
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
||||||
|
|
||||||
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
||||||
#define _LIBCPP_HAS_NO_NOEXCEPT
|
|
||||||
#define _LIBCPP_HAS_NO_NULLPTR
|
|
||||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
#define _LIBCPP_HAS_IS_BASE_OF
|
|
||||||
#define _LIBCPP_HAS_IS_FINAL
|
|
||||||
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
|
||||||
|
|
||||||
#if defined(_AIX)
|
#if defined(_AIX)
|
||||||
@ -659,8 +586,13 @@ typedef __char32_t char32_t;
|
|||||||
# define _LIBCPP_EXPORTED_FROM_ABI
|
# define _LIBCPP_EXPORTED_FROM_ABI
|
||||||
#elif defined(_LIBCPP_BUILDING_LIBRARY)
|
#elif defined(_LIBCPP_BUILDING_LIBRARY)
|
||||||
# define _LIBCPP_DLL_VIS __declspec(dllexport)
|
# define _LIBCPP_DLL_VIS __declspec(dllexport)
|
||||||
# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
|
# if defined(__MINGW32__)
|
||||||
# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS
|
# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
|
||||||
|
# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
|
||||||
|
# else
|
||||||
|
# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
|
||||||
|
# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS
|
||||||
|
# endif
|
||||||
# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS
|
# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS
|
||||||
# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
|
# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@ -777,7 +709,7 @@ typedef __char32_t char32_t;
|
|||||||
#else
|
#else
|
||||||
// Try to approximate the effect of exclude_from_explicit_instantiation
|
// Try to approximate the effect of exclude_from_explicit_instantiation
|
||||||
// (which is that entities are not assumed to be provided by explicit
|
// (which is that entities are not assumed to be provided by explicit
|
||||||
// template instantitations in the dylib) by always inlining those entities.
|
// template instantiations in the dylib) by always inlining those entities.
|
||||||
# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
|
# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -789,6 +721,16 @@ typedef __char32_t char32_t;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
|
||||||
|
# ifdef _LIBCPP_OBJECT_FORMAT_COFF // Windows binaries can't merge typeinfos.
|
||||||
|
# define _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT 0
|
||||||
|
#else
|
||||||
|
// TODO: This isn't strictly correct on ELF platforms due to llvm.org/PR37398
|
||||||
|
// And we should consider defaulting to OFF.
|
||||||
|
# define _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _LIBCPP_HIDE_FROM_ABI
|
#ifndef _LIBCPP_HIDE_FROM_ABI
|
||||||
# if _LIBCPP_HIDE_FROM_ABI_PER_TU
|
# if _LIBCPP_HIDE_FROM_ABI_PER_TU
|
||||||
# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE
|
# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE
|
||||||
@ -843,22 +785,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
|
|||||||
# define _NOEXCEPT_(x)
|
# define _NOEXCEPT_(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
|
|
||||||
# if !defined(_LIBCPP_DEBUG)
|
|
||||||
# error cannot use _LIBCPP_DEBUG_USE_EXCEPTIONS unless _LIBCPP_DEBUG is defined
|
|
||||||
# endif
|
|
||||||
# ifdef _LIBCPP_HAS_NO_NOEXCEPT
|
|
||||||
# define _NOEXCEPT_DEBUG
|
|
||||||
# define _NOEXCEPT_DEBUG_(x)
|
|
||||||
# else
|
|
||||||
# define _NOEXCEPT_DEBUG noexcept(false)
|
|
||||||
# define _NOEXCEPT_DEBUG_(x) noexcept(false)
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define _NOEXCEPT_DEBUG _NOEXCEPT
|
|
||||||
# define _NOEXCEPT_DEBUG_(x) _NOEXCEPT_(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
typedef unsigned short char16_t;
|
typedef unsigned short char16_t;
|
||||||
typedef unsigned int char32_t;
|
typedef unsigned int char32_t;
|
||||||
@ -869,30 +795,11 @@ typedef unsigned int char32_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _LIBCPP_CXX03_LANG
|
#ifdef _LIBCPP_CXX03_LANG
|
||||||
# if __has_extension(c_static_assert)
|
# define static_assert(...) _Static_assert(__VA_ARGS__)
|
||||||
# define static_assert(__b, __m) _Static_assert(__b, __m)
|
# define decltype(...) __decltype(__VA_ARGS__)
|
||||||
# else
|
|
||||||
extern "C++" {
|
|
||||||
template <bool> struct __static_assert_test;
|
|
||||||
template <> struct __static_assert_test<true> {};
|
|
||||||
template <unsigned> struct __static_assert_check {};
|
|
||||||
}
|
|
||||||
# define static_assert(__b, __m) \
|
|
||||||
typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \
|
|
||||||
_LIBCPP_CONCAT(__t, __LINE__)
|
|
||||||
# endif // __has_extension(c_static_assert)
|
|
||||||
#endif // _LIBCPP_CXX03_LANG
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
#ifdef _LIBCPP_HAS_NO_DECLTYPE
|
#ifdef _LIBCPP_CXX03_LANG
|
||||||
// GCC 4.6 provides __decltype in all standard modes.
|
|
||||||
# if __has_keyword(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406
|
|
||||||
# define decltype(__x) __decltype(__x)
|
|
||||||
# else
|
|
||||||
# define decltype(__x) __typeof__(__x)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
|
||||||
# define _LIBCPP_CONSTEXPR
|
# define _LIBCPP_CONSTEXPR
|
||||||
#else
|
#else
|
||||||
# define _LIBCPP_CONSTEXPR constexpr
|
# define _LIBCPP_CONSTEXPR constexpr
|
||||||
@ -911,9 +818,9 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# define _NOALIAS __attribute__((__malloc__))
|
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
|
||||||
#else
|
#else
|
||||||
# define _NOALIAS
|
# define _LIBCPP_NOALIAS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \
|
#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \
|
||||||
@ -966,10 +873,6 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
|
#define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
|
|
||||||
#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT_LIKE) || \
|
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT_LIKE) || \
|
||||||
defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__)
|
defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__)
|
||||||
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
|
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
|
||||||
@ -990,13 +893,10 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
|
// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
|
||||||
#if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
|
#if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
|
||||||
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||||
#elif defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
|
#elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new)
|
||||||
# define _LIBCPP_DEFER_NEW_TO_VCRUNTIME
|
// We're deferring to Microsoft's STL to provide aligned new et al. We don't
|
||||||
# if !defined(__cpp_aligned_new)
|
// have it unless the language feature test macro is defined.
|
||||||
// We're defering to Microsoft's STL to provide aligned new et al. We don't
|
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||||
// have it unless the language feature test macro is defined.
|
|
||||||
# define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
@ -1025,8 +925,10 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Deprecation macros.
|
// Deprecation macros.
|
||||||
// Deprecations warnings are only enabled when _LIBCPP_ENABLE_DEPRECATION_WARNINGS is defined.
|
//
|
||||||
#if defined(_LIBCPP_ENABLE_DEPRECATION_WARNINGS)
|
// Deprecations warnings are always enabled, except when users explicitly opt-out
|
||||||
|
// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
|
||||||
|
#if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
|
||||||
# if __has_attribute(deprecated)
|
# if __has_attribute(deprecated)
|
||||||
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
|
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
|
||||||
# elif _LIBCPP_STD_VER > 11
|
# elif _LIBCPP_STD_VER > 11
|
||||||
@ -1128,6 +1030,12 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __has_attribute(no_destroy)
|
||||||
|
# define _LIBCPP_NO_DESTROY __attribute__((__no_destroy__))
|
||||||
|
#else
|
||||||
|
# define _LIBCPP_NO_DESTROY
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_ASAN
|
#ifndef _LIBCPP_HAS_NO_ASAN
|
||||||
_LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
_LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
||||||
const void *, const void *, const void *, const void *);
|
const void *, const void *, const void *, const void *);
|
||||||
@ -1158,6 +1066,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
!defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
|
!defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
|
||||||
# if defined(__FreeBSD__) || \
|
# if defined(__FreeBSD__) || \
|
||||||
defined(__Fuchsia__) || \
|
defined(__Fuchsia__) || \
|
||||||
|
defined(__wasi__) || \
|
||||||
defined(__NetBSD__) || \
|
defined(__NetBSD__) || \
|
||||||
defined(__linux__) || \
|
defined(__linux__) || \
|
||||||
defined(__GNU__) || \
|
defined(__GNU__) || \
|
||||||
@ -1188,6 +1097,23 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
_LIBCPP_HAS_NO_THREADS is defined.
|
_LIBCPP_HAS_NO_THREADS is defined.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// The Apple, glibc, and Bionic implementation of pthreads implements
|
||||||
|
// pthread_mutex_destroy as nop for regular mutexes. Additionally, Win32
|
||||||
|
// mutexes have no destroy mechanism.
|
||||||
|
// TODO(EricWF): Enable this optimization on Apple and Bionic platforms after
|
||||||
|
// speaking to their respective stakeholders.
|
||||||
|
#if (defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && defined(__GLIBC__)) \
|
||||||
|
|| defined(_LIBCPP_HAS_THREAD_API_WIN32)
|
||||||
|
# define _LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Destroying a condvar is a nop on Windows.
|
||||||
|
// TODO(EricWF): This is potentially true for some pthread implementations
|
||||||
|
// as well.
|
||||||
|
#if defined(_LIBCPP_HAS_THREAD_API_WIN32)
|
||||||
|
# define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
|
||||||
|
#endif
|
||||||
|
|
||||||
// Systems that use capability-based security (FreeBSD with Capsicum,
|
// Systems that use capability-based security (FreeBSD with Capsicum,
|
||||||
// Nuxi CloudABI) may only provide local filesystem access (using *at()).
|
// Nuxi CloudABI) may only provide local filesystem access (using *at()).
|
||||||
// Functions like open(), rename(), unlink() and stat() should not be
|
// Functions like open(), rename(), unlink() and stat() should not be
|
||||||
@ -1204,7 +1130,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__BIONIC__) || defined(__CloudABI__) || \
|
#if defined(__BIONIC__) || defined(__CloudABI__) || \
|
||||||
defined(__Fuchsia__) || defined(_LIBCPP_HAS_MUSL_LIBC)
|
defined(__Fuchsia__) || defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC)
|
||||||
#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
|
#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1216,13 +1142,22 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
|
|
||||||
#if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
|
#if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
|
||||||
# define _LIBCPP_HAS_C_ATOMIC_IMP
|
# define _LIBCPP_HAS_C_ATOMIC_IMP
|
||||||
#elif _GNUC_VER > 407
|
#elif defined(_LIBCPP_COMPILER_GCC)
|
||||||
# define _LIBCPP_HAS_GCC_ATOMIC_IMP
|
# define _LIBCPP_HAS_GCC_ATOMIC_IMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \
|
#if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && \
|
||||||
|
!defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) && \
|
||||||
|
!defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)) \
|
||||||
|| defined(_LIBCPP_HAS_NO_THREADS)
|
|| defined(_LIBCPP_HAS_NO_THREADS)
|
||||||
#define _LIBCPP_HAS_NO_ATOMIC_HEADER
|
# define _LIBCPP_HAS_NO_ATOMIC_HEADER
|
||||||
|
#else
|
||||||
|
# ifndef _LIBCPP_ATOMIC_FLAG_TYPE
|
||||||
|
# define _LIBCPP_ATOMIC_FLAG_TYPE bool
|
||||||
|
# endif
|
||||||
|
# ifdef _LIBCPP_FREESTANDING
|
||||||
|
# define _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
|
#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
|
||||||
@ -1250,6 +1185,10 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
#define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
|
#define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !__has_builtin(__builtin_is_constant_evaluated) && _GNUC_VER < 900
|
||||||
|
#define _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
|
#if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
|
||||||
# if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
|
# if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
|
||||||
# define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
|
# define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
|
||||||
@ -1277,6 +1216,21 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
# define _LIBCPP_FALLTHROUGH() ((void)0)
|
# define _LIBCPP_FALLTHROUGH() ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __has_attribute(__nodebug__)
|
||||||
|
#define _LIBCPP_NODEBUG __attribute__((__nodebug__))
|
||||||
|
#else
|
||||||
|
#define _LIBCPP_NODEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _LIBCPP_NODEBUG_TYPE
|
||||||
|
#if __has_attribute(__nodebug__) && \
|
||||||
|
(defined(_LIBCPP_COMPILER_CLANG) && _LIBCPP_CLANG_VER >= 900)
|
||||||
|
#define _LIBCPP_NODEBUG_TYPE __attribute__((nodebug))
|
||||||
|
#else
|
||||||
|
#define _LIBCPP_NODEBUG_TYPE
|
||||||
|
#endif
|
||||||
|
#endif // !defined(_LIBCPP_NODEBUG_TYPE)
|
||||||
|
|
||||||
#if defined(_LIBCPP_ABI_MICROSOFT) && \
|
#if defined(_LIBCPP_ABI_MICROSOFT) && \
|
||||||
(defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
|
(defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
|
||||||
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
|
# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
|
||||||
@ -1312,7 +1266,8 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
#if !defined(_LIBCPP_BUILDING_LIBRARY) && \
|
#if !defined(_LIBCPP_BUILDING_LIBRARY) && \
|
||||||
!defined(_LIBCPP_DISABLE_AVAILABILITY) && \
|
!defined(_LIBCPP_DISABLE_AVAILABILITY) && \
|
||||||
__has_feature(attribute_availability_with_strict) && \
|
__has_feature(attribute_availability_with_strict) && \
|
||||||
__has_feature(attribute_availability_in_templates)
|
__has_feature(attribute_availability_in_templates) && \
|
||||||
|
__has_extension(pragma_clang_attribute_external_declaration)
|
||||||
# ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
# define _LIBCPP_USE_AVAILABILITY_APPLE
|
# define _LIBCPP_USE_AVAILABILITY_APPLE
|
||||||
# endif
|
# endif
|
||||||
@ -1355,6 +1310,21 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \
|
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \
|
||||||
__attribute__((availability(macosx,strict,introduced=10.9))) \
|
__attribute__((availability(macosx,strict,introduced=10.9))) \
|
||||||
__attribute__((availability(ios,strict,introduced=7.0)))
|
__attribute__((availability(ios,strict,introduced=7.0)))
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM \
|
||||||
|
__attribute__((availability(macosx,strict,introduced=10.15))) \
|
||||||
|
__attribute__((availability(ios,strict,introduced=13.0))) \
|
||||||
|
__attribute__((availability(tvos,strict,introduced=13.0))) \
|
||||||
|
__attribute__((availability(watchos,strict,introduced=6.0)))
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \
|
||||||
|
_Pragma("clang attribute push(__attribute__((availability(macosx,strict,introduced=10.15))), apply_to=any(function,record))") \
|
||||||
|
_Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \
|
||||||
|
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \
|
||||||
|
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \
|
||||||
|
_Pragma("clang attribute pop") \
|
||||||
|
_Pragma("clang attribute pop") \
|
||||||
|
_Pragma("clang attribute pop") \
|
||||||
|
_Pragma("clang attribute pop")
|
||||||
#else
|
#else
|
||||||
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX
|
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX
|
||||||
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
|
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
|
||||||
@ -1366,6 +1336,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
|
|||||||
# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
|
# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
|
||||||
# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
|
# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
|
||||||
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
|
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
|
||||||
|
# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Define availability that depends on _LIBCPP_NO_EXCEPTIONS.
|
// Define availability that depends on _LIBCPP_NO_EXCEPTIONS.
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -28,6 +27,7 @@
|
|||||||
#cmakedefine _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL
|
#cmakedefine _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL
|
||||||
#cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
|
#cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
|
||||||
#cmakedefine _LIBCPP_NO_VCRUNTIME
|
#cmakedefine _LIBCPP_NO_VCRUNTIME
|
||||||
|
#cmakedefine01 _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
|
||||||
#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
|
#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
|
||||||
|
|
||||||
@_LIBCPP_ABI_DEFINES@
|
@_LIBCPP_ABI_DEFINES@
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- __debug ----------------------------------===//
|
//===--------------------------- __debug ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -12,6 +11,7 @@
|
|||||||
#define _LIBCPP_DEBUG_H
|
#define _LIBCPP_DEBUG_H
|
||||||
|
|
||||||
#include <__config>
|
#include <__config>
|
||||||
|
#include <iosfwd>
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
@ -25,7 +25,6 @@
|
|||||||
# include <cstdlib>
|
# include <cstdlib>
|
||||||
# include <cstdio>
|
# include <cstdio>
|
||||||
# include <cstddef>
|
# include <cstddef>
|
||||||
# include <exception>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT)
|
#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT)
|
||||||
@ -50,10 +49,6 @@
|
|||||||
#define _LIBCPP_DEBUG_MODE(...) ((void)0)
|
#define _LIBCPP_DEBUG_MODE(...) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _LIBCPP_DEBUG_LEVEL < 1
|
|
||||||
class _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
|
||||||
struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
|
struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
|
||||||
@ -63,6 +58,9 @@ struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
|
|||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
__libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m)
|
__libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m)
|
||||||
: __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {}
|
: __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {}
|
||||||
|
|
||||||
|
_LIBCPP_FUNC_VIS std::string what() const;
|
||||||
|
|
||||||
const char* __file_;
|
const char* __file_;
|
||||||
int __line_;
|
int __line_;
|
||||||
const char* __pred_;
|
const char* __pred_;
|
||||||
@ -80,38 +78,11 @@ extern _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_function_type __libcpp_debug_fun
|
|||||||
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
|
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
|
||||||
void __libcpp_abort_debug_function(__libcpp_debug_info const&);
|
void __libcpp_abort_debug_function(__libcpp_debug_info const&);
|
||||||
|
|
||||||
/// __libcpp_throw_debug_function - A debug handler that throws
|
|
||||||
/// an instance of __libcpp_debug_exception when called.
|
|
||||||
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
|
|
||||||
void __libcpp_throw_debug_function(__libcpp_debug_info const&);
|
|
||||||
|
|
||||||
/// __libcpp_set_debug_function - Set the debug handler to the specified
|
/// __libcpp_set_debug_function - Set the debug handler to the specified
|
||||||
/// function.
|
/// function.
|
||||||
_LIBCPP_FUNC_VIS
|
_LIBCPP_FUNC_VIS
|
||||||
bool __libcpp_set_debug_function(__libcpp_debug_function_type __func);
|
bool __libcpp_set_debug_function(__libcpp_debug_function_type __func);
|
||||||
|
|
||||||
// Setup the throwing debug handler during dynamic initialization.
|
|
||||||
#if _LIBCPP_DEBUG_LEVEL >= 1 && defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
|
|
||||||
# if defined(_LIBCPP_NO_EXCEPTIONS)
|
|
||||||
# error _LIBCPP_DEBUG_USE_EXCEPTIONS cannot be used when exceptions are disabled.
|
|
||||||
# endif
|
|
||||||
static bool __init_dummy = __libcpp_set_debug_function(__libcpp_throw_debug_function);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY)
|
|
||||||
class _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception : public exception {
|
|
||||||
public:
|
|
||||||
__libcpp_debug_exception() _NOEXCEPT;
|
|
||||||
explicit __libcpp_debug_exception(__libcpp_debug_info const& __i);
|
|
||||||
__libcpp_debug_exception(__libcpp_debug_exception const&);
|
|
||||||
~__libcpp_debug_exception() _NOEXCEPT;
|
|
||||||
const char* what() const _NOEXCEPT;
|
|
||||||
private:
|
|
||||||
struct __libcpp_debug_exception_imp;
|
|
||||||
__libcpp_debug_exception_imp *__imp_;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY)
|
#if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY)
|
||||||
|
|
||||||
struct _LIBCPP_TYPE_VIS __c_node;
|
struct _LIBCPP_TYPE_VIS __c_node;
|
||||||
@ -251,16 +222,22 @@ public:
|
|||||||
__db_c_const_iterator __c_end() const;
|
__db_c_const_iterator __c_end() const;
|
||||||
__db_i_const_iterator __i_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>
|
template <class _Cont>
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __insert_c(_Cont* __c)
|
void __insert_c(_Cont* __c)
|
||||||
{
|
{
|
||||||
__c_node* __n = __insert_c(static_cast<void*>(__c));
|
__insert_c(static_cast<void*>(__c), &__create_C_node<_Cont>);
|
||||||
::new(__n) _C_node<_Cont>(__n->__c_, __n->__next_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __insert_i(void* __i);
|
void __insert_i(void* __i);
|
||||||
__c_node* __insert_c(void* __c);
|
void __insert_c(void* __c, _InsertConstruct* __fn);
|
||||||
void __erase_c(void* __c);
|
void __erase_c(void* __c);
|
||||||
|
|
||||||
void __insert_ic(void* __i, const void* __c);
|
void __insert_ic(void* __i, const void* __c);
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- __errc ----------------------------------===//
|
//===---------------------------- __errc ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -126,7 +125,7 @@ struct __weak_result_type_imp // bool is true
|
|||||||
: public __maybe_derive_from_unary_function<_Tp>,
|
: public __maybe_derive_from_unary_function<_Tp>,
|
||||||
public __maybe_derive_from_binary_function<_Tp>
|
public __maybe_derive_from_binary_function<_Tp>
|
||||||
{
|
{
|
||||||
typedef typename _Tp::result_type result_type;
|
typedef _LIBCPP_NODEBUG_TYPE typename _Tp::result_type result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
@ -147,19 +146,19 @@ struct __weak_result_type
|
|||||||
template <class _Rp>
|
template <class _Rp>
|
||||||
struct __weak_result_type<_Rp ()>
|
struct __weak_result_type<_Rp ()>
|
||||||
{
|
{
|
||||||
typedef _Rp result_type;
|
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _Rp>
|
template <class _Rp>
|
||||||
struct __weak_result_type<_Rp (&)()>
|
struct __weak_result_type<_Rp (&)()>
|
||||||
{
|
{
|
||||||
typedef _Rp result_type;
|
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _Rp>
|
template <class _Rp>
|
||||||
struct __weak_result_type<_Rp (*)()>
|
struct __weak_result_type<_Rp (*)()>
|
||||||
{
|
{
|
||||||
typedef _Rp result_type;
|
typedef _LIBCPP_NODEBUG_TYPE _Rp result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 1 argument case
|
// 1 argument case
|
||||||
@ -611,7 +610,7 @@ _LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Allo
|
|||||||
template <class _Tp, class _Alloc, class ..._Args>
|
template <class _Tp, class _Alloc, class ..._Args>
|
||||||
struct __uses_alloc_ctor_imp
|
struct __uses_alloc_ctor_imp
|
||||||
{
|
{
|
||||||
typedef typename __uncvref<_Alloc>::type _RawAlloc;
|
typedef _LIBCPP_NODEBUG_TYPE typename __uncvref<_Alloc>::type _RawAlloc;
|
||||||
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
|
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
|
||||||
static const bool __ic =
|
static const bool __ic =
|
||||||
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
|
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -123,7 +122,7 @@ inline _LIBCPP_INLINE_VISIBILITY
|
|||||||
size_t
|
size_t
|
||||||
__next_hash_pow2(size_t __n)
|
__next_hash_pow2(size_t __n)
|
||||||
{
|
{
|
||||||
return __n < 2 ? __n : (size_t(1) << (std::numeric_limits<size_t>::digits - __clz(__n-1)));
|
return __n < 2 ? __n : (size_t(1) << (std::numeric_limits<size_t>::digits - __libcpp_clz(__n-1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -876,9 +875,9 @@ struct __enforce_unordered_container_requirements {
|
|||||||
template <class _Key, class _Hash, class _Equal>
|
template <class _Key, class _Hash, class _Equal>
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
|
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
|
||||||
"the specified comparator type does not provide a const call operator")
|
"the specified comparator type does not provide a viable const call operator")
|
||||||
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
|
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
|
||||||
"the specified hash functor does not provide a const call operator")
|
"the specified hash functor does not provide a viable const call operator")
|
||||||
#endif
|
#endif
|
||||||
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
|
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
|
||||||
__diagnose_unordered_container_requirements(int);
|
__diagnose_unordered_container_requirements(int);
|
||||||
@ -1261,7 +1260,7 @@ public:
|
|||||||
|
|
||||||
void swap(__hash_table& __u)
|
void swap(__hash_table& __u)
|
||||||
#if _LIBCPP_STD_VER <= 11
|
#if _LIBCPP_STD_VER <= 11
|
||||||
_NOEXCEPT_DEBUG_(
|
_NOEXCEPT_(
|
||||||
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
|
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
|
||||||
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
|
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
|
||||||
|| __is_nothrow_swappable<__pointer_allocator>::value)
|
|| __is_nothrow_swappable<__pointer_allocator>::value)
|
||||||
@ -1269,7 +1268,7 @@ public:
|
|||||||
|| __is_nothrow_swappable<__node_allocator>::value)
|
|| __is_nothrow_swappable<__node_allocator>::value)
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
_NOEXCEPT_DEBUG_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
|
_NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@ -2249,7 +2248,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
|
|||||||
return _InsertReturnType{end(), false, _NodeHandle()};
|
return _InsertReturnType{end(), false, _NodeHandle()};
|
||||||
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
|
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
|
||||||
if (__result.second)
|
if (__result.second)
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
|
return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2264,7 +2263,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
|
|||||||
return end();
|
return end();
|
||||||
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
|
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
|
||||||
if (__result.second)
|
if (__result.second)
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return __result.first;
|
return __result.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2328,7 +2327,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
|
|||||||
if (__nh.empty())
|
if (__nh.empty())
|
||||||
return end();
|
return end();
|
||||||
iterator __result = __node_insert_multi(__nh.__ptr_);
|
iterator __result = __node_insert_multi(__nh.__ptr_);
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return __result;
|
return __result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2342,7 +2341,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
|
|||||||
if (__nh.empty())
|
if (__nh.empty())
|
||||||
return end();
|
return end();
|
||||||
iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
|
iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return __result;
|
return __result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2372,6 +2371,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi(
|
|||||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||||
void
|
void
|
||||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n)
|
__hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n)
|
||||||
|
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
|
||||||
{
|
{
|
||||||
if (__n == 1)
|
if (__n == 1)
|
||||||
__n = 2;
|
__n = 2;
|
||||||
@ -2807,7 +2807,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
|||||||
void
|
void
|
||||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
__hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
||||||
#if _LIBCPP_STD_VER <= 11
|
#if _LIBCPP_STD_VER <= 11
|
||||||
_NOEXCEPT_DEBUG_(
|
_NOEXCEPT_(
|
||||||
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
|
__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
|
||||||
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
|
&& (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
|
||||||
|| __is_nothrow_swappable<__pointer_allocator>::value)
|
|| __is_nothrow_swappable<__pointer_allocator>::value)
|
||||||
@ -2815,7 +2815,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
|
|||||||
|| __is_nothrow_swappable<__node_allocator>::value)
|
|| __is_nothrow_swappable<__node_allocator>::value)
|
||||||
)
|
)
|
||||||
#else
|
#else
|
||||||
_NOEXCEPT_DEBUG_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
|
_NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
_LIBCPP_ASSERT(__node_traits::propagate_on_container_swap::value ||
|
_LIBCPP_ASSERT(__node_traits::propagate_on_container_swap::value ||
|
||||||
|
@ -1 +1 @@
|
|||||||
8000
|
9000
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -20,6 +19,7 @@
|
|||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#if defined(_LIBCPP_MSVCRT_LIKE)
|
#if defined(_LIBCPP_MSVCRT_LIKE)
|
||||||
|
# include <cstring>
|
||||||
# include <support/win32/locale_win32.h>
|
# include <support/win32/locale_win32.h>
|
||||||
#elif defined(_AIX)
|
#elif defined(_AIX)
|
||||||
# include <support/ibm/xlocale.h>
|
# include <support/ibm/xlocale.h>
|
||||||
@ -35,6 +35,9 @@
|
|||||||
# include <xlocale.h>
|
# include <xlocale.h>
|
||||||
#elif defined(__Fuchsia__)
|
#elif defined(__Fuchsia__)
|
||||||
# include <support/fuchsia/xlocale.h>
|
# include <support/fuchsia/xlocale.h>
|
||||||
|
#elif defined(__wasi__)
|
||||||
|
// WASI libc uses musl's locales support.
|
||||||
|
# include <support/musl/xlocale.h>
|
||||||
#elif defined(_LIBCPP_HAS_MUSL_LIBC)
|
#elif defined(_LIBCPP_HAS_MUSL_LIBC)
|
||||||
# include <support/musl/xlocale.h>
|
# include <support/musl/xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
@ -64,28 +67,41 @@ private:
|
|||||||
#elif defined(_LIBCPP_MSVCRT_LIKE)
|
#elif defined(_LIBCPP_MSVCRT_LIKE)
|
||||||
struct __libcpp_locale_guard {
|
struct __libcpp_locale_guard {
|
||||||
__libcpp_locale_guard(locale_t __l) :
|
__libcpp_locale_guard(locale_t __l) :
|
||||||
__status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)),
|
__status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)) {
|
||||||
__locale_collate(setlocale(LC_COLLATE, __l.__get_locale())),
|
// Setting the locale can be expensive even when the locale given is
|
||||||
__locale_ctype(setlocale(LC_CTYPE, __l.__get_locale())),
|
// already the current locale, so do an explicit check to see if the
|
||||||
__locale_monetary(setlocale(LC_MONETARY, __l.__get_locale())),
|
// current locale is already the one we want.
|
||||||
__locale_numeric(setlocale(LC_NUMERIC, __l.__get_locale())),
|
const char* __lc = __setlocale(nullptr);
|
||||||
__locale_time(setlocale(LC_TIME, __l.__get_locale()))
|
// If every category is the same, the locale string will simply be the
|
||||||
// LC_MESSAGES is not supported on Windows.
|
// locale name, otherwise it will be a semicolon-separated string listing
|
||||||
{}
|
// each category. In the second case, we know at least one category won't
|
||||||
|
// be what we want, so we only have to check the first case.
|
||||||
|
if (strcmp(__l.__get_locale(), __lc) != 0) {
|
||||||
|
__locale_all = _strdup(__lc);
|
||||||
|
if (__locale_all == nullptr)
|
||||||
|
__throw_bad_alloc();
|
||||||
|
__setlocale(__l.__get_locale());
|
||||||
|
}
|
||||||
|
}
|
||||||
~__libcpp_locale_guard() {
|
~__libcpp_locale_guard() {
|
||||||
setlocale(LC_COLLATE, __locale_collate);
|
// The CRT documentation doesn't explicitly say, but setlocale() does the
|
||||||
setlocale(LC_CTYPE, __locale_ctype);
|
// right thing when given a semicolon-separated list of locale settings
|
||||||
setlocale(LC_MONETARY, __locale_monetary);
|
// for the different categories in the same format as returned by
|
||||||
setlocale(LC_NUMERIC, __locale_numeric);
|
// setlocale(LC_ALL, nullptr).
|
||||||
setlocale(LC_TIME, __locale_time);
|
if (__locale_all != nullptr) {
|
||||||
_configthreadlocale(__status);
|
__setlocale(__locale_all);
|
||||||
|
free(__locale_all);
|
||||||
|
}
|
||||||
|
_configthreadlocale(__status);
|
||||||
|
}
|
||||||
|
static const char* __setlocale(const char* __locale) {
|
||||||
|
const char* __new_locale = setlocale(LC_ALL, __locale);
|
||||||
|
if (__new_locale == nullptr)
|
||||||
|
__throw_bad_alloc();
|
||||||
|
return __new_locale;
|
||||||
}
|
}
|
||||||
int __status;
|
int __status;
|
||||||
char* __locale_collate;
|
char* __locale_all = nullptr;
|
||||||
char* __locale_ctype;
|
|
||||||
char* __locale_monetary;
|
|
||||||
char* __locale_numeric;
|
|
||||||
char* __locale_time;
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -255,7 +271,10 @@ public:
|
|||||||
return do_compare(__lo1, __hi1, __lo2, __hi2);
|
return do_compare(__lo1, __hi1, __lo2, __hi2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME(EricWF): The _LIBCPP_ALWAYS_INLINE is needed on Windows to work
|
||||||
|
// around a dllimport bug that expects an external instantiation.
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
_LIBCPP_ALWAYS_INLINE
|
||||||
string_type transform(const char_type* __lo, const char_type* __hi) const
|
string_type transform(const char_type* __lo, const char_type* __hi) const
|
||||||
{
|
{
|
||||||
return do_transform(__lo, __hi);
|
return do_transform(__lo, __hi);
|
||||||
@ -389,6 +408,11 @@ public:
|
|||||||
static const mask punct = _ISpunct;
|
static const mask punct = _ISpunct;
|
||||||
static const mask xdigit = _ISxdigit;
|
static const mask xdigit = _ISxdigit;
|
||||||
static const mask blank = _ISblank;
|
static const mask blank = _ISblank;
|
||||||
|
#if defined(__mips__)
|
||||||
|
static const mask __regex_word = static_cast<char_class_type>(_ISbit(15));
|
||||||
|
#else
|
||||||
|
static const mask __regex_word = 0x80;
|
||||||
|
#endif
|
||||||
#elif defined(_LIBCPP_MSVCRT_LIKE)
|
#elif defined(_LIBCPP_MSVCRT_LIKE)
|
||||||
typedef unsigned short mask;
|
typedef unsigned short mask;
|
||||||
static const mask space = _SPACE;
|
static const mask space = _SPACE;
|
||||||
@ -401,6 +425,7 @@ public:
|
|||||||
static const mask punct = _PUNCT;
|
static const mask punct = _PUNCT;
|
||||||
static const mask xdigit = _HEX;
|
static const mask xdigit = _HEX;
|
||||||
static const mask blank = _BLANK;
|
static const mask blank = _BLANK;
|
||||||
|
static const mask __regex_word = 0x80;
|
||||||
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
|
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
|
||||||
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||||
# ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
@ -422,8 +447,12 @@ public:
|
|||||||
|
|
||||||
# if defined(__NetBSD__)
|
# if defined(__NetBSD__)
|
||||||
static const mask blank = _CTYPE_BL;
|
static const mask blank = _CTYPE_BL;
|
||||||
|
// NetBSD defines classes up to 0x2000
|
||||||
|
// see sys/ctype_bits.h, _CTYPE_Q
|
||||||
|
static const mask __regex_word = 0x8000;
|
||||||
# else
|
# else
|
||||||
static const mask blank = _CTYPE_B;
|
static const mask blank = _CTYPE_B;
|
||||||
|
static const mask __regex_word = 0x80;
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__sun__) || defined(_AIX)
|
#elif defined(__sun__) || defined(_AIX)
|
||||||
typedef unsigned int mask;
|
typedef unsigned int mask;
|
||||||
@ -437,6 +466,7 @@ public:
|
|||||||
static const mask punct = _ISPUNCT;
|
static const mask punct = _ISPUNCT;
|
||||||
static const mask xdigit = _ISXDIGIT;
|
static const mask xdigit = _ISXDIGIT;
|
||||||
static const mask blank = _ISBLANK;
|
static const mask blank = _ISBLANK;
|
||||||
|
static const mask __regex_word = 0x80;
|
||||||
#elif defined(_NEWLIB_VERSION)
|
#elif defined(_NEWLIB_VERSION)
|
||||||
// Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
|
// Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
|
||||||
typedef char mask;
|
typedef char mask;
|
||||||
@ -450,6 +480,7 @@ public:
|
|||||||
static const mask punct = _P;
|
static const mask punct = _P;
|
||||||
static const mask xdigit = _X | _N;
|
static const mask xdigit = _X | _N;
|
||||||
static const mask blank = _B;
|
static const mask blank = _B;
|
||||||
|
static const mask __regex_word = 0x80;
|
||||||
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
|
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
|
||||||
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
|
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
|
||||||
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
|
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
|
||||||
@ -465,6 +496,7 @@ public:
|
|||||||
static const mask punct = 1<<7;
|
static const mask punct = 1<<7;
|
||||||
static const mask xdigit = 1<<8;
|
static const mask xdigit = 1<<8;
|
||||||
static const mask blank = 1<<9;
|
static const mask blank = 1<<9;
|
||||||
|
static const mask __regex_word = 1<<10;
|
||||||
#endif
|
#endif
|
||||||
static const mask alnum = alpha | digit;
|
static const mask alnum = alpha | digit;
|
||||||
static const mask graph = alnum | punct;
|
static const mask graph = alnum | punct;
|
||||||
@ -1230,8 +1262,6 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<w
|
|||||||
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>)
|
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>)
|
||||||
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>)
|
_LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>)
|
||||||
|
|
||||||
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
|
|
||||||
|
|
||||||
template <size_t _Np>
|
template <size_t _Np>
|
||||||
struct __narrow_to_utf8
|
struct __narrow_to_utf8
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -37,28 +36,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||||||
# endif
|
# endif
|
||||||
#endif // _LIBCPP_THREAD_SAFETY_ANNOTATION
|
#endif // _LIBCPP_THREAD_SAFETY_ANNOTATION
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
|
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
|
||||||
__libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
|
__libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
|
||||||
#else
|
|
||||||
__libcpp_mutex_t __m_;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
_LIBCPP_CONSTEXPR mutex() = default;
|
||||||
constexpr mutex() = default;
|
|
||||||
|
mutex(const mutex&) = delete;
|
||||||
|
mutex& operator=(const mutex&) = delete;
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION)
|
||||||
|
~mutex() = default;
|
||||||
#else
|
#else
|
||||||
mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;}
|
~mutex() _NOEXCEPT;
|
||||||
#endif
|
#endif
|
||||||
~mutex();
|
|
||||||
|
|
||||||
private:
|
|
||||||
mutex(const mutex&);// = delete;
|
|
||||||
mutex& operator=(const mutex&);// = delete;
|
|
||||||
|
|
||||||
public:
|
|
||||||
void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability());
|
void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability());
|
||||||
bool try_lock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
|
bool try_lock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
|
||||||
void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
|
void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
|
||||||
@ -287,26 +282,20 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
|
|||||||
|
|
||||||
class _LIBCPP_TYPE_VIS condition_variable
|
class _LIBCPP_TYPE_VIS condition_variable
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
|
||||||
__libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
|
__libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
|
||||||
#else
|
|
||||||
__libcpp_condvar_t __cv_;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
_LIBCPP_CONSTEXPR condition_variable() _NOEXCEPT = default;
|
||||||
constexpr condition_variable() _NOEXCEPT = default;
|
|
||||||
|
#ifdef _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
|
||||||
|
~condition_variable() = default;
|
||||||
#else
|
#else
|
||||||
condition_variable() _NOEXCEPT {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;}
|
|
||||||
#endif
|
|
||||||
~condition_variable();
|
~condition_variable();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
condition_variable(const condition_variable&) = delete;
|
||||||
condition_variable(const condition_variable&); // = delete;
|
condition_variable& operator=(const condition_variable&) = delete;
|
||||||
condition_variable& operator=(const condition_variable&); // = delete;
|
|
||||||
|
|
||||||
public:
|
|
||||||
void notify_one() _NOEXCEPT;
|
void notify_one() _NOEXCEPT;
|
||||||
void notify_all() _NOEXCEPT;
|
void notify_all() _NOEXCEPT;
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ private:
|
|||||||
optional<allocator_type> __alloc_;
|
optional<allocator_type> __alloc_;
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __release()
|
void __release_ptr()
|
||||||
{
|
{
|
||||||
__ptr_ = nullptr;
|
__ptr_ = nullptr;
|
||||||
__alloc_ = _VSTD::nullopt;
|
__alloc_ = _VSTD::nullopt;
|
||||||
@ -194,8 +193,7 @@ using __map_node_handle =
|
|||||||
__basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
|
__basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
|
||||||
|
|
||||||
template <class _Iterator, class _NodeType>
|
template <class _Iterator, class _NodeType>
|
||||||
_LIBCPP_TEMPLATE_VIS
|
struct _LIBCPP_TEMPLATE_VIS __insert_return_type
|
||||||
struct __insert_return_type
|
|
||||||
{
|
{
|
||||||
_Iterator position;
|
_Iterator position;
|
||||||
bool inserted;
|
bool inserted;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- __nullptr --------------------------------===//
|
//===--------------------------- __nullptr --------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- __string ----------------------------------===//
|
//===-------------------------- __string ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -23,6 +22,8 @@
|
|||||||
# include <__external_threading>
|
# include <__external_threading>
|
||||||
#elif !defined(_LIBCPP_HAS_NO_THREADS)
|
#elif !defined(_LIBCPP_HAS_NO_THREADS)
|
||||||
|
|
||||||
|
typedef ::timespec __libcpp_timespec_t;
|
||||||
|
|
||||||
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
@ -149,7 +150,7 @@ int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m);
|
|||||||
|
|
||||||
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
|
_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
|
||||||
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
|
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
|
||||||
timespec *__ts);
|
__libcpp_timespec_t *__ts);
|
||||||
|
|
||||||
_LIBCPP_THREAD_ABI_VISIBILITY
|
_LIBCPP_THREAD_ABI_VISIBILITY
|
||||||
int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);
|
int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);
|
||||||
@ -157,7 +158,7 @@ int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);
|
|||||||
// Execute once
|
// Execute once
|
||||||
_LIBCPP_THREAD_ABI_VISIBILITY
|
_LIBCPP_THREAD_ABI_VISIBILITY
|
||||||
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
|
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
|
||||||
void (*init_routine)(void));
|
void (*init_routine)());
|
||||||
|
|
||||||
// Thread id
|
// Thread id
|
||||||
_LIBCPP_THREAD_ABI_VISIBILITY
|
_LIBCPP_THREAD_ABI_VISIBILITY
|
||||||
@ -288,7 +289,7 @@ int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
|
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
|
||||||
timespec *__ts)
|
__libcpp_timespec_t *__ts)
|
||||||
{
|
{
|
||||||
return pthread_cond_timedwait(__cv, __m, __ts);
|
return pthread_cond_timedwait(__cv, __m, __ts);
|
||||||
}
|
}
|
||||||
@ -300,7 +301,7 @@ int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
|
|||||||
|
|
||||||
// Execute once
|
// Execute once
|
||||||
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
|
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
|
||||||
void (*init_routine)(void)) {
|
void (*init_routine)()) {
|
||||||
return pthread_once(flag, init_routine);
|
return pthread_once(flag, init_routine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +358,7 @@ void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
|
|||||||
{
|
{
|
||||||
using namespace chrono;
|
using namespace chrono;
|
||||||
seconds __s = duration_cast<seconds>(__ns);
|
seconds __s = duration_cast<seconds>(__ns);
|
||||||
timespec __ts;
|
__libcpp_timespec_t __ts;
|
||||||
typedef decltype(__ts.tv_sec) ts_sec;
|
typedef decltype(__ts.tv_sec) ts_sec;
|
||||||
_LIBCPP_CONSTEXPR ts_sec __ts_sec_max = numeric_limits<ts_sec>::max();
|
_LIBCPP_CONSTEXPR ts_sec __ts_sec_max = numeric_limits<ts_sec>::max();
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -27,6 +26,13 @@ _LIBCPP_PUSH_MACROS
|
|||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__) // gcc.gnu.org/PR37804
|
||||||
|
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
|
||||||
|
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS multimap;
|
||||||
|
template <class, class, class> class _LIBCPP_TEMPLATE_VIS set;
|
||||||
|
template <class, class, class> class _LIBCPP_TEMPLATE_VIS multiset;
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class _Tp, class _Compare, class _Allocator> class __tree;
|
template <class _Tp, class _Compare, class _Allocator> class __tree;
|
||||||
template <class _Tp, class _NodePtr, class _DiffType>
|
template <class _Tp, class _NodePtr, class _DiffType>
|
||||||
class _LIBCPP_TEMPLATE_VIS __tree_iterator;
|
class _LIBCPP_TEMPLATE_VIS __tree_iterator;
|
||||||
@ -965,7 +971,7 @@ private:
|
|||||||
template<class _Tp, class _Compare>
|
template<class _Tp, class _Compare>
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
|
_LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
|
||||||
"the specified comparator type does not provide a const call operator")
|
"the specified comparator type does not provide a viable const call operator")
|
||||||
#endif
|
#endif
|
||||||
int __diagnose_non_const_comparator();
|
int __diagnose_non_const_comparator();
|
||||||
|
|
||||||
@ -1090,8 +1096,8 @@ public:
|
|||||||
__tree(const value_compare& __comp, const allocator_type& __a);
|
__tree(const value_compare& __comp, const allocator_type& __a);
|
||||||
__tree(const __tree& __t);
|
__tree(const __tree& __t);
|
||||||
__tree& operator=(const __tree& __t);
|
__tree& operator=(const __tree& __t);
|
||||||
template <class _InputIterator>
|
template <class _ForwardIterator>
|
||||||
void __assign_unique(_InputIterator __first, _InputIterator __last);
|
void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
|
||||||
template <class _InputIterator>
|
template <class _InputIterator>
|
||||||
void __assign_multi(_InputIterator __first, _InputIterator __last);
|
void __assign_multi(_InputIterator __first, _InputIterator __last);
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
@ -1326,10 +1332,7 @@ public:
|
|||||||
#endif // !_LIBCPP_CXX03_LANG
|
#endif // !_LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
|
pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest);
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
|
||||||
iterator __node_insert_unique(const_iterator __p,
|
|
||||||
__node_pointer __nd);
|
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator __node_insert_multi(__node_pointer __nd);
|
iterator __node_insert_multi(__node_pointer __nd);
|
||||||
@ -1509,8 +1512,50 @@ private:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
|
void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
|
||||||
|
|
||||||
__node_pointer __detach();
|
struct _DetachedTreeCache {
|
||||||
static __node_pointer __detach(__node_pointer);
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
explicit _DetachedTreeCache(__tree *__t) _NOEXCEPT : __t_(__t),
|
||||||
|
__cache_root_(__detach_from_tree(__t)) {
|
||||||
|
__advance();
|
||||||
|
}
|
||||||
|
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
__node_pointer __get() const _NOEXCEPT {
|
||||||
|
return __cache_elem_;
|
||||||
|
}
|
||||||
|
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
void __advance() _NOEXCEPT {
|
||||||
|
__cache_elem_ = __cache_root_;
|
||||||
|
if (__cache_root_) {
|
||||||
|
__cache_root_ = __detach_next(__cache_root_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
~_DetachedTreeCache() {
|
||||||
|
__t_->destroy(__cache_elem_);
|
||||||
|
if (__cache_root_) {
|
||||||
|
while (__cache_root_->__parent_ != nullptr)
|
||||||
|
__cache_root_ = static_cast<__node_pointer>(__cache_root_->__parent_);
|
||||||
|
__t_->destroy(__cache_root_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_DetachedTreeCache(_DetachedTreeCache const&) = delete;
|
||||||
|
_DetachedTreeCache& operator=(_DetachedTreeCache const&) = delete;
|
||||||
|
|
||||||
|
private:
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
static __node_pointer __detach_from_tree(__tree *__t) _NOEXCEPT;
|
||||||
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
static __node_pointer __detach_next(__node_pointer) _NOEXCEPT;
|
||||||
|
|
||||||
|
__tree *__t_;
|
||||||
|
__node_pointer __cache_root_;
|
||||||
|
__node_pointer __cache_elem_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
|
template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
|
||||||
template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
|
template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
|
||||||
@ -1548,13 +1593,13 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp,
|
|||||||
// Precondition: size() != 0
|
// Precondition: size() != 0
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
template <class _Tp, class _Compare, class _Allocator>
|
||||||
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
|
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
|
||||||
__tree<_Tp, _Compare, _Allocator>::__detach()
|
__tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_from_tree(__tree *__t) _NOEXCEPT
|
||||||
{
|
{
|
||||||
__node_pointer __cache = static_cast<__node_pointer>(__begin_node());
|
__node_pointer __cache = static_cast<__node_pointer>(__t->__begin_node());
|
||||||
__begin_node() = __end_node();
|
__t->__begin_node() = __t->__end_node();
|
||||||
__end_node()->__left_->__parent_ = nullptr;
|
__t->__end_node()->__left_->__parent_ = nullptr;
|
||||||
__end_node()->__left_ = nullptr;
|
__t->__end_node()->__left_ = nullptr;
|
||||||
size() = 0;
|
__t->size() = 0;
|
||||||
// __cache->__left_ == nullptr
|
// __cache->__left_ == nullptr
|
||||||
if (__cache->__right_ != nullptr)
|
if (__cache->__right_ != nullptr)
|
||||||
__cache = static_cast<__node_pointer>(__cache->__right_);
|
__cache = static_cast<__node_pointer>(__cache->__right_);
|
||||||
@ -1569,7 +1614,7 @@ __tree<_Tp, _Compare, _Allocator>::__detach()
|
|||||||
// This is no longer a red-black tree
|
// This is no longer a red-black tree
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
template <class _Tp, class _Compare, class _Allocator>
|
||||||
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
|
typename __tree<_Tp, _Compare, _Allocator>::__node_pointer
|
||||||
__tree<_Tp, _Compare, _Allocator>::__detach(__node_pointer __cache)
|
__tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_pointer __cache) _NOEXCEPT
|
||||||
{
|
{
|
||||||
if (__cache->__parent_ == nullptr)
|
if (__cache->__parent_ == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -1603,45 +1648,23 @@ __tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
template <class _Tp, class _Compare, class _Allocator>
|
||||||
template <class _InputIterator>
|
template <class _ForwardIterator>
|
||||||
void
|
void
|
||||||
__tree<_Tp, _Compare, _Allocator>::__assign_unique(_InputIterator __first, _InputIterator __last)
|
__tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last)
|
||||||
{
|
{
|
||||||
typedef iterator_traits<_InputIterator> _ITraits;
|
typedef iterator_traits<_ForwardIterator> _ITraits;
|
||||||
typedef typename _ITraits::value_type _ItValueType;
|
typedef typename _ITraits::value_type _ItValueType;
|
||||||
static_assert((is_same<_ItValueType, __container_value_type>::value),
|
static_assert((is_same<_ItValueType, __container_value_type>::value),
|
||||||
"__assign_unique may only be called with the containers value type");
|
"__assign_unique may only be called with the containers value type");
|
||||||
|
static_assert(__is_forward_iterator<_ForwardIterator>::value,
|
||||||
|
"__assign_unique requires a forward iterator");
|
||||||
if (size() != 0)
|
if (size() != 0)
|
||||||
{
|
{
|
||||||
__node_pointer __cache = __detach();
|
_DetachedTreeCache __cache(this);
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
for (; __cache.__get() != nullptr && __first != __last; ++__first) {
|
||||||
try
|
if (__node_assign_unique(*__first, __cache.__get()).second)
|
||||||
{
|
__cache.__advance();
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
|
||||||
for (; __cache != nullptr && __first != __last; ++__first)
|
|
||||||
{
|
|
||||||
__cache->__value_ = *__first;
|
|
||||||
__node_pointer __next = __detach(__cache);
|
|
||||||
__node_insert_unique(__cache);
|
|
||||||
__cache = __next;
|
|
||||||
}
|
}
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
|
||||||
if (__cache != nullptr)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (; __first != __last; ++__first)
|
for (; __first != __last; ++__first)
|
||||||
__insert_unique(*__first);
|
__insert_unique(*__first);
|
||||||
@ -1660,33 +1683,11 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
|
|||||||
" or the nodes value type");
|
" or the nodes value type");
|
||||||
if (size() != 0)
|
if (size() != 0)
|
||||||
{
|
{
|
||||||
__node_pointer __cache = __detach();
|
_DetachedTreeCache __cache(this);
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
for (; __cache.__get() && __first != __last; ++__first) {
|
||||||
try
|
__cache.__get()->__value_ = *__first;
|
||||||
{
|
__node_insert_multi(__cache.__get());
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
__cache.__advance();
|
||||||
for (; __cache != nullptr && __first != __last; ++__first)
|
|
||||||
{
|
|
||||||
__cache->__value_ = *__first;
|
|
||||||
__node_pointer __next = __detach(__cache);
|
|
||||||
__node_insert_multi(__cache);
|
|
||||||
__cache = __next;
|
|
||||||
}
|
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
|
||||||
if (__cache != nullptr)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (; __first != __last; ++__first)
|
for (; __first != __last; ++__first)
|
||||||
@ -1784,33 +1785,11 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
|
|||||||
const_iterator __e = end();
|
const_iterator __e = end();
|
||||||
if (size() != 0)
|
if (size() != 0)
|
||||||
{
|
{
|
||||||
__node_pointer __cache = __detach();
|
_DetachedTreeCache __cache(this);
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
while (__cache.__get() != nullptr && __t.size() != 0) {
|
||||||
try
|
__cache.__get()->__value_ = _VSTD::move(__t.remove(__t.begin())->__value_);
|
||||||
{
|
__node_insert_multi(__cache.__get());
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
__cache.__advance();
|
||||||
while (__cache != nullptr && __t.size() != 0)
|
|
||||||
{
|
|
||||||
__cache->__value_ = _VSTD::move(__t.remove(__t.begin())->__value_);
|
|
||||||
__node_pointer __next = __detach(__cache);
|
|
||||||
__node_insert_multi(__cache);
|
|
||||||
__cache = __next;
|
|
||||||
}
|
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
|
||||||
if (__cache != nullptr)
|
|
||||||
{
|
|
||||||
while (__cache->__parent_ != nullptr)
|
|
||||||
__cache = static_cast<__node_pointer>(__cache->__parent_);
|
|
||||||
destroy(__cache);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (__t.size() != 0)
|
while (__t.size() != 0)
|
||||||
@ -2319,14 +2298,15 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const __co
|
|||||||
|
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
template <class _Tp, class _Compare, class _Allocator>
|
||||||
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
||||||
__tree<_Tp, _Compare, _Allocator>::__node_insert_unique(__node_pointer __nd)
|
__tree<_Tp, _Compare, _Allocator>::__node_assign_unique(const __container_value_type& __v, __node_pointer __nd)
|
||||||
{
|
{
|
||||||
__parent_pointer __parent;
|
__parent_pointer __parent;
|
||||||
__node_base_pointer& __child = __find_equal(__parent, __nd->__value_);
|
__node_base_pointer& __child = __find_equal(__parent, _NodeTypes::__get_key(__v));
|
||||||
__node_pointer __r = static_cast<__node_pointer>(__child);
|
__node_pointer __r = static_cast<__node_pointer>(__child);
|
||||||
bool __inserted = false;
|
bool __inserted = false;
|
||||||
if (__child == nullptr)
|
if (__child == nullptr)
|
||||||
{
|
{
|
||||||
|
__nd->__value_ = __v;
|
||||||
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
|
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
|
||||||
__r = __nd;
|
__r = __nd;
|
||||||
__inserted = true;
|
__inserted = true;
|
||||||
@ -2334,22 +2314,6 @@ __tree<_Tp, _Compare, _Allocator>::__node_insert_unique(__node_pointer __nd)
|
|||||||
return pair<iterator, bool>(iterator(__r), __inserted);
|
return pair<iterator, bool>(iterator(__r), __inserted);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
|
||||||
typename __tree<_Tp, _Compare, _Allocator>::iterator
|
|
||||||
__tree<_Tp, _Compare, _Allocator>::__node_insert_unique(const_iterator __p,
|
|
||||||
__node_pointer __nd)
|
|
||||||
{
|
|
||||||
__parent_pointer __parent;
|
|
||||||
__node_base_pointer __dummy;
|
|
||||||
__node_base_pointer& __child = __find_equal(__p, __parent, __nd->__value_);
|
|
||||||
__node_pointer __r = static_cast<__node_pointer>(__child);
|
|
||||||
if (__child == nullptr)
|
|
||||||
{
|
|
||||||
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__nd));
|
|
||||||
__r = __nd;
|
|
||||||
}
|
|
||||||
return iterator(__r);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class _Tp, class _Compare, class _Allocator>
|
template <class _Tp, class _Compare, class _Allocator>
|
||||||
typename __tree<_Tp, _Compare, _Allocator>::iterator
|
typename __tree<_Tp, _Compare, _Allocator>::iterator
|
||||||
@ -2408,7 +2372,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
|
|||||||
|
|
||||||
__insert_node_at(__parent, __child,
|
__insert_node_at(__parent, __child,
|
||||||
static_cast<__node_base_pointer>(__ptr));
|
static_cast<__node_base_pointer>(__ptr));
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return _InsertReturnType{iterator(__ptr), true, _NodeHandle()};
|
return _InsertReturnType{iterator(__ptr), true, _NodeHandle()};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2433,7 +2397,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
|
|||||||
__insert_node_at(__parent, __child,
|
__insert_node_at(__parent, __child,
|
||||||
static_cast<__node_base_pointer>(__ptr));
|
static_cast<__node_base_pointer>(__ptr));
|
||||||
__r = __ptr;
|
__r = __ptr;
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
}
|
}
|
||||||
return iterator(__r);
|
return iterator(__r);
|
||||||
}
|
}
|
||||||
@ -2498,7 +2462,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(_NodeHandle&& __nh
|
|||||||
__node_base_pointer& __child = __find_leaf_high(
|
__node_base_pointer& __child = __find_leaf_high(
|
||||||
__parent, _NodeTypes::__get_key(__ptr->__value_));
|
__parent, _NodeTypes::__get_key(__ptr->__value_));
|
||||||
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
|
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return iterator(__ptr);
|
return iterator(__ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2517,7 +2481,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(
|
|||||||
__node_base_pointer& __child = __find_leaf(__hint, __parent,
|
__node_base_pointer& __child = __find_leaf(__hint, __parent,
|
||||||
_NodeTypes::__get_key(__ptr->__value_));
|
_NodeTypes::__get_key(__ptr->__value_));
|
||||||
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
|
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
|
||||||
__nh.__release();
|
__nh.__release_ptr();
|
||||||
return iterator(__ptr);
|
return iterator(__ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -54,27 +53,24 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : publ
|
|||||||
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
|
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp> class _LIBCPP_TEMPLATE_VIS tuple_element;
|
template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp>
|
template <size_t _Ip, class _Tp>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
|
||||||
{
|
{
|
||||||
public:
|
typedef _LIBCPP_NODEBUG_TYPE typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||||
typedef typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp>
|
template <size_t _Ip, class _Tp>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
|
||||||
{
|
{
|
||||||
public:
|
typedef _LIBCPP_NODEBUG_TYPE typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||||
typedef typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp>
|
template <size_t _Ip, class _Tp>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
|
||||||
{
|
{
|
||||||
public:
|
typedef _LIBCPP_NODEBUG_TYPE typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
|
||||||
typedef 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 : false_type {};
|
||||||
@ -103,7 +99,7 @@ namespace __detail {
|
|||||||
|
|
||||||
template<typename _Tp, size_t ..._Extra> struct __repeat;
|
template<typename _Tp, size_t ..._Extra> struct __repeat;
|
||||||
template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
|
template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
|
||||||
typedef __integer_sequence<_Tp,
|
typedef _LIBCPP_NODEBUG_TYPE __integer_sequence<_Tp,
|
||||||
_Np...,
|
_Np...,
|
||||||
sizeof...(_Np) + _Np...,
|
sizeof...(_Np) + _Np...,
|
||||||
2 * sizeof...(_Np) + _Np...,
|
2 * sizeof...(_Np) + _Np...,
|
||||||
@ -257,7 +253,7 @@ template <class ..._Tp> struct __tuple_types {};
|
|||||||
namespace __indexer_detail {
|
namespace __indexer_detail {
|
||||||
|
|
||||||
template <size_t _Idx, class _Tp>
|
template <size_t _Idx, class _Tp>
|
||||||
struct __indexed { using type = _Tp; };
|
struct __indexed { using type _LIBCPP_NODEBUG_TYPE = _Tp; };
|
||||||
|
|
||||||
template <class _Types, class _Indexes> struct __indexer;
|
template <class _Types, class _Indexes> struct __indexer;
|
||||||
|
|
||||||
@ -272,7 +268,7 @@ __indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);
|
|||||||
} // namespace __indexer_detail
|
} // namespace __indexer_detail
|
||||||
|
|
||||||
template <size_t _Idx, class ..._Types>
|
template <size_t _Idx, class ..._Types>
|
||||||
using __type_pack_element = typename decltype(
|
using __type_pack_element _LIBCPP_NODEBUG_TYPE = typename decltype(
|
||||||
__indexer_detail::__at_index<_Idx>(
|
__indexer_detail::__at_index<_Idx>(
|
||||||
__indexer_detail::__indexer<
|
__indexer_detail::__indexer<
|
||||||
__tuple_types<_Types...>,
|
__tuple_types<_Types...>,
|
||||||
@ -282,11 +278,10 @@ using __type_pack_element = typename decltype(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <size_t _Ip, class ..._Types>
|
template <size_t _Ip, class ..._Types>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...>>
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...>>
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
|
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
|
||||||
typedef __type_pack_element<_Ip, _Types...> type;
|
typedef _LIBCPP_NODEBUG_TYPE __type_pack_element<_Ip, _Types...> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -306,34 +301,34 @@ struct __apply_cv_mf<false, false, false> {
|
|||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<false, true, false> {
|
struct __apply_cv_mf<false, true, false> {
|
||||||
template <class _Tp> using __apply = const _Tp;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const _Tp;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<false, false, true> {
|
struct __apply_cv_mf<false, false, true> {
|
||||||
template <class _Tp> using __apply = volatile _Tp;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = volatile _Tp;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<false, true, true> {
|
struct __apply_cv_mf<false, true, true> {
|
||||||
template <class _Tp> using __apply = const volatile _Tp;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const volatile _Tp;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<true, false, false> {
|
struct __apply_cv_mf<true, false, false> {
|
||||||
template <class _Tp> using __apply = _Tp&;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = _Tp&;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<true, true, false> {
|
struct __apply_cv_mf<true, true, false> {
|
||||||
template <class _Tp> using __apply = const _Tp&;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const _Tp&;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<true, false, true> {
|
struct __apply_cv_mf<true, false, true> {
|
||||||
template <class _Tp> using __apply = volatile _Tp&;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = volatile _Tp&;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct __apply_cv_mf<true, true, true> {
|
struct __apply_cv_mf<true, true, true> {
|
||||||
template <class _Tp> using __apply = const volatile _Tp&;
|
template <class _Tp> using __apply _LIBCPP_NODEBUG_TYPE = const volatile _Tp&;
|
||||||
};
|
};
|
||||||
template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
|
template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
|
||||||
using __apply_cv_t = __apply_cv_mf<
|
using __apply_cv_t _LIBCPP_NODEBUG_TYPE = __apply_cv_mf<
|
||||||
is_lvalue_reference<_Tp>::value,
|
is_lvalue_reference<_Tp>::value,
|
||||||
is_const<_RawTp>::value,
|
is_const<_RawTp>::value,
|
||||||
is_volatile<_RawTp>::value>;
|
is_volatile<_RawTp>::value>;
|
||||||
@ -352,7 +347,7 @@ template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
|
|||||||
struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
|
struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
|
||||||
// Specialization for pair, tuple, and __tuple_types
|
// Specialization for pair, tuple, and __tuple_types
|
||||||
template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
|
template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
|
||||||
using __apply_quals = __tuple_types<
|
using __apply_quals _LIBCPP_NODEBUG_TYPE = __tuple_types<
|
||||||
typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
|
typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
@ -380,19 +375,19 @@ struct __make_tuple_types
|
|||||||
|
|
||||||
template <class ..._Types, size_t _Ep>
|
template <class ..._Types, size_t _Ep>
|
||||||
struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
|
struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
|
||||||
typedef __tuple_types<_Types...> type;
|
typedef _LIBCPP_NODEBUG_TYPE __tuple_types<_Types...> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class ..._Types, size_t _Ep>
|
template <class ..._Types, size_t _Ep>
|
||||||
struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
|
struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
|
||||||
typedef __tuple_types<_Types...> type;
|
typedef _LIBCPP_NODEBUG_TYPE __tuple_types<_Types...> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <bool ..._Preds>
|
template <bool ..._Preds>
|
||||||
struct __all_dummy;
|
struct __all_dummy;
|
||||||
|
|
||||||
template <bool ..._Pred>
|
template <bool ..._Pred>
|
||||||
using __all = is_same<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>>;
|
using __all = _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>>;
|
||||||
|
|
||||||
struct __tuple_sfinae_base {
|
struct __tuple_sfinae_base {
|
||||||
template <template <class, class...> class _Trait,
|
template <template <class, class...> class _Trait,
|
||||||
@ -457,15 +452,14 @@ struct __tuple_assignable<_Tp, _Up, true, true>
|
|||||||
|
|
||||||
|
|
||||||
template <size_t _Ip, class ..._Tp>
|
template <size_t _Ip, class ..._Tp>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
|
||||||
{
|
{
|
||||||
public:
|
typedef _LIBCPP_NODEBUG_TYPE typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
|
||||||
typedef typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
#if _LIBCPP_STD_VER > 11
|
||||||
template <size_t _Ip, class ..._Tp>
|
template <size_t _Ip, class ..._Tp>
|
||||||
using tuple_element_t = typename tuple_element <_Ip, _Tp...>::type;
|
using tuple_element_t _LIBCPP_NODEBUG_TYPE = typename tuple_element <_Ip, _Tp...>::type;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <bool _IsTuple, class _SizeTrait, size_t _Expected>
|
template <bool _IsTuple, class _SizeTrait, size_t _Expected>
|
||||||
@ -477,7 +471,7 @@ struct __tuple_like_with_size_imp<true, _SizeTrait, _Expected>
|
|||||||
|
|
||||||
template <class _Tuple, size_t _ExpectedSize,
|
template <class _Tuple, size_t _ExpectedSize,
|
||||||
class _RawTuple = typename __uncvref<_Tuple>::type>
|
class _RawTuple = typename __uncvref<_Tuple>::type>
|
||||||
using __tuple_like_with_size = __tuple_like_with_size_imp<
|
using __tuple_like_with_size _LIBCPP_NODEBUG_TYPE = __tuple_like_with_size_imp<
|
||||||
__tuple_like<_RawTuple>::value,
|
__tuple_like<_RawTuple>::value,
|
||||||
tuple_size<_RawTuple>, _ExpectedSize
|
tuple_size<_RawTuple>, _ExpectedSize
|
||||||
>;
|
>;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------ __undef_macros ------------------------------===//
|
//===------------------------ __undef_macros ------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------------ any -----------------------------------===//
|
//===------------------------------ any -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -508,7 +507,7 @@ any::any(_ValueType && __v) : __h(nullptr)
|
|||||||
template <class _ValueType, class ..._Args, class _Tp, class>
|
template <class _ValueType, class ..._Args, class _Tp, class>
|
||||||
any::any(in_place_type_t<_ValueType>, _Args&&... __args) {
|
any::any(in_place_type_t<_ValueType>, _Args&&... __args) {
|
||||||
__any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
|
__any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
|
||||||
};
|
}
|
||||||
|
|
||||||
template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
|
template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
|
||||||
any::any(in_place_type_t<_ValueType>, initializer_list<_Up> __il, _Args&&... __args) {
|
any::any(in_place_type_t<_ValueType>, initializer_list<_Up> __il, _Args&&... __args) {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- array -----------------------------------===//
|
//===---------------------------- array -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -92,7 +91,7 @@ template <class T, size_t N >
|
|||||||
void swap(array<T,N>& x, array<T,N>& y) noexcept(noexcept(x.swap(y))); // C++17
|
void swap(array<T,N>& x, array<T,N>& y) noexcept(noexcept(x.swap(y))); // C++17
|
||||||
|
|
||||||
template <class T> struct tuple_size;
|
template <class T> struct tuple_size;
|
||||||
template <size_t I, class T> class tuple_element;
|
template <size_t I, class T> struct tuple_element;
|
||||||
template <class T, size_t N> struct tuple_size<array<T, N>>;
|
template <class T, size_t N> struct tuple_size<array<T, N>>;
|
||||||
template <size_t I, class T, size_t N> struct tuple_element<I, array<T, N>>;
|
template <size_t I, class T, size_t N> struct tuple_element<I, array<T, N>>;
|
||||||
template <size_t I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in C++14
|
template <size_t I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in C++14
|
||||||
@ -191,17 +190,17 @@ struct _LIBCPP_TEMPLATE_VIS array
|
|||||||
|
|
||||||
// element access:
|
// element access:
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||||
reference operator[](size_type __n) {return __elems_[__n];}
|
reference operator[](size_type __n) _NOEXCEPT {return __elems_[__n];}
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
const_reference operator[](size_type __n) const {return __elems_[__n];}
|
const_reference operator[](size_type __n) const _NOEXCEPT {return __elems_[__n];}
|
||||||
|
|
||||||
_LIBCPP_CONSTEXPR_AFTER_CXX14 reference at(size_type __n);
|
_LIBCPP_CONSTEXPR_AFTER_CXX14 reference at(size_type __n);
|
||||||
_LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const;
|
_LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const;
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference front() {return __elems_[0];}
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference front() _NOEXCEPT {return __elems_[0];}
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference front() const {return __elems_[0];}
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference front() const _NOEXCEPT {return __elems_[0];}
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference back() {return __elems_[_Size - 1];}
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference back() _NOEXCEPT {return __elems_[_Size - 1];}
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const {return __elems_[_Size - 1];}
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const _NOEXCEPT {return __elems_[_Size - 1];}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
|
||||||
value_type* data() _NOEXCEPT {return __elems_;}
|
value_type* data() _NOEXCEPT {return __elems_;}
|
||||||
@ -304,13 +303,13 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
|
|||||||
|
|
||||||
// element access:
|
// element access:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference operator[](size_type) {
|
reference operator[](size_type) _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
const_reference operator[](size_type) const {
|
const_reference operator[](size_type) const _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
@ -328,25 +327,25 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
|
|||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference front() {
|
reference front() _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference front() const {
|
const_reference front() const _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference back() {
|
reference back() _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference back() const {
|
const_reference back() const _NOEXCEPT {
|
||||||
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
|
_LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
|
||||||
_LIBCPP_UNREACHABLE();
|
_LIBCPP_UNREACHABLE();
|
||||||
}
|
}
|
||||||
@ -434,10 +433,9 @@ struct _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
|
|||||||
: public integral_constant<size_t, _Size> {};
|
: public integral_constant<size_t, _Size> {};
|
||||||
|
|
||||||
template <size_t _Ip, class _Tp, size_t _Size>
|
template <size_t _Ip, class _Tp, size_t _Size>
|
||||||
class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
|
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
|
||||||
{
|
{
|
||||||
static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
|
static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
|
||||||
public:
|
|
||||||
typedef _Tp type;
|
typedef _Tp type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------------ bit ----------------------------------===//
|
//===------------------------------ bit ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -16,12 +15,42 @@
|
|||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
constexpr bool ispow2(T x) noexcept; // C++20
|
||||||
|
template <class T>
|
||||||
|
constexpr T ceil2(T x); // C++20
|
||||||
|
template <class T>
|
||||||
|
constexpr T floor2(T x) noexcept; // C++20
|
||||||
|
template <class T>
|
||||||
|
constexpr T log2p1(T x) noexcept; // C++20
|
||||||
|
|
||||||
|
// 23.20.2, rotating
|
||||||
|
template<class T>
|
||||||
|
constexpr T rotl(T x, unsigned int s) noexcept; // C++20
|
||||||
|
template<class T>
|
||||||
|
constexpr T rotr(T x, unsigned int s) noexcept; // C++20
|
||||||
|
|
||||||
|
// 23.20.3, counting
|
||||||
|
template<class T>
|
||||||
|
constexpr int countl_zero(T x) noexcept; // C++20
|
||||||
|
template<class T>
|
||||||
|
constexpr int countl_one(T x) noexcept; // C++20
|
||||||
|
template<class T>
|
||||||
|
constexpr int countr_zero(T x) noexcept; // C++20
|
||||||
|
template<class T>
|
||||||
|
constexpr int countr_one(T x) noexcept; // C++20
|
||||||
|
template<class T>
|
||||||
|
constexpr int popcount(T x) noexcept; // C++20
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <__config>
|
#include <__config>
|
||||||
|
#include <limits>
|
||||||
|
#include <type_traits>
|
||||||
#include <version>
|
#include <version>
|
||||||
|
#include <__debug>
|
||||||
|
|
||||||
#if defined(__IBMCPP__)
|
#if defined(__IBMCPP__)
|
||||||
#include "support/ibm/support.h"
|
#include "support/ibm/support.h"
|
||||||
@ -34,44 +63,47 @@ namespace std {
|
|||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
_LIBCPP_PUSH_MACROS
|
||||||
|
#include <__undef_macros>
|
||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
|
||||||
#ifndef _LIBCPP_COMPILER_MSVC
|
#ifndef _LIBCPP_COMPILER_MSVC
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __ctz(unsigned __x) { return __builtin_ctz(__x); }
|
int __libcpp_ctz(unsigned __x) _NOEXCEPT { return __builtin_ctz(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __ctz(unsigned long __x) { return __builtin_ctzl(__x); }
|
int __libcpp_ctz(unsigned long __x) _NOEXCEPT { return __builtin_ctzl(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __ctz(unsigned long long __x) { return __builtin_ctzll(__x); }
|
int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }
|
||||||
|
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __clz(unsigned __x) { return __builtin_clz(__x); }
|
int __libcpp_clz(unsigned __x) _NOEXCEPT { return __builtin_clz(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __clz(unsigned long __x) { return __builtin_clzl(__x); }
|
int __libcpp_clz(unsigned long __x) _NOEXCEPT { return __builtin_clzl(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __clz(unsigned long long __x) { return __builtin_clzll(__x); }
|
int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }
|
||||||
|
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __popcount(unsigned __x) { return __builtin_popcount(__x); }
|
int __libcpp_popcount(unsigned __x) _NOEXCEPT { return __builtin_popcount(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __popcount(unsigned long __x) { return __builtin_popcountl(__x); }
|
int __libcpp_popcount(unsigned long __x) _NOEXCEPT { return __builtin_popcountl(__x); }
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
int __popcount(unsigned long long __x) { return __builtin_popcountll(__x); }
|
int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
|
||||||
|
|
||||||
#else // _LIBCPP_COMPILER_MSVC
|
#else // _LIBCPP_COMPILER_MSVC
|
||||||
|
|
||||||
// Precondition: __x != 0
|
// Precondition: __x != 0
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __ctz(unsigned __x) {
|
int __libcpp_ctz(unsigned __x) {
|
||||||
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
||||||
static_assert(sizeof(unsigned long) == 4, "");
|
static_assert(sizeof(unsigned long) == 4, "");
|
||||||
unsigned long __where;
|
unsigned long __where;
|
||||||
@ -81,13 +113,13 @@ int __ctz(unsigned __x) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __ctz(unsigned long __x) {
|
int __libcpp_ctz(unsigned long __x) {
|
||||||
static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
|
static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
|
||||||
return __ctz(static_cast<unsigned>(__x));
|
return __ctz(static_cast<unsigned>(__x));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __ctz(unsigned long long __x) {
|
int __libcpp_ctz(unsigned long long __x) {
|
||||||
unsigned long __where;
|
unsigned long __where;
|
||||||
#if defined(_LIBCPP_HAS_BITSCAN64)
|
#if defined(_LIBCPP_HAS_BITSCAN64)
|
||||||
(defined(_M_AMD64) || defined(__x86_64__))
|
(defined(_M_AMD64) || defined(__x86_64__))
|
||||||
@ -105,7 +137,7 @@ int __ctz(unsigned long long __x) {
|
|||||||
|
|
||||||
// Precondition: __x != 0
|
// Precondition: __x != 0
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __clz(unsigned __x) {
|
int __libcpp_clz(unsigned __x) {
|
||||||
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
||||||
static_assert(sizeof(unsigned long) == 4, "");
|
static_assert(sizeof(unsigned long) == 4, "");
|
||||||
unsigned long __where;
|
unsigned long __where;
|
||||||
@ -115,13 +147,13 @@ int __clz(unsigned __x) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __clz(unsigned long __x) {
|
int __libcpp_clz(unsigned long __x) {
|
||||||
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
|
||||||
return __clz(static_cast<unsigned>(__x));
|
return __libcpp_clz(static_cast<unsigned>(__x));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
int __clz(unsigned long long __x) {
|
int __libcpp_clz(unsigned long long __x) {
|
||||||
unsigned long __where;
|
unsigned long __where;
|
||||||
#if defined(_LIBCPP_HAS_BITSCAN64)
|
#if defined(_LIBCPP_HAS_BITSCAN64)
|
||||||
if (_BitScanReverse64(&__where, __x))
|
if (_BitScanReverse64(&__where, __x))
|
||||||
@ -136,23 +168,298 @@ int __clz(unsigned long long __x) {
|
|||||||
return 64; // Undefined Behavior.
|
return 64; // Undefined Behavior.
|
||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned __x) {
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) {
|
||||||
static_assert(sizeof(unsigned) == 4, "");
|
static_assert(sizeof(unsigned) == 4, "");
|
||||||
return __popcnt(__x);
|
return __popcnt(__x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned long __x) {
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) {
|
||||||
static_assert(sizeof(unsigned long) == 4, "");
|
static_assert(sizeof(unsigned long) == 4, "");
|
||||||
return __popcnt(__x);
|
return __popcnt(__x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline _LIBCPP_INLINE_VISIBILITY int __popcount(unsigned long long __x) {
|
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) {
|
||||||
static_assert(sizeof(unsigned long long) == 8, "");
|
static_assert(sizeof(unsigned long long) == 8, "");
|
||||||
return __popcnt64(__x);
|
return __popcnt64(__x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_COMPILER_MSVC
|
#endif // _LIBCPP_COMPILER_MSVC
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
using __bitop_unsigned_integer _LIBCPP_NODEBUG_TYPE = integral_constant<bool,
|
||||||
|
is_integral<_Tp>::value &&
|
||||||
|
is_unsigned<_Tp>::value &&
|
||||||
|
_IsNotSame<typename remove_cv<_Tp>::type, bool>::value &&
|
||||||
|
_IsNotSame<typename remove_cv<_Tp>::type, signed char>::value &&
|
||||||
|
_IsNotSame<typename remove_cv<_Tp>::type, wchar_t>::value &&
|
||||||
|
_IsNotSame<typename remove_cv<_Tp>::type, char16_t>::value &&
|
||||||
|
_IsNotSame<typename remove_cv<_Tp>::type, char32_t>::value
|
||||||
|
>;
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
_Tp __rotl(_Tp __t, unsigned int __cnt) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__rotl requires unsigned");
|
||||||
|
const unsigned int __dig = numeric_limits<_Tp>::digits;
|
||||||
|
if ((__cnt % __dig) == 0)
|
||||||
|
return __t;
|
||||||
|
return (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
_Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__rotr requires unsigned");
|
||||||
|
const unsigned int __dig = numeric_limits<_Tp>::digits;
|
||||||
|
if ((__cnt % __dig) == 0)
|
||||||
|
return __t;
|
||||||
|
return (__t >> (__cnt % __dig)) | (__t << (__dig - (__cnt % __dig)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
int __countr_zero(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__countr_zero requires unsigned");
|
||||||
|
if (__t == 0)
|
||||||
|
return numeric_limits<_Tp>::digits;
|
||||||
|
|
||||||
|
if (sizeof(_Tp) <= sizeof(unsigned int))
|
||||||
|
return __libcpp_ctz(static_cast<unsigned int>(__t));
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long))
|
||||||
|
return __libcpp_ctz(static_cast<unsigned long>(__t));
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long long))
|
||||||
|
return __libcpp_ctz(static_cast<unsigned long long>(__t));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int __ret = 0;
|
||||||
|
int __iter = 0;
|
||||||
|
const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
|
||||||
|
while ((__iter = __libcpp_ctz(static_cast<unsigned long long>(__t))) == __ulldigits)
|
||||||
|
{
|
||||||
|
__ret += __iter;
|
||||||
|
__t >>= __ulldigits;
|
||||||
|
}
|
||||||
|
return __ret + __iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
int __countl_zero(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__countl_zero requires unsigned");
|
||||||
|
if (__t == 0)
|
||||||
|
return numeric_limits<_Tp>::digits;
|
||||||
|
|
||||||
|
if (sizeof(_Tp) <= sizeof(unsigned int))
|
||||||
|
return __libcpp_clz(static_cast<unsigned int>(__t))
|
||||||
|
- (numeric_limits<unsigned int>::digits - numeric_limits<_Tp>::digits);
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long))
|
||||||
|
return __libcpp_clz(static_cast<unsigned long>(__t))
|
||||||
|
- (numeric_limits<unsigned long>::digits - numeric_limits<_Tp>::digits);
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long long))
|
||||||
|
return __libcpp_clz(static_cast<unsigned long long>(__t))
|
||||||
|
- (numeric_limits<unsigned long long>::digits - numeric_limits<_Tp>::digits);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int __ret = 0;
|
||||||
|
int __iter = 0;
|
||||||
|
const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
|
||||||
|
while (true) {
|
||||||
|
__t = __rotr(__t, __ulldigits);
|
||||||
|
if ((__iter = __countl_zero(static_cast<unsigned long long>(__t))) != __ulldigits)
|
||||||
|
break;
|
||||||
|
__ret += __iter;
|
||||||
|
}
|
||||||
|
return __ret + __iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
int __countl_one(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__countl_one requires unsigned");
|
||||||
|
return __t != numeric_limits<_Tp>::max()
|
||||||
|
? __countl_zero(static_cast<_Tp>(~__t))
|
||||||
|
: numeric_limits<_Tp>::digits;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
int __countr_one(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__countr_one requires unsigned");
|
||||||
|
return __t != numeric_limits<_Tp>::max()
|
||||||
|
? __countr_zero(static_cast<_Tp>(~__t))
|
||||||
|
: numeric_limits<_Tp>::digits;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
int
|
||||||
|
__popcount(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__libcpp_popcount requires unsigned");
|
||||||
|
if (sizeof(_Tp) <= sizeof(unsigned int))
|
||||||
|
return __libcpp_popcount(static_cast<unsigned int>(__t));
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long))
|
||||||
|
return __libcpp_popcount(static_cast<unsigned long>(__t));
|
||||||
|
else if (sizeof(_Tp) <= sizeof(unsigned long long))
|
||||||
|
return __libcpp_popcount(static_cast<unsigned long long>(__t));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int __ret = 0;
|
||||||
|
while (__t != 0)
|
||||||
|
{
|
||||||
|
__ret += __libcpp_popcount(static_cast<unsigned long long>(__t));
|
||||||
|
__t >>= numeric_limits<unsigned long long>::digits;
|
||||||
|
}
|
||||||
|
return __ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// integral log base 2
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||||
|
unsigned __bit_log2(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned");
|
||||||
|
return std::numeric_limits<_Tp>::digits - 1 - __countl_zero(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
|
bool __ispow2(_Tp __t) _NOEXCEPT
|
||||||
|
{
|
||||||
|
static_assert(__bitop_unsigned_integer<_Tp>::value, "__ispow2 requires unsigned");
|
||||||
|
return __t != 0 && (((__t & (__t - 1)) == 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if _LIBCPP_STD_VER > 17
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp>
|
||||||
|
rotl(_Tp __t, unsigned int __cnt) noexcept
|
||||||
|
{
|
||||||
|
return __rotl(__t, __cnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// rotr
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp>
|
||||||
|
rotr(_Tp __t, unsigned int __cnt) noexcept
|
||||||
|
{
|
||||||
|
return __rotr(__t, __cnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, int>
|
||||||
|
countl_zero(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __countl_zero(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, int>
|
||||||
|
countl_one(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __countl_one(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, int>
|
||||||
|
countr_zero(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __countr_zero(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, int>
|
||||||
|
countr_one(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __countr_one(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, int>
|
||||||
|
popcount(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __popcount(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, bool>
|
||||||
|
ispow2(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __ispow2(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp>
|
||||||
|
floor2(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __t == 0 ? 0 : _Tp{1} << __bit_log2(__t);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp>
|
||||||
|
ceil2(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
if (__t < 2) return 1;
|
||||||
|
const unsigned __n = numeric_limits<_Tp>::digits - countl_zero((_Tp)(__t - 1u));
|
||||||
|
_LIBCPP_DEBUG_ASSERT(__libcpp_is_constant_evaluated() || __n != numeric_limits<_Tp>::digits, "Bad input to ceil2");
|
||||||
|
|
||||||
|
if constexpr (sizeof(_Tp) >= sizeof(unsigned))
|
||||||
|
return _Tp{1} << __n;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const unsigned __extra = numeric_limits<unsigned>::digits - numeric_limits<_Tp>::digits;
|
||||||
|
const unsigned __retVal = 1u << (__n + __extra);
|
||||||
|
return (_Tp) (__retVal >> __extra);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class _Tp>
|
||||||
|
_LIBCPP_INLINE_VISIBILITY constexpr
|
||||||
|
enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp>
|
||||||
|
log2p1(_Tp __t) noexcept
|
||||||
|
{
|
||||||
|
return __t == 0 ? 0 : __bit_log2(__t) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // _LIBCPP_STD_VER > 17
|
||||||
|
|
||||||
_LIBCPP_END_NAMESPACE_STD
|
_LIBCPP_END_NAMESPACE_STD
|
||||||
|
|
||||||
|
_LIBCPP_POP_MACROS
|
||||||
|
|
||||||
#endif // _LIBCPP_BIT
|
#endif // _LIBCPP_BIT
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- bitset ----------------------------------===//
|
//===---------------------------- bitset ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -680,7 +679,7 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
|
||||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||||
bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
|
bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
|
||||||
template<class _CharT>
|
template<class _CharT, class = _EnableIf<_IsCharLikeType<_CharT>::value> >
|
||||||
explicit bitset(const _CharT* __str,
|
explicit bitset(const _CharT* __str,
|
||||||
typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
|
typename basic_string<_CharT>::size_type __n = basic_string<_CharT>::npos,
|
||||||
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
|
_CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
|
||||||
@ -761,7 +760,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <size_t _Size>
|
template <size_t _Size>
|
||||||
template<class _CharT>
|
template<class _CharT, class>
|
||||||
bitset<_Size>::bitset(const _CharT* __str,
|
bitset<_Size>::bitset(const _CharT* __str,
|
||||||
typename basic_string<_CharT>::size_type __n,
|
typename basic_string<_CharT>::size_type __n,
|
||||||
_CharT __zero, _CharT __one)
|
_CharT __zero, _CharT __one)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- cassert -----------------------------------===//
|
//===-------------------------- cassert -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- ccomplex ---------------------------------===//
|
//===--------------------------- ccomplex ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- cctype ----------------------------------===//
|
//===---------------------------- cctype ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- cerrno ------------------------------------===//
|
//===-------------------------- cerrno ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- cfenv -----------------------------------===//
|
//===---------------------------- cfenv -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cfloat -----------------------------------===//
|
//===--------------------------- cfloat -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------------ charconv ------------------------------===//
|
//===------------------------------ charconv ------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -97,7 +96,7 @@ _LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer);
|
|||||||
_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer);
|
_LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
enum class _LIBCPP_ENUM_VIS chars_format
|
enum class _LIBCPP_ENUM_VIS chars_format
|
||||||
{
|
{
|
||||||
@ -125,7 +124,7 @@ void from_chars(const char*, const char*, bool, int = 10) = delete;
|
|||||||
namespace __itoa
|
namespace __itoa
|
||||||
{
|
{
|
||||||
|
|
||||||
static constexpr uint64_t __pow10_64[] = {
|
static _LIBCPP_CONSTEXPR uint64_t __pow10_64[] = {
|
||||||
UINT64_C(0),
|
UINT64_C(0),
|
||||||
UINT64_C(10),
|
UINT64_C(10),
|
||||||
UINT64_C(100),
|
UINT64_C(100),
|
||||||
@ -148,7 +147,7 @@ static constexpr uint64_t __pow10_64[] = {
|
|||||||
UINT64_C(10000000000000000000),
|
UINT64_C(10000000000000000000),
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr uint32_t __pow10_32[] = {
|
static _LIBCPP_CONSTEXPR uint32_t __pow10_32[] = {
|
||||||
UINT32_C(0), UINT32_C(10), UINT32_C(100),
|
UINT32_C(0), UINT32_C(10), UINT32_C(100),
|
||||||
UINT32_C(1000), UINT32_C(10000), UINT32_C(100000),
|
UINT32_C(1000), UINT32_C(10000), UINT32_C(100000),
|
||||||
UINT32_C(1000000), UINT32_C(10000000), UINT32_C(100000000),
|
UINT32_C(1000000), UINT32_C(10000000), UINT32_C(100000000),
|
||||||
@ -173,7 +172,7 @@ struct _LIBCPP_HIDDEN __traits_base
|
|||||||
return __u64toa(__v, __p);
|
return __u64toa(__v, __p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static _LIBCPP_INLINE_VISIBILITY auto& __pow() { return __pow10_64; }
|
static _LIBCPP_INLINE_VISIBILITY decltype(__pow10_64)& __pow() { return __pow10_64; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename _Tp>
|
template <typename _Tp>
|
||||||
@ -195,7 +194,7 @@ struct _LIBCPP_HIDDEN
|
|||||||
return __u32toa(__v, __p);
|
return __u32toa(__v, __p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static _LIBCPP_INLINE_VISIBILITY auto& __pow() { return __pow10_32; }
|
static _LIBCPP_INLINE_VISIBILITY decltype(__pow10_32)& __pow() { return __pow10_32; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename _Tp>
|
template <typename _Tp>
|
||||||
@ -240,7 +239,7 @@ __mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
|
|||||||
template <typename _Tp>
|
template <typename _Tp>
|
||||||
struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
|
struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
|
||||||
{
|
{
|
||||||
static constexpr int digits = numeric_limits<_Tp>::digits10 + 1;
|
static _LIBCPP_CONSTEXPR int digits = numeric_limits<_Tp>::digits10 + 1;
|
||||||
using __traits_base<_Tp>::__pow;
|
using __traits_base<_Tp>::__pow;
|
||||||
using typename __traits_base<_Tp>::type;
|
using typename __traits_base<_Tp>::type;
|
||||||
|
|
||||||
@ -286,10 +285,10 @@ __complement(_Tp __x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp>
|
template <typename _Tp>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY auto
|
inline _LIBCPP_INLINE_VISIBILITY typename make_unsigned<_Tp>::type
|
||||||
__to_unsigned(_Tp __x)
|
__to_unsigned(_Tp __x)
|
||||||
{
|
{
|
||||||
return static_cast<make_unsigned_t<_Tp>>(__x);
|
return static_cast<typename make_unsigned<_Tp>::type>(__x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp>
|
template <typename _Tp>
|
||||||
@ -315,7 +314,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
|
|||||||
|
|
||||||
#if !defined(_LIBCPP_COMPILER_MSVC)
|
#if !defined(_LIBCPP_COMPILER_MSVC)
|
||||||
if (__tx::digits <= __diff || __tx::__width(__value) <= __diff)
|
if (__tx::digits <= __diff || __tx::__width(__value) <= __diff)
|
||||||
return {__tx::__convert(__value, __first), {}};
|
return {__tx::__convert(__value, __first), errc(0)};
|
||||||
else
|
else
|
||||||
return {__last, errc::value_too_large};
|
return {__last, errc::value_too_large};
|
||||||
#else
|
#else
|
||||||
@ -380,14 +379,14 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_integral<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY to_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY to_chars_result
|
||||||
to_chars(char* __first, char* __last, _Tp __value)
|
to_chars(char* __first, char* __last, _Tp __value)
|
||||||
{
|
{
|
||||||
return __to_chars_itoa(__first, __last, __value, is_signed<_Tp>());
|
return __to_chars_itoa(__first, __last, __value, is_signed<_Tp>());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_integral<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY to_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY to_chars_result
|
||||||
to_chars(char* __first, char* __last, _Tp __value, int __base)
|
to_chars(char* __first, char* __last, _Tp __value, int __base)
|
||||||
{
|
{
|
||||||
@ -502,7 +501,7 @@ __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
|
|||||||
return __r;
|
return __r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_unsigned<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
||||||
{
|
{
|
||||||
@ -528,7 +527,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_signed<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
||||||
{
|
{
|
||||||
@ -536,7 +535,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
|
|||||||
return __sign_combinator(__first, __last, __value, __from_chars_atoi<__t>);
|
return __sign_combinator(__first, __last, __value, __from_chars_atoi<__t>);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_unsigned<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
||||||
int __base)
|
int __base)
|
||||||
@ -583,7 +582,7 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
|||||||
__base);
|
__base);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_signed<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
||||||
int __base)
|
int __base)
|
||||||
@ -593,14 +592,14 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
|
|||||||
__from_chars_integral<__t>, __base);
|
__from_chars_integral<__t>, __base);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_integral<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
from_chars(const char* __first, const char* __last, _Tp& __value)
|
from_chars(const char* __first, const char* __last, _Tp& __value)
|
||||||
{
|
{
|
||||||
return __from_chars_atoi(__first, __last, __value);
|
return __from_chars_atoi(__first, __last, __value);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename _Tp, enable_if_t<is_integral<_Tp>::value, int> = 0>
|
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
inline _LIBCPP_INLINE_VISIBILITY from_chars_result
|
||||||
from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
|
from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
|
||||||
{
|
{
|
||||||
@ -608,7 +607,7 @@ from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
|
|||||||
return __from_chars_integral(__first, __last, __value, __base);
|
return __from_chars_integral(__first, __last, __value, __base);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
#endif // _LIBCPP_CXX03_LANG
|
||||||
|
|
||||||
_LIBCPP_END_NAMESPACE_STD
|
_LIBCPP_END_NAMESPACE_STD
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- chrono ----------------------------------===//
|
//===---------------------------- chrono ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -1263,34 +1262,15 @@ operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
|
|||||||
|
|
||||||
// Duration /
|
// Duration /
|
||||||
|
|
||||||
template <class _Duration, class _Rep, bool = __is_duration<_Rep>::value>
|
|
||||||
struct __duration_divide_result
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class _Duration, class _Rep2,
|
|
||||||
bool = is_convertible<_Rep2,
|
|
||||||
typename common_type<typename _Duration::rep, _Rep2>::type>::value>
|
|
||||||
struct __duration_divide_imp
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class _Rep1, class _Period, class _Rep2>
|
|
||||||
struct __duration_divide_imp<duration<_Rep1, _Period>, _Rep2, true>
|
|
||||||
{
|
|
||||||
typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class _Rep1, class _Period, class _Rep2>
|
|
||||||
struct __duration_divide_result<duration<_Rep1, _Period>, _Rep2, false>
|
|
||||||
: __duration_divide_imp<duration<_Rep1, _Period>, _Rep2>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class _Rep1, class _Period, class _Rep2>
|
template <class _Rep1, class _Period, class _Rep2>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
_LIBCPP_CONSTEXPR
|
_LIBCPP_CONSTEXPR
|
||||||
typename __duration_divide_result<duration<_Rep1, _Period>, _Rep2>::type
|
typename enable_if
|
||||||
|
<
|
||||||
|
!__is_duration<_Rep2>::value &&
|
||||||
|
is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value,
|
||||||
|
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
|
||||||
|
>::type
|
||||||
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
||||||
{
|
{
|
||||||
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
|
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
|
||||||
@ -1313,7 +1293,12 @@ operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
|
|||||||
template <class _Rep1, class _Period, class _Rep2>
|
template <class _Rep1, class _Period, class _Rep2>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
_LIBCPP_CONSTEXPR
|
_LIBCPP_CONSTEXPR
|
||||||
typename __duration_divide_result<duration<_Rep1, _Period>, _Rep2>::type
|
typename enable_if
|
||||||
|
<
|
||||||
|
!__is_duration<_Rep2>::value &&
|
||||||
|
is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value,
|
||||||
|
duration<typename common_type<_Rep1, _Rep2>::type, _Period>
|
||||||
|
>::type
|
||||||
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
|
||||||
{
|
{
|
||||||
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
|
typedef typename common_type<_Rep1, _Rep2>::type _Cr;
|
||||||
@ -1605,9 +1590,9 @@ using local_seconds = local_time<seconds>;
|
|||||||
using local_days = local_time<days>;
|
using local_days = local_time<days>;
|
||||||
|
|
||||||
|
|
||||||
struct _LIBCPP_TYPE_VIS last_spec { explicit last_spec() = default; };
|
struct last_spec { explicit last_spec() = default; };
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS day {
|
class day {
|
||||||
private:
|
private:
|
||||||
unsigned char __d;
|
unsigned char __d;
|
||||||
public:
|
public:
|
||||||
@ -1672,7 +1657,7 @@ inline constexpr day& day::operator-=(const days& __dd) noexcept
|
|||||||
{ *this = *this - __dd; return *this; }
|
{ *this = *this - __dd; return *this; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS month {
|
class month {
|
||||||
private:
|
private:
|
||||||
unsigned char __m;
|
unsigned char __m;
|
||||||
public:
|
public:
|
||||||
@ -1743,21 +1728,21 @@ inline constexpr month& month::operator-=(const months& __dm) noexcept
|
|||||||
{ *this = *this - __dm; return *this; }
|
{ *this = *this - __dm; return *this; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year {
|
class year {
|
||||||
private:
|
private:
|
||||||
short __y;
|
short __y;
|
||||||
public:
|
public:
|
||||||
year() = default;
|
year() = default;
|
||||||
explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
|
explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
|
||||||
|
|
||||||
inline constexpr year& operator++() noexcept { ++__y; return *this; };
|
inline constexpr year& operator++() noexcept { ++__y; return *this; }
|
||||||
inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; };
|
inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; }
|
||||||
inline constexpr year& operator--() noexcept { --__y; return *this; };
|
inline constexpr year& operator--() noexcept { --__y; return *this; }
|
||||||
inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; };
|
inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; }
|
||||||
constexpr year& operator+=(const years& __dy) noexcept;
|
constexpr year& operator+=(const years& __dy) noexcept;
|
||||||
constexpr year& operator-=(const years& __dy) noexcept;
|
constexpr year& operator-=(const years& __dy) noexcept;
|
||||||
inline constexpr year operator+() const noexcept { return *this; }
|
inline constexpr year operator+() const noexcept { return *this; }
|
||||||
inline constexpr year operator-() const noexcept { return year{-__y}; };
|
inline constexpr year operator-() const noexcept { return year{-__y}; }
|
||||||
|
|
||||||
inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
|
inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
|
||||||
explicit inline constexpr operator int() const noexcept { return __y; }
|
explicit inline constexpr operator int() const noexcept { return __y; }
|
||||||
@ -1817,10 +1802,10 @@ inline constexpr year& year::operator-=(const years& __dy) noexcept
|
|||||||
inline constexpr bool year::ok() const noexcept
|
inline constexpr bool year::ok() const noexcept
|
||||||
{ return static_cast<int>(min()) <= __y && __y <= static_cast<int>(max()); }
|
{ return static_cast<int>(min()) <= __y && __y <= static_cast<int>(max()); }
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS weekday_indexed;
|
class weekday_indexed;
|
||||||
class _LIBCPP_TYPE_VIS weekday_last;
|
class weekday_last;
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS weekday {
|
class weekday {
|
||||||
private:
|
private:
|
||||||
unsigned char __wd;
|
unsigned char __wd;
|
||||||
public:
|
public:
|
||||||
@ -1906,7 +1891,7 @@ inline constexpr weekday& weekday::operator-=(const days& __dd) noexcept
|
|||||||
{ *this = *this - __dd; return *this; }
|
{ *this = *this - __dd; return *this; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS weekday_indexed {
|
class weekday_indexed {
|
||||||
private:
|
private:
|
||||||
_VSTD::chrono::weekday __wd;
|
_VSTD::chrono::weekday __wd;
|
||||||
unsigned char __idx;
|
unsigned char __idx;
|
||||||
@ -1928,7 +1913,7 @@ bool operator!=(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noex
|
|||||||
{ return !(__lhs == __rhs); }
|
{ return !(__lhs == __rhs); }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS weekday_last {
|
class weekday_last {
|
||||||
private:
|
private:
|
||||||
_VSTD::chrono::weekday __wd;
|
_VSTD::chrono::weekday __wd;
|
||||||
public:
|
public:
|
||||||
@ -1949,7 +1934,7 @@ bool operator!=(const weekday_last& __lhs, const weekday_last& __rhs) noexcept
|
|||||||
inline constexpr
|
inline constexpr
|
||||||
weekday_indexed weekday::operator[](unsigned __index) const noexcept { return weekday_indexed{*this, __index}; }
|
weekday_indexed weekday::operator[](unsigned __index) const noexcept { return weekday_indexed{*this, __index}; }
|
||||||
|
|
||||||
inline constexpr
|
inline constexpr
|
||||||
weekday_last weekday::operator[](last_spec) const noexcept { return weekday_last{*this}; }
|
weekday_last weekday::operator[](last_spec) const noexcept { return weekday_last{*this}; }
|
||||||
|
|
||||||
|
|
||||||
@ -1976,7 +1961,7 @@ inline constexpr month November{11};
|
|||||||
inline constexpr month December{12};
|
inline constexpr month December{12};
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS month_day {
|
class month_day {
|
||||||
private:
|
private:
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
chrono::day __d;
|
chrono::day __d;
|
||||||
@ -2051,7 +2036,7 @@ bool operator>=(const month_day& __lhs, const month_day& __rhs) noexcept
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS month_day_last {
|
class month_day_last {
|
||||||
private:
|
private:
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
public:
|
public:
|
||||||
@ -2102,7 +2087,7 @@ month_day_last operator/(last_spec, int __rhs) noexcept
|
|||||||
{ return month_day_last{month(__rhs)}; }
|
{ return month_day_last{month(__rhs)}; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS month_weekday {
|
class month_weekday {
|
||||||
private:
|
private:
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
chrono::weekday_indexed __wdi;
|
chrono::weekday_indexed __wdi;
|
||||||
@ -2140,7 +2125,7 @@ month_weekday operator/(const weekday_indexed& __lhs, int __rhs) noexcept
|
|||||||
{ return month_weekday{month(__rhs), __lhs}; }
|
{ return month_weekday{month(__rhs), __lhs}; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS month_weekday_last {
|
class month_weekday_last {
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
chrono::weekday_last __wdl;
|
chrono::weekday_last __wdl;
|
||||||
public:
|
public:
|
||||||
@ -2177,7 +2162,7 @@ month_weekday_last operator/(const weekday_last& __lhs, int __rhs) noexcept
|
|||||||
{ return month_weekday_last{month(__rhs), __lhs}; }
|
{ return month_weekday_last{month(__rhs), __lhs}; }
|
||||||
|
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year_month {
|
class year_month {
|
||||||
chrono::year __y;
|
chrono::year __y;
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
public:
|
public:
|
||||||
@ -2251,7 +2236,7 @@ constexpr year_month operator-(const year_month& __lhs, const years& __rhs) noex
|
|||||||
|
|
||||||
class year_month_day_last;
|
class year_month_day_last;
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year_month_day {
|
class year_month_day {
|
||||||
private:
|
private:
|
||||||
chrono::year __y;
|
chrono::year __y;
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
@ -2260,7 +2245,7 @@ public:
|
|||||||
year_month_day() = default;
|
year_month_day() = default;
|
||||||
inline constexpr year_month_day(
|
inline constexpr year_month_day(
|
||||||
const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept
|
const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept
|
||||||
: __y{__yval}, __m{__mval}, __d{__dval} {}
|
: __y{__yval}, __m{__mval}, __d{__dval} {}
|
||||||
constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
|
constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
|
||||||
inline constexpr year_month_day(const sys_days& __sysd) noexcept
|
inline constexpr year_month_day(const sys_days& __sysd) noexcept
|
||||||
: year_month_day(__from_days(__sysd.time_since_epoch())) {}
|
: year_month_day(__from_days(__sysd.time_since_epoch())) {}
|
||||||
@ -2405,7 +2390,7 @@ inline constexpr year_month_day& year_month_day::operator-=(const months& __dm)
|
|||||||
inline constexpr year_month_day& year_month_day::operator+=(const years& __dy) noexcept { *this = *this + __dy; return *this; }
|
inline constexpr year_month_day& year_month_day::operator+=(const years& __dy) noexcept { *this = *this + __dy; return *this; }
|
||||||
inline constexpr year_month_day& year_month_day::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
inline constexpr year_month_day& year_month_day::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year_month_day_last {
|
class year_month_day_last {
|
||||||
private:
|
private:
|
||||||
chrono::year __y;
|
chrono::year __y;
|
||||||
chrono::month_day_last __mdl;
|
chrono::month_day_last __mdl;
|
||||||
@ -2515,7 +2500,7 @@ inline constexpr year_month_day_last& year_month_day_last::operator+=(const year
|
|||||||
inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
||||||
|
|
||||||
inline constexpr year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept
|
inline constexpr year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept
|
||||||
: __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {}
|
: __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {}
|
||||||
|
|
||||||
inline constexpr bool year_month_day::ok() const noexcept
|
inline constexpr bool year_month_day::ok() const noexcept
|
||||||
{
|
{
|
||||||
@ -2523,7 +2508,7 @@ inline constexpr bool year_month_day::ok() const noexcept
|
|||||||
return chrono::day{1} <= __d && __d <= (__y / __m / last).day();
|
return chrono::day{1} <= __d && __d <= (__y / __m / last).day();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year_month_weekday {
|
class year_month_weekday {
|
||||||
chrono::year __y;
|
chrono::year __y;
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
chrono::weekday_indexed __wdi;
|
chrono::weekday_indexed __wdi;
|
||||||
@ -2566,7 +2551,7 @@ year_month_weekday year_month_weekday::__from_days(days __d) noexcept
|
|||||||
const sys_days __sysd{__d};
|
const sys_days __sysd{__d};
|
||||||
const chrono::weekday __wd = chrono::weekday(__sysd);
|
const chrono::weekday __wd = chrono::weekday(__sysd);
|
||||||
const year_month_day __ymd = year_month_day(__sysd);
|
const year_month_day __ymd = year_month_day(__sysd);
|
||||||
return year_month_weekday{__ymd.year(), __ymd.month(),
|
return year_month_weekday{__ymd.year(), __ymd.month(),
|
||||||
__wd[(static_cast<unsigned>(__ymd.day())-1)/7+1]};
|
__wd[(static_cast<unsigned>(__ymd.day())-1)/7+1]};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2637,7 +2622,7 @@ inline constexpr year_month_weekday& year_month_weekday::operator-=(const months
|
|||||||
inline constexpr year_month_weekday& year_month_weekday::operator+=(const years& __dy) noexcept { *this = *this + __dy; return *this; }
|
inline constexpr year_month_weekday& year_month_weekday::operator+=(const years& __dy) noexcept { *this = *this + __dy; return *this; }
|
||||||
inline constexpr year_month_weekday& year_month_weekday::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
inline constexpr year_month_weekday& year_month_weekday::operator-=(const years& __dy) noexcept { *this = *this - __dy; return *this; }
|
||||||
|
|
||||||
class _LIBCPP_TYPE_VIS year_month_weekday_last {
|
class year_month_weekday_last {
|
||||||
private:
|
private:
|
||||||
chrono::year __y;
|
chrono::year __y;
|
||||||
chrono::month __m;
|
chrono::month __m;
|
||||||
@ -2658,9 +2643,9 @@ public:
|
|||||||
inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; }
|
inline constexpr operator sys_days() const noexcept { return sys_days{__to_days()}; }
|
||||||
inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
|
inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
|
||||||
inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
|
inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
|
||||||
|
|
||||||
constexpr days __to_days() const noexcept;
|
constexpr days __to_days() const noexcept;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline constexpr
|
inline constexpr
|
||||||
@ -2698,7 +2683,7 @@ year_month_weekday_last operator/(const month_weekday_last& __lhs, const year& _
|
|||||||
|
|
||||||
inline constexpr
|
inline constexpr
|
||||||
year_month_weekday_last operator/(const month_weekday_last& __lhs, int __rhs) noexcept
|
year_month_weekday_last operator/(const month_weekday_last& __lhs, int __rhs) noexcept
|
||||||
{ return year(__rhs) / __lhs; }
|
{ return year(__rhs) / __lhs; }
|
||||||
|
|
||||||
|
|
||||||
inline constexpr
|
inline constexpr
|
||||||
@ -2810,7 +2795,7 @@ inline namespace literals
|
|||||||
{
|
{
|
||||||
return chrono::day(static_cast<unsigned>(__d));
|
return chrono::day(static_cast<unsigned>(__d));
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr chrono::year operator ""y(unsigned long long __y) noexcept
|
constexpr chrono::year operator ""y(unsigned long long __y) noexcept
|
||||||
{
|
{
|
||||||
return chrono::year(static_cast<int>(__y));
|
return chrono::year(static_cast<int>(__y));
|
||||||
@ -2842,7 +2827,7 @@ struct _FilesystemClock {
|
|||||||
|
|
||||||
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
|
static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
|
||||||
|
|
||||||
_LIBCPP_FUNC_VIS static time_point now() noexcept;
|
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
static time_t to_time_t(const time_point& __t) noexcept {
|
static time_t to_time_t(const time_point& __t) noexcept {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cinttypes --------------------------------===//
|
//===--------------------------- cinttypes --------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- ciso646 ----------------------------------===//
|
//===--------------------------- ciso646 ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- climits ----------------------------------===//
|
//===--------------------------- climits ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- clocale ----------------------------------===//
|
//===--------------------------- clocale ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- cmath -----------------------------------===//
|
//===---------------------------- cmath -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -530,7 +529,7 @@ inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double x, long double y
|
|||||||
|
|
||||||
template <class _A1, class _A2, class _A3>
|
template <class _A1, class _A2, class _A3>
|
||||||
inline _LIBCPP_INLINE_VISIBILITY
|
inline _LIBCPP_INLINE_VISIBILITY
|
||||||
typename __lazy_enable_if
|
typename _EnableIf
|
||||||
<
|
<
|
||||||
is_arithmetic<_A1>::value &&
|
is_arithmetic<_A1>::value &&
|
||||||
is_arithmetic<_A2>::value &&
|
is_arithmetic<_A2>::value &&
|
||||||
@ -607,6 +606,32 @@ __libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
|
|||||||
return isfinite(__lcpp_x);
|
return isfinite(__lcpp_x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if _LIBCPP_STD_VER > 17
|
||||||
|
template <typename _Fp>
|
||||||
|
constexpr
|
||||||
|
_Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
|
||||||
|
if ((__a <= 0 && __b >= 0) || (__a >= 0 && __b <= 0))
|
||||||
|
return __t * __b + (1 - __t) * __a;
|
||||||
|
|
||||||
|
if (__t == 1) return __b;
|
||||||
|
const _Fp __x = __a + __t * (__b - __a);
|
||||||
|
if (__t > 1 == __b > __a)
|
||||||
|
return __b < __x ? __x : __b;
|
||||||
|
else
|
||||||
|
return __x < __b ? __x : __b;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr float
|
||||||
|
lerp(float __a, float __b, float __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
|
||||||
|
|
||||||
|
constexpr double
|
||||||
|
lerp(double __a, double __b, double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
|
||||||
|
|
||||||
|
constexpr long double
|
||||||
|
lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
|
||||||
|
|
||||||
|
#endif // _LIBCPP_STD_VER > 17
|
||||||
|
|
||||||
_LIBCPP_END_NAMESPACE_STD
|
_LIBCPP_END_NAMESPACE_STD
|
||||||
|
|
||||||
#endif // _LIBCPP_CMATH
|
#endif // _LIBCPP_CMATH
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- codecvt -----------------------------------===//
|
//===-------------------------- codecvt -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- compare -----------------------------------===//
|
//===-------------------------- compare -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- complex ----------------------------------===//
|
//===--------------------------- complex ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -1450,10 +1449,10 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
|
|||||||
return __os << __s.str();
|
return __os << __s.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
#if _LIBCPP_STD_VER > 11
|
||||||
// Literal suffix for complex number literals [complex.literals]
|
// Literal suffix for complex number literals [complex.literals]
|
||||||
inline namespace literals
|
inline namespace literals
|
||||||
{
|
{
|
||||||
inline namespace complex_literals
|
inline namespace complex_literals
|
||||||
{
|
{
|
||||||
constexpr complex<long double> operator""il(long double __im)
|
constexpr complex<long double> operator""il(long double __im)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- complex.h --------------------------------===//
|
//===--------------------------- complex.h --------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------- condition_variable ----------------------------===//
|
//===---------------------- condition_variable ----------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- csetjmp ----------------------------------===//
|
//===--------------------------- csetjmp ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- csignal ----------------------------------===//
|
//===--------------------------- csignal ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstdarg ----------------------------------===//
|
//===--------------------------- cstdarg ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstdbool ---------------------------------===//
|
//===--------------------------- cstdbool ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstddef ----------------------------------===//
|
//===--------------------------- cstddef ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstdint ----------------------------------===//
|
//===--------------------------- cstdint ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- cstdio ----------------------------------===//
|
//===---------------------------- cstdio ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstdlib ----------------------------------===//
|
//===--------------------------- cstdlib ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cstring ----------------------------------===//
|
//===--------------------------- cstring ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- ctgmath -----------------------------------===//
|
//===-------------------------- ctgmath -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- ctime -----------------------------------===//
|
//===---------------------------- ctime -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- ctype.h ---------------------------------===//
|
//===---------------------------- ctype.h ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cwchar -----------------------------------===//
|
//===--------------------------- cwchar -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- cwctype ----------------------------------===//
|
//===--------------------------- cwctype ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===---------------------------- deque -----------------------------------===//
|
//===---------------------------- deque -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -1331,21 +1330,21 @@ public:
|
|||||||
|
|
||||||
// element access:
|
// element access:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference operator[](size_type __i);
|
reference operator[](size_type __i) _NOEXCEPT;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference operator[](size_type __i) const;
|
const_reference operator[](size_type __i) const _NOEXCEPT;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference at(size_type __i);
|
reference at(size_type __i);
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference at(size_type __i) const;
|
const_reference at(size_type __i) const;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference front();
|
reference front() _NOEXCEPT;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference front() const;
|
const_reference front() const _NOEXCEPT;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
reference back();
|
reference back() _NOEXCEPT;
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
const_reference back() const;
|
const_reference back() const _NOEXCEPT;
|
||||||
|
|
||||||
// 23.2.2.3 modifiers:
|
// 23.2.2.3 modifiers:
|
||||||
void push_front(const value_type& __v);
|
void push_front(const value_type& __v);
|
||||||
@ -1746,7 +1745,7 @@ deque<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::reference
|
typename deque<_Tp, _Allocator>::reference
|
||||||
deque<_Tp, _Allocator>::operator[](size_type __i)
|
deque<_Tp, _Allocator>::operator[](size_type __i) _NOEXCEPT
|
||||||
{
|
{
|
||||||
size_type __p = __base::__start_ + __i;
|
size_type __p = __base::__start_ + __i;
|
||||||
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
||||||
@ -1755,7 +1754,7 @@ deque<_Tp, _Allocator>::operator[](size_type __i)
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::const_reference
|
typename deque<_Tp, _Allocator>::const_reference
|
||||||
deque<_Tp, _Allocator>::operator[](size_type __i) const
|
deque<_Tp, _Allocator>::operator[](size_type __i) const _NOEXCEPT
|
||||||
{
|
{
|
||||||
size_type __p = __base::__start_ + __i;
|
size_type __p = __base::__start_ + __i;
|
||||||
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
||||||
@ -1786,7 +1785,7 @@ deque<_Tp, _Allocator>::at(size_type __i) const
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::reference
|
typename deque<_Tp, _Allocator>::reference
|
||||||
deque<_Tp, _Allocator>::front()
|
deque<_Tp, _Allocator>::front() _NOEXCEPT
|
||||||
{
|
{
|
||||||
return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
|
return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
|
||||||
+ __base::__start_ % __base::__block_size);
|
+ __base::__start_ % __base::__block_size);
|
||||||
@ -1795,7 +1794,7 @@ deque<_Tp, _Allocator>::front()
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::const_reference
|
typename deque<_Tp, _Allocator>::const_reference
|
||||||
deque<_Tp, _Allocator>::front() const
|
deque<_Tp, _Allocator>::front() const _NOEXCEPT
|
||||||
{
|
{
|
||||||
return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
|
return *(*(__base::__map_.begin() + __base::__start_ / __base::__block_size)
|
||||||
+ __base::__start_ % __base::__block_size);
|
+ __base::__start_ % __base::__block_size);
|
||||||
@ -1804,7 +1803,7 @@ deque<_Tp, _Allocator>::front() const
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::reference
|
typename deque<_Tp, _Allocator>::reference
|
||||||
deque<_Tp, _Allocator>::back()
|
deque<_Tp, _Allocator>::back() _NOEXCEPT
|
||||||
{
|
{
|
||||||
size_type __p = __base::size() + __base::__start_ - 1;
|
size_type __p = __base::size() + __base::__start_ - 1;
|
||||||
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
||||||
@ -1813,7 +1812,7 @@ deque<_Tp, _Allocator>::back()
|
|||||||
template <class _Tp, class _Allocator>
|
template <class _Tp, class _Allocator>
|
||||||
inline
|
inline
|
||||||
typename deque<_Tp, _Allocator>::const_reference
|
typename deque<_Tp, _Allocator>::const_reference
|
||||||
deque<_Tp, _Allocator>::back() const
|
deque<_Tp, _Allocator>::back() const _NOEXCEPT
|
||||||
{
|
{
|
||||||
size_type __p = __base::size() + __base::__start_ - 1;
|
size_type __p = __base::size() + __base::__start_ - 1;
|
||||||
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- errno.h -----------------------------------===//
|
//===-------------------------- errno.h -----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- exception ---------------------------------===//
|
//===-------------------------- exception ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -83,7 +82,7 @@ template <class E> void rethrow_if_nested(const E& e);
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <version>
|
#include <version>
|
||||||
|
|
||||||
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
|
#if defined(_LIBCPP_ABI_VCRUNTIME)
|
||||||
#include <vcruntime_exception.h>
|
#include <vcruntime_exception.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -94,7 +93,7 @@ template <class E> void rethrow_if_nested(const E& e);
|
|||||||
namespace std // purposefully not using versioning namespace
|
namespace std // purposefully not using versioning namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
#if !defined(_LIBCPP_ABI_MICROSOFT) || defined(_LIBCPP_NO_VCRUNTIME)
|
#if !defined(_LIBCPP_ABI_VCRUNTIME)
|
||||||
class _LIBCPP_EXCEPTION_ABI exception
|
class _LIBCPP_EXCEPTION_ABI exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -111,7 +110,7 @@ public:
|
|||||||
virtual ~bad_exception() _NOEXCEPT;
|
virtual ~bad_exception() _NOEXCEPT;
|
||||||
virtual const char* what() const _NOEXCEPT;
|
virtual const char* what() const _NOEXCEPT;
|
||||||
};
|
};
|
||||||
#endif // !_LIBCPP_ABI_MICROSOFT || _LIBCPP_NO_VCRUNTIME
|
#endif // !_LIBCPP_ABI_VCRUNTIME
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER <= 14 \
|
#if _LIBCPP_STD_VER <= 14 \
|
||||||
|| defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
|
|| defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
|
||||||
@ -261,11 +260,7 @@ struct __throw_with_nested;
|
|||||||
template <class _Tp, class _Up>
|
template <class _Tp, class _Up>
|
||||||
struct __throw_with_nested<_Tp, _Up, true> {
|
struct __throw_with_nested<_Tp, _Up, true> {
|
||||||
_LIBCPP_NORETURN static inline _LIBCPP_INLINE_VISIBILITY void
|
_LIBCPP_NORETURN static inline _LIBCPP_INLINE_VISIBILITY void
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
|
||||||
__do_throw(_Tp&& __t)
|
__do_throw(_Tp&& __t)
|
||||||
#else
|
|
||||||
__do_throw (_Tp& __t)
|
|
||||||
#endif // _LIBCPP_CXX03_LANG
|
|
||||||
{
|
{
|
||||||
throw __nested<_Up>(_VSTD::forward<_Tp>(__t));
|
throw __nested<_Up>(_VSTD::forward<_Tp>(__t));
|
||||||
}
|
}
|
||||||
@ -288,11 +283,7 @@ struct __throw_with_nested<_Tp, _Up, false> {
|
|||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
_LIBCPP_NORETURN
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
|
||||||
throw_with_nested(_Tp&& __t)
|
throw_with_nested(_Tp&& __t)
|
||||||
#else
|
|
||||||
throw_with_nested (_Tp& __t)
|
|
||||||
#endif // _LIBCPP_CXX03_LANG
|
|
||||||
{
|
{
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
typedef typename decay<_Tp>::type _Up;
|
typedef typename decay<_Tp>::type _Up;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- __config ---------------------------------===//
|
//===--------------------------- __config ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -37,8 +36,14 @@
|
|||||||
namespace chrono { namespace experimental { inline namespace fundamentals_v1 {
|
namespace chrono { namespace experimental { inline namespace fundamentals_v1 {
|
||||||
#define _LIBCPP_END_NAMESPACE_CHRONO_LFTS _LIBCPP_END_NAMESPACE_STD } } }
|
#define _LIBCPP_END_NAMESPACE_CHRONO_LFTS _LIBCPP_END_NAMESPACE_STD } } }
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM)
|
||||||
|
# define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM /* nothing */
|
||||||
|
#else
|
||||||
|
# define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM __attribute__((deprecated("std::experimental::filesystem has now been deprecated in favor of C++17's std::filesystem. Please stop using it and start using std::filesystem. This experimental version will be removed in LLVM 11. You can remove this warning by defining the _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM macro.")))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
|
#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
|
||||||
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem { \
|
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace filesystem _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM { \
|
||||||
inline namespace v1 {
|
inline namespace v1 {
|
||||||
|
|
||||||
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
|
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM \
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- algorithm ---------------------------------===//
|
//===-------------------------- algorithm ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===------------------------------- any ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_ANY
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_ANY
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/any> has been removed. Use <any> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/any> has been removed. Use <any> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_ANY
|
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===---------------------------- chrono ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_CHRONO
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_CHRONO
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/chrono> has been removed. Use <chrono> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/chrono> has been removed. Use <chrono> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_CHRONO
|
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------- coroutine -----------------------------===//
|
//===----------------------------- coroutine -----------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ struct __coroutine_traits_sfinae<
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename _Ret, typename... _Args>
|
template <typename _Ret, typename... _Args>
|
||||||
struct _LIBCPP_TEMPLATE_VIS coroutine_traits
|
struct coroutine_traits
|
||||||
: public __coroutine_traits_sfinae<_Ret>
|
: public __coroutine_traits_sfinae<_Ret>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
@ -299,7 +298,7 @@ noop_coroutine_handle noop_coroutine() _NOEXCEPT {
|
|||||||
}
|
}
|
||||||
#endif // __has_builtin(__builtin_coro_noop)
|
#endif // __has_builtin(__builtin_coro_noop)
|
||||||
|
|
||||||
struct _LIBCPP_TYPE_VIS suspend_never {
|
struct suspend_never {
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
bool await_ready() const _NOEXCEPT { return true; }
|
bool await_ready() const _NOEXCEPT { return true; }
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@ -308,7 +307,7 @@ struct _LIBCPP_TYPE_VIS suspend_never {
|
|||||||
void await_resume() const _NOEXCEPT {}
|
void await_resume() const _NOEXCEPT {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _LIBCPP_TYPE_VIS suspend_always {
|
struct suspend_always {
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
bool await_ready() const _NOEXCEPT { return false; }
|
bool await_ready() const _NOEXCEPT { return false; }
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- deque ------------------------------------===//
|
//===--------------------------- deque ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- filesystem -------------------------------===//
|
//===--------------------------- filesystem -------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_FILESYSTEM
|
#ifndef _LIBCPP_EXPERIMENTAL_FILESYSTEM
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- forward_list -----------------------------===//
|
//===--------------------------- forward_list -----------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- functional --------------------------------===//
|
//===-------------------------- functional --------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -110,8 +109,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
|
|||||||
#if _LIBCPP_STD_VER > 11
|
#if _LIBCPP_STD_VER > 11
|
||||||
// default searcher
|
// default searcher
|
||||||
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
|
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
|
||||||
_LIBCPP_TYPE_VIS
|
class _LIBCPP_TYPE_VIS default_searcher {
|
||||||
class default_searcher {
|
|
||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
|
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
|
||||||
@ -209,8 +207,7 @@ public:
|
|||||||
template <class _RandomAccessIterator1,
|
template <class _RandomAccessIterator1,
|
||||||
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
|
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
|
||||||
class _BinaryPredicate = equal_to<>>
|
class _BinaryPredicate = equal_to<>>
|
||||||
_LIBCPP_TYPE_VIS
|
class _LIBCPP_TYPE_VIS boyer_moore_searcher {
|
||||||
class boyer_moore_searcher {
|
|
||||||
private:
|
private:
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
|
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
|
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
|
||||||
@ -361,8 +358,7 @@ make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
|
|||||||
template <class _RandomAccessIterator1,
|
template <class _RandomAccessIterator1,
|
||||||
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
|
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
|
||||||
class _BinaryPredicate = equal_to<>>
|
class _BinaryPredicate = equal_to<>>
|
||||||
_LIBCPP_TYPE_VIS
|
class _LIBCPP_TYPE_VIS boyer_moore_horspool_searcher {
|
||||||
class boyer_moore_horspool_searcher {
|
|
||||||
private:
|
private:
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
|
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
|
||||||
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
|
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------- iterator -------------------------------===//
|
//===----------------------------- iterator -------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- list ------------------------------------===//
|
//===--------------------------- list ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------- map ------------------------------------===//
|
//===----------------------------- map ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------ memory_resource -----------------------------===//
|
//===------------------------ memory_resource -----------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is distributed under the University of Illinois Open Source
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// License. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===--------------------------- numeric ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_NUMERIC
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_NUMERIC
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/numeric> has been removed. Use <numeric> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/numeric> has been removed. Use <numeric> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_NUMERIC
|
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===-------------------------- optional ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_OPTIONAL
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_OPTIONAL
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/optional> has been removed. Use <optional> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/optional> has been removed. Use <optional> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL
|
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------ propagate_const -----------------------------===//
|
//===------------------------ propagate_const -----------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===----------------------------- ratio ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_RATIO
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_RATIO
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/ratio> has been removed. Use <ratio> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/ratio> has been removed. Use <ratio> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_RATIO
|
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===----------------------------- regex ----------------------------------===//
|
//===----------------------------- regex ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- list ------------------------------------===//
|
//===--------------------------- list ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------------- simd ---------------------------------===//
|
//===------------------------------- simd ---------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_SIMD
|
#ifndef _LIBCPP_EXPERIMENTAL_SIMD
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- string ----------------------------------===//
|
//===--------------------------- string ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===------------------------ string_view ---------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_STRING_VIEW
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_STRING_VIEW
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/string_view> has been removed. Use <string_view> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/string_view> has been removed. Use <string_view> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_STRING_VIEW
|
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===-------------------------- system_error ------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/system_error> has been removed. Use <system_error> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/system_error> has been removed. Use <system_error> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_SYSTEM_ERROR
|
|
@ -1,21 +0,0 @@
|
|||||||
// -*- C++ -*-
|
|
||||||
//===----------------------------- tuple ----------------------------------===//
|
|
||||||
//
|
|
||||||
// The LLVM Compiler Infrastructure
|
|
||||||
//
|
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
#ifndef _LIBCPP_EXPERIMENTAL_TUPLE
|
|
||||||
#define _LIBCPP_EXPERIMENTAL_TUPLE
|
|
||||||
|
|
||||||
#include <__config>
|
|
||||||
|
|
||||||
#ifdef _LIBCPP_WARNING
|
|
||||||
_LIBCPP_WARNING("<experimental/tuple> has been removed. Use <tuple> instead.")
|
|
||||||
#else
|
|
||||||
# warning "<experimental/tuple> has been removed. Use <tuple> instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _LIBCPP_EXPERIMENTAL_TUPLE
|
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- type_traits -------------------------------===//
|
//===-------------------------- type_traits -------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -73,6 +72,7 @@ inline namespace fundamentals_v1 {
|
|||||||
|
|
||||||
#if _LIBCPP_STD_VER > 11
|
#if _LIBCPP_STD_VER > 11
|
||||||
|
|
||||||
|
#include <initializer_list>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
@ -105,11 +105,10 @@ using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type;
|
|||||||
// 3.3.4, Detection idiom
|
// 3.3.4, Detection idiom
|
||||||
template <class...> using void_t = void;
|
template <class...> using void_t = void;
|
||||||
|
|
||||||
struct nonesuch {
|
struct nonesuch : private _VSTD::__nat { // make nonesuch "not an aggregate"
|
||||||
nonesuch() = delete;
|
~nonesuch() = delete;
|
||||||
~nonesuch() = delete;
|
nonesuch (nonesuch const&) = delete;
|
||||||
nonesuch (nonesuch const&) = delete;
|
void operator=(nonesuch const&) = delete;
|
||||||
void operator=(nonesuch const&) = delete;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _Default, class _AlwaysVoid, template <class...> class _Op, class... _Args>
|
template <class _Default, class _AlwaysVoid, template <class...> class _Op, class... _Args>
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------- unordered_map ------------------------------===//
|
//===------------------------- unordered_map ------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------- unordered_set ------------------------------===//
|
//===------------------------- unordered_set ------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- utility ----------------------------------===//
|
//===-------------------------- utility ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- vector ------------------------------------===//
|
//===--------------------------- vector ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------- hash_set ------------------------------------===//
|
//===------------------------- hash_set ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -17,32 +16,31 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace __gnu_cxx {
|
namespace __gnu_cxx {
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
template <typename _Tp> struct _LIBCPP_TEMPLATE_VIS hash { };
|
template <typename _Tp> struct _LIBCPP_TEMPLATE_VIS hash { };
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<const char*>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<const char*>
|
||||||
: public unary_function<const char*, size_t>
|
: public std::unary_function<const char*, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(const char *__c) const _NOEXCEPT
|
size_t operator()(const char *__c) const _NOEXCEPT
|
||||||
{
|
{
|
||||||
return __do_string_hash(__c, __c + strlen(__c));
|
return std::__do_string_hash(__c, __c + strlen(__c));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<char *>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<char *>
|
||||||
: public unary_function<char*, size_t>
|
: public std::unary_function<char*, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(char *__c) const _NOEXCEPT
|
size_t operator()(char *__c) const _NOEXCEPT
|
||||||
{
|
{
|
||||||
return __do_string_hash<const char *>(__c, __c + strlen(__c));
|
return std::__do_string_hash<const char *>(__c, __c + strlen(__c));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
|
||||||
: public unary_function<char, size_t>
|
: public std::unary_function<char, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(char __c) const _NOEXCEPT
|
size_t operator()(char __c) const _NOEXCEPT
|
||||||
@ -52,7 +50,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
|
||||||
: public unary_function<signed char, size_t>
|
: public std::unary_function<signed char, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(signed char __c) const _NOEXCEPT
|
size_t operator()(signed char __c) const _NOEXCEPT
|
||||||
@ -62,7 +60,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
|
||||||
: public unary_function<unsigned char, size_t>
|
: public std::unary_function<unsigned char, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(unsigned char __c) const _NOEXCEPT
|
size_t operator()(unsigned char __c) const _NOEXCEPT
|
||||||
@ -72,7 +70,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
|
||||||
: public unary_function<short, size_t>
|
: public std::unary_function<short, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(short __c) const _NOEXCEPT
|
size_t operator()(short __c) const _NOEXCEPT
|
||||||
@ -82,7 +80,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
|
||||||
: public unary_function<unsigned short, size_t>
|
: public std::unary_function<unsigned short, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(unsigned short __c) const _NOEXCEPT
|
size_t operator()(unsigned short __c) const _NOEXCEPT
|
||||||
@ -92,7 +90,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
|
||||||
: public unary_function<int, size_t>
|
: public std::unary_function<int, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(int __c) const _NOEXCEPT
|
size_t operator()(int __c) const _NOEXCEPT
|
||||||
@ -102,7 +100,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
|
||||||
: public unary_function<unsigned int, size_t>
|
: public std::unary_function<unsigned int, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(unsigned int __c) const _NOEXCEPT
|
size_t operator()(unsigned int __c) const _NOEXCEPT
|
||||||
@ -112,7 +110,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
|
||||||
: public unary_function<long, size_t>
|
: public std::unary_function<long, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(long __c) const _NOEXCEPT
|
size_t operator()(long __c) const _NOEXCEPT
|
||||||
@ -122,7 +120,7 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
|
template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
|
||||||
: public unary_function<unsigned long, size_t>
|
: public std::unary_function<unsigned long, size_t>
|
||||||
{
|
{
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_t operator()(unsigned long __c) const _NOEXCEPT
|
size_t operator()(unsigned long __c) const _NOEXCEPT
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===-------------------------- hash_map ----------------------------------===//
|
//===-------------------------- hash_map ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -220,10 +219,8 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
|
|||||||
|
|
||||||
namespace __gnu_cxx {
|
namespace __gnu_cxx {
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
template <class _Tp, class _Hash,
|
template <class _Tp, class _Hash,
|
||||||
bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value
|
bool = std::is_empty<_Hash>::value && !std::__libcpp_is_final<_Hash>::value
|
||||||
>
|
>
|
||||||
class __hash_map_hasher
|
class __hash_map_hasher
|
||||||
: private _Hash
|
: private _Hash
|
||||||
@ -257,7 +254,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class _Tp, class _Pred,
|
template <class _Tp, class _Pred,
|
||||||
bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value
|
bool = std::is_empty<_Pred>::value && !std::__libcpp_is_final<_Pred>::value
|
||||||
>
|
>
|
||||||
class __hash_map_equal
|
class __hash_map_equal
|
||||||
: private _Pred
|
: private _Pred
|
||||||
@ -308,7 +305,7 @@ template <class _Alloc>
|
|||||||
class __hash_map_node_destructor
|
class __hash_map_node_destructor
|
||||||
{
|
{
|
||||||
typedef _Alloc allocator_type;
|
typedef _Alloc allocator_type;
|
||||||
typedef allocator_traits<allocator_type> __alloc_traits;
|
typedef std::allocator_traits<allocator_type> __alloc_traits;
|
||||||
typedef typename __alloc_traits::value_type::__node_value_type value_type;
|
typedef typename __alloc_traits::value_type::__node_value_type value_type;
|
||||||
public:
|
public:
|
||||||
typedef typename __alloc_traits::pointer pointer;
|
typedef typename __alloc_traits::pointer pointer;
|
||||||
@ -333,7 +330,7 @@ public:
|
|||||||
|
|
||||||
#ifndef _LIBCPP_CXX03_LANG
|
#ifndef _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
__hash_map_node_destructor(std::__hash_node_destructor<allocator_type>&& __x)
|
||||||
: __na_(__x.__na_),
|
: __na_(__x.__na_),
|
||||||
__first_constructed(__x.__value_constructed),
|
__first_constructed(__x.__value_constructed),
|
||||||
__second_constructed(__x.__value_constructed)
|
__second_constructed(__x.__value_constructed)
|
||||||
@ -342,7 +339,7 @@ public:
|
|||||||
}
|
}
|
||||||
#else // _LIBCPP_CXX03_LANG
|
#else // _LIBCPP_CXX03_LANG
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
__hash_map_node_destructor(const std::__hash_node_destructor<allocator_type>& __x)
|
||||||
: __na_(__x.__na_),
|
: __na_(__x.__na_),
|
||||||
__first_constructed(__x.__value_constructed),
|
__first_constructed(__x.__value_constructed),
|
||||||
__second_constructed(__x.__value_constructed)
|
__second_constructed(__x.__value_constructed)
|
||||||
@ -371,11 +368,11 @@ class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
|
|||||||
typedef const typename _HashIterator::value_type::first_type key_type;
|
typedef const typename _HashIterator::value_type::first_type key_type;
|
||||||
typedef typename _HashIterator::value_type::second_type mapped_type;
|
typedef typename _HashIterator::value_type::second_type mapped_type;
|
||||||
public:
|
public:
|
||||||
typedef forward_iterator_tag iterator_category;
|
typedef std::forward_iterator_tag iterator_category;
|
||||||
typedef pair<key_type, mapped_type> value_type;
|
typedef std::pair<key_type, mapped_type> value_type;
|
||||||
typedef typename _HashIterator::difference_type difference_type;
|
typedef typename _HashIterator::difference_type difference_type;
|
||||||
typedef value_type& reference;
|
typedef value_type& reference;
|
||||||
typedef typename __rebind_pointer<typename _HashIterator::pointer, value_type>::type
|
typedef typename std::__rebind_pointer<typename _HashIterator::pointer, value_type>::type
|
||||||
pointer;
|
pointer;
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {}
|
_LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {}
|
||||||
@ -416,11 +413,11 @@ class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
|
|||||||
typedef const typename _HashIterator::value_type::first_type key_type;
|
typedef const typename _HashIterator::value_type::first_type key_type;
|
||||||
typedef typename _HashIterator::value_type::second_type mapped_type;
|
typedef typename _HashIterator::value_type::second_type mapped_type;
|
||||||
public:
|
public:
|
||||||
typedef forward_iterator_tag iterator_category;
|
typedef std::forward_iterator_tag iterator_category;
|
||||||
typedef pair<key_type, mapped_type> value_type;
|
typedef std::pair<key_type, mapped_type> value_type;
|
||||||
typedef typename _HashIterator::difference_type difference_type;
|
typedef typename _HashIterator::difference_type difference_type;
|
||||||
typedef const value_type& reference;
|
typedef const value_type& reference;
|
||||||
typedef typename __rebind_pointer<typename _HashIterator::pointer, const value_type>::type
|
typedef typename std::__rebind_pointer<typename _HashIterator::pointer, const value_type>::type
|
||||||
pointer;
|
pointer;
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {}
|
_LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {}
|
||||||
@ -460,8 +457,8 @@ public:
|
|||||||
template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
|
template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = std::equal_to<_Key>,
|
||||||
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
||||||
class _LIBCPP_TEMPLATE_VIS hash_map
|
class _LIBCPP_TEMPLATE_VIS hash_map
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -472,17 +469,18 @@ public:
|
|||||||
typedef _Hash hasher;
|
typedef _Hash hasher;
|
||||||
typedef _Pred key_equal;
|
typedef _Pred key_equal;
|
||||||
typedef _Alloc allocator_type;
|
typedef _Alloc allocator_type;
|
||||||
typedef pair<const key_type, mapped_type> value_type;
|
typedef std::pair<const key_type, mapped_type> value_type;
|
||||||
typedef value_type& reference;
|
typedef value_type& reference;
|
||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef pair<key_type, mapped_type> __value_type;
|
typedef std::pair<key_type, mapped_type> __value_type;
|
||||||
typedef __hash_map_hasher<__value_type, hasher> __hasher;
|
typedef __hash_map_hasher<__value_type, hasher> __hasher;
|
||||||
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
|
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
|
||||||
typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, __value_type>::type __allocator_type;
|
typedef typename std::__rebind_alloc_helper<
|
||||||
|
std::allocator_traits<allocator_type>, __value_type>::type __allocator_type;
|
||||||
|
|
||||||
typedef __hash_table<__value_type, __hasher,
|
typedef std::__hash_table<__value_type, __hasher,
|
||||||
__key_equal, __allocator_type> __table;
|
__key_equal, __allocator_type> __table;
|
||||||
|
|
||||||
__table __table_;
|
__table __table_;
|
||||||
@ -493,8 +491,8 @@ private:
|
|||||||
typedef typename __table::__node_allocator __node_allocator;
|
typedef typename __table::__node_allocator __node_allocator;
|
||||||
typedef typename __table::__node __node;
|
typedef typename __table::__node __node;
|
||||||
typedef __hash_map_node_destructor<__node_allocator> _Dp;
|
typedef __hash_map_node_destructor<__node_allocator> _Dp;
|
||||||
typedef unique_ptr<__node, _Dp> __node_holder;
|
typedef std::unique_ptr<__node, _Dp> __node_holder;
|
||||||
typedef allocator_traits<allocator_type> __alloc_traits;
|
typedef std::allocator_traits<allocator_type> __alloc_traits;
|
||||||
public:
|
public:
|
||||||
typedef typename __alloc_traits::pointer pointer;
|
typedef typename __alloc_traits::pointer pointer;
|
||||||
typedef typename __alloc_traits::const_pointer const_pointer;
|
typedef typename __alloc_traits::const_pointer const_pointer;
|
||||||
@ -544,7 +542,7 @@ public:
|
|||||||
const_iterator end() const {return __table_.end();}
|
const_iterator end() const {return __table_.end();}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, bool> insert(const value_type& __x)
|
std::pair<iterator, bool> insert(const value_type& __x)
|
||||||
{return __table_.__insert_unique(__x);}
|
{return __table_.__insert_unique(__x);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
||||||
@ -579,10 +577,10 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
std::pair<iterator, iterator> equal_range(const key_type& __k)
|
||||||
{return __table_.__equal_range_unique(__k);}
|
{return __table_.__equal_range_unique(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||||
{return __table_.__equal_range_unique(__k);}
|
{return __table_.__equal_range_unique(__k);}
|
||||||
|
|
||||||
mapped_type& operator[](const key_type& __k);
|
mapped_type& operator[](const key_type& __k);
|
||||||
@ -692,7 +690,7 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
|
|||||||
if (__i != end())
|
if (__i != end())
|
||||||
return __i->second;
|
return __i->second;
|
||||||
__node_holder __h = __construct_node(__k);
|
__node_holder __h = __construct_node(__k);
|
||||||
pair<iterator, bool> __r = __table_.__node_insert_unique(__h.get());
|
std::pair<iterator, bool> __r = __table_.__node_insert_unique(__h.get());
|
||||||
__h.release();
|
__h.release();
|
||||||
return __r.first->second;
|
return __r.first->second;
|
||||||
}
|
}
|
||||||
@ -734,8 +732,8 @@ operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
|||||||
return !(__x == __y);
|
return !(__x == __y);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
|
template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = std::equal_to<_Key>,
|
||||||
class _Alloc = allocator<pair<const _Key, _Tp> > >
|
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
||||||
class _LIBCPP_TEMPLATE_VIS hash_multimap
|
class _LIBCPP_TEMPLATE_VIS hash_multimap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -746,17 +744,17 @@ public:
|
|||||||
typedef _Hash hasher;
|
typedef _Hash hasher;
|
||||||
typedef _Pred key_equal;
|
typedef _Pred key_equal;
|
||||||
typedef _Alloc allocator_type;
|
typedef _Alloc allocator_type;
|
||||||
typedef pair<const key_type, mapped_type> value_type;
|
typedef std::pair<const key_type, mapped_type> value_type;
|
||||||
typedef value_type& reference;
|
typedef value_type& reference;
|
||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef pair<key_type, mapped_type> __value_type;
|
typedef std::pair<key_type, mapped_type> __value_type;
|
||||||
typedef __hash_map_hasher<__value_type, hasher> __hasher;
|
typedef __hash_map_hasher<__value_type, hasher> __hasher;
|
||||||
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
|
typedef __hash_map_equal<__value_type, key_equal> __key_equal;
|
||||||
typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>, __value_type>::type __allocator_type;
|
typedef typename std::__rebind_alloc_helper<std::allocator_traits<allocator_type>, __value_type>::type __allocator_type;
|
||||||
|
|
||||||
typedef __hash_table<__value_type, __hasher,
|
typedef std::__hash_table<__value_type, __hasher,
|
||||||
__key_equal, __allocator_type> __table;
|
__key_equal, __allocator_type> __table;
|
||||||
|
|
||||||
__table __table_;
|
__table __table_;
|
||||||
@ -765,8 +763,8 @@ private:
|
|||||||
typedef typename __table::__node_allocator __node_allocator;
|
typedef typename __table::__node_allocator __node_allocator;
|
||||||
typedef typename __table::__node __node;
|
typedef typename __table::__node __node;
|
||||||
typedef __hash_map_node_destructor<__node_allocator> _Dp;
|
typedef __hash_map_node_destructor<__node_allocator> _Dp;
|
||||||
typedef unique_ptr<__node, _Dp> __node_holder;
|
typedef std::unique_ptr<__node, _Dp> __node_holder;
|
||||||
typedef allocator_traits<allocator_type> __alloc_traits;
|
typedef std::allocator_traits<allocator_type> __alloc_traits;
|
||||||
public:
|
public:
|
||||||
typedef typename __alloc_traits::pointer pointer;
|
typedef typename __alloc_traits::pointer pointer;
|
||||||
typedef typename __alloc_traits::const_pointer const_pointer;
|
typedef typename __alloc_traits::const_pointer const_pointer;
|
||||||
@ -851,10 +849,10 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
std::pair<iterator, iterator> equal_range(const key_type& __k)
|
||||||
{return __table_.__equal_range_multi(__k);}
|
{return __table_.__equal_range_multi(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||||
{return __table_.__equal_range_multi(__k);}
|
{return __table_.__equal_range_multi(__k);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@ -956,7 +954,7 @@ operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
|
|||||||
return false;
|
return false;
|
||||||
typedef typename hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator
|
typedef typename hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator
|
||||||
const_iterator;
|
const_iterator;
|
||||||
typedef pair<const_iterator, const_iterator> _EqRng;
|
typedef std::pair<const_iterator, const_iterator> _EqRng;
|
||||||
for (const_iterator __i = __x.begin(), __ex = __x.end(); __i != __ex;)
|
for (const_iterator __i = __x.begin(), __ex = __x.end(); __i != __ex;)
|
||||||
{
|
{
|
||||||
_EqRng __xeq = __x.equal_range(__i->first);
|
_EqRng __xeq = __x.equal_range(__i->first);
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===------------------------- hash_set ------------------------------------===//
|
//===------------------------- hash_set ------------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
@ -208,10 +207,9 @@ template <class Value, class Hash, class Pred, class Alloc>
|
|||||||
|
|
||||||
namespace __gnu_cxx {
|
namespace __gnu_cxx {
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
|
template <class _Value, class _Hash = hash<_Value>, class _Pred = std::equal_to<_Value>,
|
||||||
class _Alloc = allocator<_Value> >
|
class _Alloc = std::allocator<_Value> >
|
||||||
class _LIBCPP_TEMPLATE_VIS hash_set
|
class _LIBCPP_TEMPLATE_VIS hash_set
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -225,7 +223,7 @@ public:
|
|||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
|
typedef std::__hash_table<value_type, hasher, key_equal, allocator_type> __table;
|
||||||
|
|
||||||
__table __table_;
|
__table __table_;
|
||||||
|
|
||||||
@ -277,7 +275,7 @@ public:
|
|||||||
const_iterator end() const {return __table_.end();}
|
const_iterator end() const {return __table_.end();}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, bool> insert(const value_type& __x)
|
std::pair<iterator, bool> insert(const value_type& __x)
|
||||||
{return __table_.__insert_unique(__x);}
|
{return __table_.__insert_unique(__x);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
|
||||||
@ -310,10 +308,10 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
std::pair<iterator, iterator> equal_range(const key_type& __k)
|
||||||
{return __table_.__equal_range_unique(__k);}
|
{return __table_.__equal_range_unique(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||||
{return __table_.__equal_range_unique(__k);}
|
{return __table_.__equal_range_unique(__k);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@ -432,8 +430,8 @@ operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
|
|||||||
return !(__x == __y);
|
return !(__x == __y);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
|
template <class _Value, class _Hash = hash<_Value>, class _Pred = std::equal_to<_Value>,
|
||||||
class _Alloc = allocator<_Value> >
|
class _Alloc = std::allocator<_Value> >
|
||||||
class _LIBCPP_TEMPLATE_VIS hash_multiset
|
class _LIBCPP_TEMPLATE_VIS hash_multiset
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -447,7 +445,7 @@ public:
|
|||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
|
typedef std::__hash_table<value_type, hasher, key_equal, allocator_type> __table;
|
||||||
|
|
||||||
__table __table_;
|
__table __table_;
|
||||||
|
|
||||||
@ -531,10 +529,10 @@ public:
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<iterator, iterator> equal_range(const key_type& __k)
|
std::pair<iterator, iterator> equal_range(const key_type& __k)
|
||||||
{return __table_.__equal_range_multi(__k);}
|
{return __table_.__equal_range_multi(__k);}
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
|
||||||
{return __table_.__equal_range_multi(__k);}
|
{return __table_.__equal_range_multi(__k);}
|
||||||
|
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
@ -611,7 +609,7 @@ template <class _InputIterator>
|
|||||||
inline
|
inline
|
||||||
void
|
void
|
||||||
hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
|
||||||
_InputIterator __last)
|
_InputIterator __last)
|
||||||
{
|
{
|
||||||
for (; __first != __last; ++__first)
|
for (; __first != __last; ++__first)
|
||||||
__table_.__insert_multi(*__first);
|
__table_.__insert_multi(*__first);
|
||||||
@ -635,7 +633,7 @@ operator==(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
|
|||||||
return false;
|
return false;
|
||||||
typedef typename hash_multiset<_Value, _Hash, _Pred, _Alloc>::const_iterator
|
typedef typename hash_multiset<_Value, _Hash, _Pred, _Alloc>::const_iterator
|
||||||
const_iterator;
|
const_iterator;
|
||||||
typedef pair<const_iterator, const_iterator> _EqRng;
|
typedef std::pair<const_iterator, const_iterator> _EqRng;
|
||||||
for (const_iterator __i = __x.begin(), __ex = __x.end(); __i != __ex;)
|
for (const_iterator __i = __x.begin(), __ex = __x.end(); __i != __ex;)
|
||||||
{
|
{
|
||||||
_EqRng __xeq = __x.equal_range(*__i);
|
_EqRng __xeq = __x.equal_range(*__i);
|
||||||
|
116
lib/libcxx/include/fenv.h
Normal file
116
lib/libcxx/include/fenv.h
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
//===---------------------------- math.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
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#ifndef _LIBCPP_FENV_H
|
||||||
|
#define _LIBCPP_FENV_H
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
fenv.h synopsis
|
||||||
|
|
||||||
|
This entire header is C99 / C++0X
|
||||||
|
|
||||||
|
Macros:
|
||||||
|
|
||||||
|
FE_DIVBYZERO
|
||||||
|
FE_INEXACT
|
||||||
|
FE_INVALID
|
||||||
|
FE_OVERFLOW
|
||||||
|
FE_UNDERFLOW
|
||||||
|
FE_ALL_EXCEPT
|
||||||
|
FE_DOWNWARD
|
||||||
|
FE_TONEAREST
|
||||||
|
FE_TOWARDZERO
|
||||||
|
FE_UPWARD
|
||||||
|
FE_DFL_ENV
|
||||||
|
|
||||||
|
Types:
|
||||||
|
|
||||||
|
fenv_t
|
||||||
|
fexcept_t
|
||||||
|
|
||||||
|
int feclearexcept(int excepts);
|
||||||
|
int fegetexceptflag(fexcept_t* flagp, int excepts);
|
||||||
|
int feraiseexcept(int excepts);
|
||||||
|
int fesetexceptflag(const fexcept_t* flagp, int excepts);
|
||||||
|
int fetestexcept(int excepts);
|
||||||
|
int fegetround();
|
||||||
|
int fesetround(int round);
|
||||||
|
int fegetenv(fenv_t* envp);
|
||||||
|
int feholdexcept(fenv_t* envp);
|
||||||
|
int fesetenv(const fenv_t* envp);
|
||||||
|
int feupdateenv(const fenv_t* envp);
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <__config>
|
||||||
|
|
||||||
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include_next <fenv.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
extern "C++" {
|
||||||
|
|
||||||
|
#ifdef feclearexcept
|
||||||
|
#undef feclearexcept
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef fegetexceptflag
|
||||||
|
#undef fegetexceptflag
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef feraiseexcept
|
||||||
|
#undef feraiseexcept
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef fesetexceptflag
|
||||||
|
#undef fesetexceptflag
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef fetestexcept
|
||||||
|
#undef fetestexcept
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef fegetround
|
||||||
|
#undef fegetround
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef fesetround
|
||||||
|
#undef fesetround
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef fegetenv
|
||||||
|
#undef fegetenv
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef feholdexcept
|
||||||
|
#undef feholdexcept
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef fesetenv
|
||||||
|
#undef fesetenv
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef feupdateenv
|
||||||
|
#undef feupdateenv
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // extern "C++"
|
||||||
|
|
||||||
|
#endif // defined(__cplusplus)
|
||||||
|
|
||||||
|
#endif // _LIBCPP_FENV_H
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- filesystem -------------------------------===//
|
//===--------------------------- filesystem -------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
#ifndef _LIBCPP_FILESYSTEM
|
#ifndef _LIBCPP_FILESYSTEM
|
||||||
@ -259,6 +258,8 @@ _LIBCPP_PUSH_MACROS
|
|||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
|
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
|
||||||
|
|
||||||
|
_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
|
||||||
|
|
||||||
typedef chrono::time_point<_FilesystemClock> file_time_type;
|
typedef chrono::time_point<_FilesystemClock> file_time_type;
|
||||||
|
|
||||||
struct _LIBCPP_TYPE_VIS space_info {
|
struct _LIBCPP_TYPE_VIS space_info {
|
||||||
@ -1311,7 +1312,11 @@ inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
|
|||||||
return !(__lhs == __rhs);
|
return !(__lhs == __rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
|
// TODO(ldionne): We need to pop the pragma and push it again after
|
||||||
|
// filesystem_error to work around PR41078.
|
||||||
|
_LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||||
|
|
||||||
|
class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
|
||||||
public:
|
public:
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
filesystem_error(const string& __what, error_code __ec)
|
filesystem_error(const string& __what, error_code __ec)
|
||||||
@ -1348,11 +1353,10 @@ public:
|
|||||||
return __storage_->__what_.c_str();
|
return __storage_->__what_.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
_LIBCPP_FUNC_VIS
|
|
||||||
void __create_what(int __num_paths);
|
void __create_what(int __num_paths);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct _Storage {
|
struct _LIBCPP_HIDDEN _Storage {
|
||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
_Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
|
_Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
|
||||||
|
|
||||||
@ -1363,16 +1367,16 @@ private:
|
|||||||
shared_ptr<_Storage> __storage_;
|
shared_ptr<_Storage> __storage_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
|
||||||
|
|
||||||
template <class... _Args>
|
template <class... _Args>
|
||||||
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
|
||||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||||
void
|
void __throw_filesystem_error(_Args&&... __args) {
|
||||||
__throw_filesystem_error(_Args&&... __args) {
|
|
||||||
throw filesystem_error(std::forward<_Args>(__args)...);
|
throw filesystem_error(std::forward<_Args>(__args)...);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void
|
void __throw_filesystem_error(_Args&&...) {
|
||||||
__throw_filesystem_error(_Args&&...) {
|
|
||||||
_VSTD::abort();
|
_VSTD::abort();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1938,7 +1942,7 @@ inline _LIBCPP_INLINE_VISIBILITY path weakly_canonical(path const& __p,
|
|||||||
|
|
||||||
class directory_iterator;
|
class directory_iterator;
|
||||||
class recursive_directory_iterator;
|
class recursive_directory_iterator;
|
||||||
class __dir_stream;
|
class _LIBCPP_HIDDEN __dir_stream;
|
||||||
|
|
||||||
class directory_entry {
|
class directory_entry {
|
||||||
typedef _VSTD_FS::path _Path;
|
typedef _VSTD_FS::path _Path;
|
||||||
@ -2601,7 +2605,7 @@ private:
|
|||||||
operator==(const recursive_directory_iterator&,
|
operator==(const recursive_directory_iterator&,
|
||||||
const recursive_directory_iterator&) noexcept;
|
const recursive_directory_iterator&) noexcept;
|
||||||
|
|
||||||
struct __shared_imp;
|
struct _LIBCPP_HIDDEN __shared_imp;
|
||||||
shared_ptr<__shared_imp> __imp_;
|
shared_ptr<__shared_imp> __imp_;
|
||||||
bool __rec_;
|
bool __rec_;
|
||||||
}; // class recursive_directory_iterator
|
}; // class recursive_directory_iterator
|
||||||
@ -2628,6 +2632,8 @@ end(const recursive_directory_iterator&) noexcept {
|
|||||||
return recursive_directory_iterator();
|
return recursive_directory_iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_LIBCPP_AVAILABILITY_FILESYSTEM_POP
|
||||||
|
|
||||||
_LIBCPP_END_NAMESPACE_FILESYSTEM
|
_LIBCPP_END_NAMESPACE_FILESYSTEM
|
||||||
|
|
||||||
#endif // !_LIBCPP_CXX03_LANG
|
#endif // !_LIBCPP_CXX03_LANG
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// -*- C++ -*-
|
// -*- C++ -*-
|
||||||
//===--------------------------- float.h ----------------------------------===//
|
//===--------------------------- float.h ----------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
//
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
// Source Licenses. See LICENSE.TXT for details.
|
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user