[libc++] Add a bunch of missing _LIBCPP_HIDE_FROM_ABI

Reviewed By: ldionne, Mordante, var-const, huixie90, #libc

Spies: jloser, libcxx-commits, arichardson, miyuki

Differential Revision: https://reviews.llvm.org/D129968
This commit is contained in:
Nikolas Klauser 2022-08-13 13:23:16 +02:00
parent f1596952f9
commit 80c7e93a2a
94 changed files with 668 additions and 319 deletions

View File

@ -92,6 +92,15 @@ configuration easier.
$ make -C <build> cxx-test-depends
$ <build>/bin/llvm-lit -sv libcxx/test # will use your custom config file
Additional tools
----------------
The libc++ test suite uses a few optional tools to improve the code quality.
These tools are:
- clang-query
- clang-tidy
Writing Tests
-------------

View File

@ -91,7 +91,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
@ -144,7 +144,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,

View File

@ -21,6 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,

View File

@ -56,6 +56,7 @@ public:
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _Sent1,
class _InputIterator2, class _Sent2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI
void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
_InputIterator2 __first2, _Sent2 __last2,
_OutputIterator __result, _Compare&& __comp)
@ -83,6 +84,7 @@ void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __buffered_inplace_merge(
_BidirectionalIterator __first,
_BidirectionalIterator __middle,

View File

@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
for (; __first != __last; ++__first)

View File

@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
__lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{

View File

@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_OutputIterator
__merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)

View File

@ -79,7 +79,7 @@ pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __c
}
template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,

View File

@ -25,8 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
pair<_BidirectionalIterator, bool>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, bool>
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
using _Result = pair<_BidirectionalIterator, bool>;

View File

@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 bool
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 bool
__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
_RandomAccessIterator __m, _Compare __comp)
{
@ -42,7 +42,7 @@ __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
__nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
{
using _Ops = _IterOps<_AlgPolicy>;

View File

@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_RandomAccessIterator __partial_sort_impl(
_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
if (__first == __middle) {
@ -55,7 +55,7 @@ _RandomAccessIterator __partial_sort_impl(
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
_Compare& __comp) {
if (__first == __middle)

View File

@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare,
class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
class _Proj1, class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
__partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
_RandomAccessIterator __result_first, _Sentinel2 __result_last,
_Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)

View File

@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
{
while (true)
@ -48,7 +48,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
}
template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
bidirectional_iterator_tag)
{

View File

@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator1,
class _OutputIterator2, class _Predicate>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
partition_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator1 __out_true, _OutputIterator2 __out_false,
_Predicate __pred)

View File

@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template<class _ForwardIterator, class _Predicate>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;

View File

@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
pair<_BidirectionalIterator, bool>
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{

View File

@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
__first = _VSTD::find(__first, __last, __value);

View File

@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
__first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);

View File

@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
__rotate_left(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
@ -40,7 +40,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
}
template <class _AlgPolicy, class _BidirectionalIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
@ -54,7 +54,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
}
template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
_ForwardIterator __i = __middle;
@ -103,7 +103,7 @@ __algo_gcd(_Integral __x, _Integral __y)
}
template <class _AlgPolicy, typename _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;

View File

@ -93,7 +93,7 @@ public:
_LIBCPP_FUNC_VIS __rs_default __rs_get();
template <class _RandomAccessIterator>
_LIBCPP_DEPRECATED_IN_CXX14 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -114,7 +114,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
}
template <class _RandomAccessIterator, class _RandomNumberGenerator>
_LIBCPP_DEPRECATED_IN_CXX14 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#ifndef _LIBCPP_CXX03_LANG
_RandomNumberGenerator&& __rand)
@ -137,7 +137,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#endif
template <class _AlgPolicy, class _RandomAccessIterator, class _Sentinel, class _UniformRandomNumberGenerator>
_RandomAccessIterator __shuffle(
_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __shuffle(
_RandomAccessIterator __first, _Sentinel __last_sentinel, _UniformRandomNumberGenerator&& __g) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
@ -161,8 +161,8 @@ _RandomAccessIterator __shuffle(
}
template <class _RandomAccessIterator, class _UniformRandomNumberGenerator>
void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
_UniformRandomNumberGenerator&& __g) {
_LIBCPP_HIDE_FROM_ABI void
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) {
(void)std::__shuffle<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), std::forward<_UniformRandomNumberGenerator>(__g));
}

View File

@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
__sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
_RandomAccessIterator __start)
@ -78,7 +78,7 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
__floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len)
{

View File

@ -80,6 +80,7 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
// stable, 2-3 compares, 0-2 swaps
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
@ -118,6 +119,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIte
// stable, 3-6 compares, 0-5 swaps
template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
unsigned __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
@ -281,6 +283,7 @@ __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2,
// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
_Compare __comp) {
_BidirectionalIterator __lm1 = __last;
@ -292,6 +295,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __fir
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@ -309,6 +313,7 @@ void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __l
}
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@ -332,7 +337,7 @@ void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __l
}
template <class _WrappedComp, class _RandomAccessIterator>
bool __insertion_sort_incomplete(
_LIBCPP_HIDDEN bool __insertion_sort_incomplete(
_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
using _Unwrap = _UnwrapAlgPolicy<_WrappedComp>;
using _AlgPolicy = typename _Unwrap::_AlgPolicy;
@ -387,6 +392,7 @@ bool __insertion_sort_incomplete(
}
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_move(_BidirectionalIterator __first1, _BidirectionalIterator __last1,
typename iterator_traits<_BidirectionalIterator>::value_type* __first2, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@ -616,7 +622,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
}
template <class _WrappedComp, class _RandomAccessIterator>
void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
_LIBCPP_HIDDEN void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __depth_limit = 2 * __log2i(__last - __first);

View File

@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair>
_ForwardIterator
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
_Distance __len, _Pair __p, forward_iterator_tag __fit)
{
@ -114,7 +114,7 @@ __second_half_done:
}
template <class _AlgPolicy, class _Predicate, class _ForwardIterator>
_ForwardIterator
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
forward_iterator_tag)
{
@ -259,7 +259,7 @@ __second_half_done:
}
template <class _AlgPolicy, class _Predicate, class _BidirectionalIterator>
_BidirectionalIterator
_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred,
bidirectional_iterator_tag)
{

View File

@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2>
void
_LIBCPP_HIDE_FROM_ABI void
__merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
typename iterator_traits<_InputIterator1>::value_type* __result, _Compare __comp)
@ -69,7 +69,7 @@ __merge_move_construct(_InputIterator1 __first1, _InputIterator1 __last1,
}
template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
void
_LIBCPP_HIDE_FROM_ABI void
__merge_move_assign(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_OutputIterator __result, _Compare __comp)

View File

@ -176,7 +176,7 @@ private:
// find
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@ -212,7 +212,7 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
}
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst>
__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@ -263,7 +263,7 @@ find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
// count
template <class _Cp, bool _IsConst>
typename __bit_iterator<_Cp, _IsConst>::difference_type
_LIBCPP_HIDE_FROM_ABI typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@ -294,7 +294,7 @@ __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
}
template <class _Cp, bool _IsConst>
typename __bit_iterator<_Cp, _IsConst>::difference_type
_LIBCPP_HIDE_FROM_ABI typename __bit_iterator<_Cp, _IsConst>::difference_type
__count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, _IsConst> _It;
@ -337,7 +337,7 @@ count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __las
// fill_n
template <class _Cp>
_LIBCPP_CONSTEXPR_AFTER_CXX17 void
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void
__fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, false> _It;
@ -367,7 +367,7 @@ __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
}
template <class _Cp>
_LIBCPP_CONSTEXPR_AFTER_CXX17 void
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void
__fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
{
typedef __bit_iterator<_Cp, false> _It;
@ -424,8 +424,7 @@ fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool
// copy
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17
__bit_iterator<_Cp, false>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@ -472,8 +471,7 @@ __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCon
}
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17
__bit_iterator<_Cp, false>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@ -563,7 +561,7 @@ copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last
// copy_backward
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@ -610,7 +608,7 @@ __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_C
}
template <class _Cp, bool _IsConst>
_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
__copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
__bit_iterator<_Cp, false> __result)
{
@ -728,7 +726,7 @@ move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCons
// swap_ranges
template <class __C1, class __C2>
__bit_iterator<__C2, false>
_LIBCPP_HIDE_FROM_ABI __bit_iterator<__C2, false>
__swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
{
@ -778,7 +776,7 @@ __swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1,
}
template <class __C1, class __C2>
__bit_iterator<__C2, false>
_LIBCPP_HIDE_FROM_ABI __bit_iterator<__C2, false>
__swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1, false> __last,
__bit_iterator<__C2, false> __result)
{
@ -923,7 +921,7 @@ struct __bit_array
};
template <class _Cp>
_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false>
rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last)
{
typedef __bit_iterator<_Cp, false> _I1;
@ -974,7 +972,7 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
// equal
template <class _Cp, bool _IC1, bool _IC2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool
__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
__bit_iterator<_Cp, _IC2> __first2)
{
@ -1056,7 +1054,7 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
}
template <class _Cp, bool _IC1, bool _IC2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool
__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
__bit_iterator<_Cp, _IC2> __first2)
{

View File

@ -534,67 +534,67 @@ inline namespace literals
inline namespace chrono_literals
{
constexpr chrono::hours operator""h(unsigned long long __h)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::hours operator""h(unsigned long long __h)
{
return chrono::hours(static_cast<chrono::hours::rep>(__h));
}
constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __h)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __h)
{
return chrono::duration<long double, ratio<3600,1>>(__h);
}
constexpr chrono::minutes operator""min(unsigned long long __m)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes operator""min(unsigned long long __m)
{
return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
}
constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __m)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __m)
{
return chrono::duration<long double, ratio<60,1>> (__m);
}
constexpr chrono::seconds operator""s(unsigned long long __s)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds operator""s(unsigned long long __s)
{
return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
}
constexpr chrono::duration<long double> operator""s(long double __s)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double> operator""s(long double __s)
{
return chrono::duration<long double> (__s);
}
constexpr chrono::milliseconds operator""ms(unsigned long long __ms)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::milliseconds operator""ms(unsigned long long __ms)
{
return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
}
constexpr chrono::duration<long double, milli> operator""ms(long double __ms)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, milli> operator""ms(long double __ms)
{
return chrono::duration<long double, milli>(__ms);
}
constexpr chrono::microseconds operator""us(unsigned long long __us)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::microseconds operator""us(unsigned long long __us)
{
return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
}
constexpr chrono::duration<long double, micro> operator""us(long double __us)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, micro> operator""us(long double __us)
{
return chrono::duration<long double, micro> (__us);
}
constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::nanoseconds operator""ns(unsigned long long __ns)
{
return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
}
constexpr chrono::duration<long double, nano> operator""ns(long double __ns)
_LIBCPP_HIDE_FROM_ABI constexpr chrono::duration<long double, nano> operator""ns(long double __ns)
{
return chrono::duration<long double, nano> (__ns);
}

View File

@ -103,7 +103,7 @@ template <class _Tp>
struct __traits;
template <floating_point _Fp>
static constexpr size_t __float_buffer_size(int __precision) {
_LIBCPP_HIDE_FROM_ABI constexpr size_t __float_buffer_size(int __precision) {
using _Traits = __traits<_Fp>;
return 4 + _Traits::__max_integral + __precision + _Traits::__max_fractional_value;
}

View File

@ -524,7 +524,7 @@ template <class _Fn, class... _Args>
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
template <class _Fn, class ..._Args>
_LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
invoke(_Fn&& __f, _Args&&... __args)
noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
{

View File

@ -147,6 +147,7 @@ public:
template<class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2>
_LIBCPP_HIDE_FROM_ABI
friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
@ -165,6 +166,7 @@ public:
template<class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2> && equality_comparable_with<_Iter, _I2>
_LIBCPP_HIDE_FROM_ABI
friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
@ -186,6 +188,7 @@ public:
template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
requires sized_sentinel_for<_Sent, _I2>
_LIBCPP_HIDE_FROM_ABI
friend constexpr iter_difference_t<_I2> operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to subtract from a valueless common_iterator");
_LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to subtract a valueless common_iterator");
@ -205,7 +208,7 @@ public:
return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
}
friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
_LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
noexcept(noexcept(ranges::iter_move(declval<const _Iter&>())))
requires input_iterator<_Iter>
{
@ -214,7 +217,7 @@ public:
}
template<indirectly_swappable<_Iter> _I2, class _S2>
friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
_LIBCPP_HIDE_FROM_ABI friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
noexcept(noexcept(ranges::iter_swap(declval<const _Iter&>(), declval<const _I2&>())))
{
_LIBCPP_ASSERT(holds_alternative<_Iter>(__x.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");

View File

@ -263,7 +263,7 @@ public:
}
template<common_with<_Iter> _I2>
friend constexpr strong_ordering operator<=>(
_LIBCPP_HIDE_FROM_ABI friend constexpr strong_ordering operator<=>(
const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
{
return __rhs.__count_ <=> __lhs.__count_;

View File

@ -1383,7 +1383,7 @@ dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
}
template<class _Tp, class _Up>
shared_ptr<_Tp>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
typedef typename shared_ptr<_Tp>::element_type _RTp;
@ -1391,7 +1391,7 @@ const_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
}
template<class _Tp, class _Up>
shared_ptr<_Tp>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
reinterpret_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
{
return shared_ptr<_Tp>(__r,
@ -1825,7 +1825,7 @@ atomic_is_lock_free(const shared_ptr<_Tp>*)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_load(const shared_ptr<_Tp>* __p)
{
__sp_mut& __m = __get_sp_mut(__p);
@ -1846,7 +1846,7 @@ atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
void
_LIBCPP_HIDE_FROM_ABI void
atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
__sp_mut& __m = __get_sp_mut(__p);
@ -1866,7 +1866,7 @@ atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
shared_ptr<_Tp>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
{
__sp_mut& __m = __get_sp_mut(__p);
@ -1887,7 +1887,7 @@ atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order
template <class _Tp>
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
bool
_LIBCPP_HIDE_FROM_ABI bool
atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
{
shared_ptr<_Tp> __temp;

View File

@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT
{

View File

@ -64,6 +64,7 @@ __uninitialized_copy(_InputIterator __ifirst, _Sentinel1 __ilast,
}
template <class _InputIterator, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
_ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast,
_ForwardIterator __ofirst) {
typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;

View File

@ -55,12 +55,12 @@ midpoint(_TPtr __a, _TPtr __b) noexcept
template <typename _Tp>
constexpr int __sign(_Tp __val) {
_LIBCPP_HIDE_FROM_ABI constexpr int __sign(_Tp __val) {
return (_Tp(0) < __val) - (__val < _Tp(0));
}
template <typename _Fp>
constexpr _Fp __fp_abs(_Fp __f) { return __f >= 0 ? __f : -__f; }
_LIBCPP_HIDE_FROM_ABI constexpr _Fp __fp_abs(_Fp __f) { return __f >= 0 ? __f : -__f; }
template <class _Fp>
_LIBCPP_INLINE_VISIBILITY constexpr

View File

@ -110,7 +110,7 @@ bernoulli_distribution::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x)
{
__save_flags<_CharT, _Traits> __lx(__os);
@ -123,7 +123,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& _
}
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bernoulli_distribution& __x)
{
typedef bernoulli_distribution _Eng;

View File

@ -189,7 +189,7 @@ binomial_distribution<_IntType>::operator()(_URNG& __g, const param_type& __pr)
}
template <class _CharT, class _Traits, class _IntType>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const binomial_distribution<_IntType>& __x)
{
@ -203,7 +203,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
binomial_distribution<_IntType>& __x)
{

View File

@ -124,7 +124,7 @@ cauchy_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const cauchy_distribution<_RT>& __x)
{
@ -139,7 +139,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
cauchy_distribution<_RT>& __x)
{

View File

@ -107,7 +107,7 @@ public:
};
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const chi_squared_distribution<_RT>& __x)
{
@ -120,7 +120,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
chi_squared_distribution<_RT>& __x)
{

View File

@ -164,7 +164,7 @@ operator!=(const discard_block_engine<_Eng, _Pp, _Rp>& __x,
template <class _CharT, class _Traits,
class _Eng, size_t _Pp, size_t _Rp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const discard_block_engine<_Eng, _Pp, _Rp>& __x)
{
@ -178,7 +178,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Eng, size_t _Pp, size_t _Rp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
discard_block_engine<_Eng, _Pp, _Rp>& __x)
{

View File

@ -221,7 +221,7 @@ discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _IT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const discrete_distribution<_IT>& __x)
{
@ -239,7 +239,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
discrete_distribution<_IT>& __x)
{

View File

@ -121,7 +121,7 @@ exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __
}
template <class _CharT, class _Traits, class _RealType>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const exponential_distribution<_RealType>& __x)
{
@ -133,7 +133,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RealType>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
exponential_distribution<_RealType>& __x)
{

View File

@ -123,7 +123,7 @@ extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type&
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const extreme_value_distribution<_RT>& __x)
{
@ -138,7 +138,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
extreme_value_distribution<_RT>& __x)
{

View File

@ -122,7 +122,7 @@ fisher_f_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const fisher_f_distribution<_RT>& __x)
{
@ -137,7 +137,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
fisher_f_distribution<_RT>& __x)
{

View File

@ -175,7 +175,7 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const gamma_distribution<_RT>& __x)
{
@ -190,7 +190,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
gamma_distribution<_RT>& __x)
{

View File

@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// generate_canonical
template<class _RealType, size_t __bits, class _URNG>
_RealType
_LIBCPP_HIDE_FROM_ABI _RealType
generate_canonical(_URNG& __g)
{
const size_t _Dt = numeric_limits<_RealType>::digits;

View File

@ -108,7 +108,7 @@ public:
};
template <class _CharT, class _Traits, class _IntType>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const geometric_distribution<_IntType>& __x)
{
@ -120,7 +120,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
geometric_distribution<_IntType>& __x)
{

View File

@ -244,7 +244,7 @@ operator!=(
template <class _CharT, class _Traits,
class _Eng, size_t _Wp, class _UInt>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const independent_bits_engine<_Eng, _Wp, _UInt>& __x)
{
@ -253,7 +253,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Eng, size_t _Wp, class _UInt>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
independent_bits_engine<_Eng, _Wp, _UInt>& __x)
{

View File

@ -198,7 +198,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Up, _Up _Ap, _Up _Cp, _Up _Np>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x);
@ -372,7 +372,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
{

View File

@ -36,7 +36,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine;
template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
@ -56,7 +56,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x);
@ -65,7 +65,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x);
@ -416,7 +416,7 @@ mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
@ -474,7 +474,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x)
@ -496,7 +496,7 @@ template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
_UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
_UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
_Bp, _Tp, _Cp, _Lp, _Fp>& __x)

View File

@ -144,7 +144,7 @@ negative_binomial_distribution<_IntType>::operator()(_URNG& __urng, const param_
}
template <class _CharT, class _Traits, class _IntType>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const negative_binomial_distribution<_IntType>& __x)
{
@ -158,7 +158,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
negative_binomial_distribution<_IntType>& __x)
{

View File

@ -160,7 +160,7 @@ normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const normal_distribution<_RT>& __x)
{
@ -177,7 +177,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
normal_distribution<_RT>& __x)
{

View File

@ -294,7 +294,7 @@ piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_t
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const piecewise_constant_distribution<_RT>& __x)
{
@ -320,7 +320,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
piecewise_constant_distribution<_RT>& __x)
{

View File

@ -310,7 +310,7 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const piecewise_linear_distribution<_RT>& __x)
{
@ -336,7 +336,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
piecewise_linear_distribution<_RT>& __x)
{

View File

@ -245,7 +245,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
}
template <class _CharT, class _Traits, class _IntType>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const poisson_distribution<_IntType>& __x)
{
@ -257,7 +257,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IntType>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
poisson_distribution<_IntType>& __x)
{

View File

@ -215,7 +215,7 @@ template<class _Engine, size_t __k>
_LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
template<class _Eng, size_t _Kp>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(
const shuffle_order_engine<_Eng, _Kp>& __x,
const shuffle_order_engine<_Eng, _Kp>& __y)
@ -236,7 +236,7 @@ operator!=(
template <class _CharT, class _Traits,
class _Eng, size_t _Kp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const shuffle_order_engine<_Eng, _Kp>& __x)
{
@ -253,7 +253,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _Eng, size_t _Kp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
shuffle_order_engine<_Eng, _Kp>& __x)
{

View File

@ -118,7 +118,7 @@ student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const student_t_distribution<_RT>& __x)
{
@ -131,7 +131,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
student_t_distribution<_RT>& __x)
{

View File

@ -33,7 +33,7 @@ template<class _UIntType, size_t __w, size_t __s, size_t __r>
class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine;
template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __y);
@ -47,13 +47,13 @@ operator!=(
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
@ -251,7 +251,7 @@ subtract_with_carry_engine<_UIntType, __w, __s, __r>::operator()()
}
template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __y)
@ -305,7 +305,7 @@ operator!=(
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x)
{
@ -325,7 +325,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
template <class _CharT, class _Traits,
class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x)
{

View File

@ -178,8 +178,10 @@ public:
result_type a() const {return __a_;}
result_type b() const {return __b_;}
_LIBCPP_HIDE_FROM_ABI
friend bool operator==(const param_type& __x, const param_type& __y)
{return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
_LIBCPP_HIDE_FROM_ABI
friend bool operator!=(const param_type& __x, const param_type& __y)
{return !(__x == __y);}
};
@ -218,9 +220,11 @@ public:
result_type min() const {return a();}
result_type max() const {return b();}
_LIBCPP_HIDE_FROM_ABI
friend bool operator==(const uniform_int_distribution& __x,
const uniform_int_distribution& __y)
{return __x.__p_ == __y.__p_;}
_LIBCPP_HIDE_FROM_ABI
friend bool operator!=(const uniform_int_distribution& __x,
const uniform_int_distribution& __y)
{return !(__x == __y);}
@ -255,7 +259,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
}
template <class _CharT, class _Traits, class _IT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const uniform_int_distribution<_IT>& __x)
{
@ -268,7 +272,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _IT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
uniform_int_distribution<_IT>& __x)
{

View File

@ -123,7 +123,7 @@ uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& _
}
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const uniform_real_distribution<_RT>& __x)
{
@ -137,7 +137,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
uniform_real_distribution<_RT>& __x)
{

View File

@ -115,7 +115,7 @@ public:
};
template <class _CharT, class _Traits, class _RT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const weibull_distribution<_RT>& __x)
{
@ -130,7 +130,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _RT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
weibull_distribution<_RT>& __x)
{

View File

@ -221,6 +221,7 @@ namespace ranges {
return !(__x < __y);
}
_LIBCPP_HIDE_FROM_ABI
friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
requires totally_ordered<_Start> && three_way_comparable<_Start>
{

View File

@ -166,7 +166,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
}
template <class _CharT>
static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
_CharT* __char_traits_move(_CharT* __dest, const _CharT* __source, size_t __n) _NOEXCEPT
{
#ifdef _LIBCPP_COMPILER_GCC
@ -729,7 +729,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
}
template <class _CharT, class _Traits>
inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT *
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT *
__search_substring(const _CharT *__first1, const _CharT *__last1,
const _CharT *__first2, const _CharT *__last2) _NOEXCEPT {
// Take advantage of knowing source and pattern lengths.

View File

@ -126,7 +126,7 @@ __tree_sub_invariant(_NodePtr __x)
// __root == nullptr is a proper tree. Returns true is __root is a proper
// red black tree, else returns false.
template <class _NodePtr>
bool
_LIBCPP_HIDE_FROM_ABI bool
__tree_invariant(_NodePtr __root)
{
if (__root == nullptr)
@ -169,7 +169,7 @@ __tree_max(_NodePtr __x) _NOEXCEPT
// Returns: pointer to the next in-order node after __x.
template <class _NodePtr>
_NodePtr
_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_next(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@ -211,7 +211,7 @@ __tree_prev_iter(_EndNodePtr __x) _NOEXCEPT
// Returns: pointer to a node which has no children
template <class _NodePtr>
_NodePtr
_LIBCPP_HIDE_FROM_ABI _NodePtr
__tree_leaf(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@ -235,7 +235,7 @@ __tree_leaf(_NodePtr __x) _NOEXCEPT
// Effects: Makes __x->__right_ the subtree root with __x as its left child
// while preserving in-order order.
template <class _NodePtr>
void
_LIBCPP_HIDE_FROM_ABI void
__tree_left_rotate(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@ -256,7 +256,7 @@ __tree_left_rotate(_NodePtr __x) _NOEXCEPT
// Effects: Makes __x->__left_ the subtree root with __x as its right child
// while preserving in-order order.
template <class _NodePtr>
void
_LIBCPP_HIDE_FROM_ABI void
__tree_right_rotate(_NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
@ -282,7 +282,7 @@ __tree_right_rotate(_NodePtr __x) _NOEXCEPT
// Postcondition: __tree_invariant(end_node->__left_) == true. end_node->__left_
// may be different than the value passed in as __root.
template <class _NodePtr>
void
_LIBCPP_HIDE_FROM_ABI void
__tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
{
_LIBCPP_ASSERT(__root != nullptr, "Root of the tree shouldn't be null");
@ -352,7 +352,7 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
// nor any of its children refer to __z. end_node->__left_
// may be different than the value passed in as __root.
template <class _NodePtr>
void
_LIBCPP_HIDE_FROM_ABI void
__tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
{
_LIBCPP_ASSERT(__root != nullptr, "Root node should not be null");

View File

@ -24,7 +24,7 @@ inline constexpr bool is_constant_evaluated() noexcept {
}
#endif
inline _LIBCPP_CONSTEXPR
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR
bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
_LIBCPP_END_NAMESPACE_STD

View File

@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
template <class _Tp>
_LIBCPP_NODISCARD_EXT constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
template <class _Tp>
void as_const(const _Tp&&) = delete;

View File

@ -1098,11 +1098,11 @@ struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
};
template <class _CharT, class _Traits, size_t _Size>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x);
template <class _CharT, class _Traits, size_t _Size>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);
_LIBCPP_END_NAMESPACE_STD

View File

@ -615,7 +615,7 @@ __libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
#if _LIBCPP_STD_VER > 17
template <typename _Fp>
constexpr
_LIBCPP_HIDE_FROM_ABI 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;
@ -628,13 +628,13 @@ _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
return __x < __b ? __x : __b;
}
constexpr float
_LIBCPP_HIDE_FROM_ABI constexpr float
lerp(float __a, float __b, float __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
constexpr double
_LIBCPP_HIDE_FROM_ABI constexpr double
lerp(double __a, double __b, double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
constexpr long double
_LIBCPP_HIDE_FROM_ABI constexpr long double
lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
template <class _A1, class _A2, class _A3>

View File

@ -251,8 +251,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _Tp> class _LIBCPP_TEMPLATE_VIS complex;
template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template<class _Tp> _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
template<class _Tp> _LIBCPP_HIDE_FROM_ABI complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template<class _Tp>
class _LIBCPP_TEMPLATE_VIS complex
@ -583,7 +583,7 @@ operator-(const _Tp& __x, const complex<_Tp>& __y)
}
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
operator*(const complex<_Tp>& __z, const complex<_Tp>& __w)
{
_Tp __a = __z.real();
@ -662,7 +662,7 @@ operator*(const _Tp& __x, const complex<_Tp>& __y)
}
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
{
int __ilogbw = 0;
@ -987,7 +987,7 @@ proj(_Tp __re)
// polar
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
polar(const _Tp& __rho, const _Tp& __theta = _Tp())
{
if (__libcpp_isnan_or_builtin(__rho) || signbit(__rho))
@ -1036,7 +1036,7 @@ log10(const complex<_Tp>& __x)
// sqrt
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sqrt(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.imag()))
@ -1053,7 +1053,7 @@ sqrt(const complex<_Tp>& __x)
// exp
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
exp(const complex<_Tp>& __x)
{
_Tp __i = __x.imag();
@ -1137,7 +1137,7 @@ __sqr(const complex<_Tp>& __x)
// asinh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
asinh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@ -1166,7 +1166,7 @@ asinh(const complex<_Tp>& __x)
// acosh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
acosh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@ -1200,7 +1200,7 @@ acosh(const complex<_Tp>& __x)
// atanh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
atanh(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@ -1233,7 +1233,7 @@ atanh(const complex<_Tp>& __x)
// sinh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sinh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
@ -1248,7 +1248,7 @@ sinh(const complex<_Tp>& __x)
// cosh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
cosh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
@ -1265,7 +1265,7 @@ cosh(const complex<_Tp>& __x)
// tanh
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
tanh(const complex<_Tp>& __x)
{
if (__libcpp_isinf_or_builtin(__x.real()))
@ -1289,7 +1289,7 @@ tanh(const complex<_Tp>& __x)
// asin
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
asin(const complex<_Tp>& __x)
{
complex<_Tp> __z = asinh(complex<_Tp>(-__x.imag(), __x.real()));
@ -1299,7 +1299,7 @@ asin(const complex<_Tp>& __x)
// acos
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
acos(const complex<_Tp>& __x)
{
const _Tp __pi(atan2(+0., -0.));
@ -1336,7 +1336,7 @@ acos(const complex<_Tp>& __x)
// atan
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
atan(const complex<_Tp>& __x)
{
complex<_Tp> __z = atanh(complex<_Tp>(-__x.imag(), __x.real()));
@ -1346,7 +1346,7 @@ atan(const complex<_Tp>& __x)
// sin
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
sin(const complex<_Tp>& __x)
{
complex<_Tp> __z = sinh(complex<_Tp>(-__x.imag(), __x.real()));
@ -1366,7 +1366,7 @@ cos(const complex<_Tp>& __x)
// tan
template<class _Tp>
complex<_Tp>
_LIBCPP_HIDE_FROM_ABI complex<_Tp>
tan(const complex<_Tp>& __x)
{
complex<_Tp> __z = tanh(complex<_Tp>(-__x.imag(), __x.real()));
@ -1374,7 +1374,7 @@ tan(const complex<_Tp>& __x)
}
template<class _Tp, class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
{
if (__is.good())
@ -1437,7 +1437,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template<class _Tp, class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
{
basic_ostringstream<_CharT, _Traits> __s;
@ -1455,34 +1455,34 @@ inline namespace literals
{
inline namespace complex_literals
{
constexpr complex<long double> operator""il(long double __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<long double> operator""il(long double __im)
{
return { 0.0l, __im };
}
constexpr complex<long double> operator""il(unsigned long long __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<long double> operator""il(unsigned long long __im)
{
return { 0.0l, static_cast<long double>(__im) };
}
constexpr complex<double> operator""i(long double __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<double> operator""i(long double __im)
{
return { 0.0, static_cast<double>(__im) };
}
constexpr complex<double> operator""i(unsigned long long __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<double> operator""i(unsigned long long __im)
{
return { 0.0, static_cast<double>(__im) };
}
constexpr complex<float> operator""if(long double __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<float> operator""if(long double __im)
{
return { 0.0f, static_cast<float>(__im) };
}
constexpr complex<float> operator""if(unsigned long long __im)
_LIBCPP_HIDE_FROM_ABI constexpr complex<float> operator""if(unsigned long long __im)
{
return { 0.0f, static_cast<float>(__im) };
}

View File

@ -62,7 +62,7 @@ namespace std // purposefully not versioned
{
enum class byte : unsigned char {};
constexpr byte operator| (byte __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte operator| (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@ -70,10 +70,10 @@ constexpr byte operator| (byte __lhs, byte __rhs) noexcept
));
}
constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs | __rhs; }
constexpr byte operator& (byte __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte operator& (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@ -81,10 +81,10 @@ constexpr byte operator& (byte __lhs, byte __rhs) noexcept
));
}
constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs & __rhs; }
constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@ -92,10 +92,10 @@ constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
));
}
constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs ^ __rhs; }
constexpr byte operator~ (byte __b) noexcept
_LIBCPP_HIDE_FROM_ABI constexpr byte operator~ (byte __b) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
@ -107,27 +107,27 @@ template <class _Tp>
using _EnableByteOverload = __enable_if_t<is_integral<_Tp>::value, byte>;
template <class _Integer>
constexpr _EnableByteOverload<_Integer> &
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator<<=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs << __shift; }
template <class _Integer>
constexpr _EnableByteOverload<_Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator<< (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) << __shift)); }
template <class _Integer>
constexpr _EnableByteOverload<_Integer> &
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator>>=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs >> __shift; }
template <class _Integer>
constexpr _EnableByteOverload<_Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator>> (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift)); }
template <class _Integer, class = _EnableByteOverload<_Integer> >
_LIBCPP_NODISCARD_EXT constexpr _Integer
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer
to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
} // namespace std

View File

@ -223,7 +223,7 @@ class _LIBCPP_TEMPLATE_VIS __deque_iterator;
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -231,21 +231,21 @@ copy(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -253,21 +253,21 @@ copy_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -275,21 +275,21 @@ move(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -297,14 +297,14 @@ move_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r);
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r);
@ -591,7 +591,7 @@ const _DiffType __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -621,7 +621,7 @@ copy(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@ -649,7 +649,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@ -679,7 +679,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -709,7 +709,7 @@ copy_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@ -737,7 +737,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@ -767,7 +767,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -797,7 +797,7 @@ move(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@ -825,7 +825,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@ -855,7 +855,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _RAIter,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(_RAIter __f,
_RAIter __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r,
@ -885,7 +885,7 @@ move_backward(_RAIter __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _OutputIterator>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
_OutputIterator __r)
@ -913,7 +913,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
template <class _V1, class _P1, class _R1, class _M1, class _D1, _D1 _B1,
class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
_LIBCPP_HIDE_FROM_ABI __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>
move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __l,
__deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __r)
@ -1012,10 +1012,10 @@ public:
}
friend bool operator==(__deque_range const& __lhs, __deque_range const& __rhs) {
_LIBCPP_HIDE_FROM_ABI friend bool operator==(__deque_range const& __lhs, __deque_range const& __rhs) {
return __lhs.__pos_ == __rhs.__pos_;
}
friend bool operator!=(__deque_range const& __lhs, __deque_range const& __rhs) {
_LIBCPP_HIDE_FROM_ABI friend bool operator!=(__deque_range const& __lhs, __deque_range const& __rhs) {
return !(__lhs == __rhs);
}
};

View File

@ -282,7 +282,7 @@ struct __throw_with_nested<_Tp, _Up, false> {
#endif
template <class _Tp>
_LIBCPP_NORETURN
_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
void
throw_with_nested(_Tp&& __t)
{

View File

@ -110,7 +110,7 @@ private:
template <class _CharT, class _Traits, class _Delim>
ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>
_LIBCPP_HIDE_FROM_ABI ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>
make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, _Delim && __d)
{ return ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>(__os, _VSTD::forward<_Delim>(__d)); }

View File

@ -720,12 +720,12 @@ public:
#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
constexpr size_t __floor_pow_of_2(size_t __val) {
_LIBCPP_HIDE_FROM_ABI constexpr size_t __floor_pow_of_2(size_t __val) {
return ((__val - 1) & __val) == 0 ? __val
: __floor_pow_of_2((__val - 1) & __val);
}
constexpr size_t __ceil_pow_of_2(size_t __val) {
_LIBCPP_HIDE_FROM_ABI constexpr size_t __ceil_pow_of_2(size_t __val) {
return __val == 1 ? 1 : __floor_pow_of_2(__val - 1) << 1;
}
@ -913,17 +913,18 @@ public:
};
template <class _To, class _From>
constexpr decltype(_To{std::declval<_From>()}, true)
_LIBCPP_HIDE_FROM_ABI constexpr decltype(_To{std::declval<_From>()}, true)
__is_non_narrowing_convertible_impl(_From) {
return true;
}
template <class _To>
constexpr bool __is_non_narrowing_convertible_impl(...) {
_LIBCPP_HIDE_FROM_ABI constexpr bool __is_non_narrowing_convertible_impl(...) {
return false;
}
template <class _From, class _To>
_LIBCPP_HIDE_FROM_ABI
constexpr typename std::enable_if<std::is_arithmetic<_To>::value &&
std::is_arithmetic<_From>::value,
bool>::type
@ -932,6 +933,7 @@ __is_non_narrowing_arithmetic_convertible() {
}
template <class _From, class _To>
_LIBCPP_HIDE_FROM_ABI
constexpr typename std::enable_if<!(std::is_arithmetic<_To>::value &&
std::is_arithmetic<_From>::value),
bool>::type
@ -940,12 +942,12 @@ __is_non_narrowing_arithmetic_convertible() {
}
template <class _Tp>
constexpr _Tp __variadic_sum() {
_LIBCPP_HIDE_FROM_ABI constexpr _Tp __variadic_sum() {
return _Tp{};
}
template <class _Tp, class _Up, class... _Args>
constexpr _Tp __variadic_sum(_Up __first, _Args... __rest) {
_LIBCPP_HIDE_FROM_ABI constexpr _Tp __variadic_sum(_Up __first, _Args... __rest) {
return static_cast<_Tp>(__first) + __variadic_sum<_Tp>(__rest...);
}
@ -955,7 +957,7 @@ struct __nodeduce {
};
template <class _Tp>
constexpr bool __vectorizable() {
_LIBCPP_HIDE_FROM_ABI constexpr bool __vectorizable() {
return std::is_arithmetic<_Tp>::value && !std::is_const<_Tp>::value &&
!std::is_volatile<_Tp>::value && !std::is_same<_Tp, bool>::value;
}
@ -1123,13 +1125,13 @@ struct __simd_cast_traits<simd<_Tp, _NewAbi>> {
};
template <class _Tp, class _Up, class _Abi>
auto simd_cast(const simd<_Up, _Abi>& __v)
_LIBCPP_HIDE_FROM_ABI auto simd_cast(const simd<_Up, _Abi>& __v)
-> decltype(__simd_cast_traits<_Tp>::__apply(__v)) {
return __simd_cast_traits<_Tp>::__apply(__v);
}
template <class _Tp, class _Up, class _Abi>
auto static_simd_cast(const simd<_Up, _Abi>& __v)
_LIBCPP_HIDE_FROM_ABI auto static_simd_cast(const simd<_Up, _Abi>& __v)
-> decltype(__static_simd_cast_traits<_Tp>::__apply(__v)) {
return __static_simd_cast_traits<_Tp>::__apply(__v);
}

View File

@ -714,7 +714,7 @@ swap(hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@ -954,7 +954,7 @@ swap(hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
}
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{

View File

@ -412,7 +412,7 @@ swap(hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
const hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
{
@ -633,7 +633,7 @@ swap(hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
{

View File

@ -1702,6 +1702,7 @@ forward_list<_Tp, _Alloc>::reverse() _NOEXCEPT
}
template <class _Tp, class _Alloc>
_LIBCPP_HIDE_FROM_ABI
bool operator==(const forward_list<_Tp, _Alloc>& __x,
const forward_list<_Tp, _Alloc>& __y)
{

View File

@ -2174,7 +2174,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool __does_policy_contain(launch __policy, lau
{ return (int(__policy) & int(__value)) != 0; }
template <class _Fp, class... _Args>
_LIBCPP_NODISCARD_AFTER_CXX17
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
async(launch __policy, _Fp&& __f, _Args&&... __args)
{

View File

@ -278,7 +278,7 @@ setw(int __n)
template <class _MoneyT> class __iom_t7;
template <class _CharT, class _Traits, class _MoneyT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x);
template <class _MoneyT>
@ -298,7 +298,7 @@ public:
};
template <class _CharT, class _Traits, class _MoneyT>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@ -338,7 +338,7 @@ get_money(_MoneyT& __mon, bool __intl = false)
template <class _MoneyT> class __iom_t8;
template <class _CharT, class _Traits, class _MoneyT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x);
template <class _MoneyT>
@ -358,7 +358,7 @@ public:
};
template <class _CharT, class _Traits, class _MoneyT>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@ -397,7 +397,7 @@ put_money(const _MoneyT& __mon, bool __intl = false)
template <class _CharT> class __iom_t9;
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x);
template <class _CharT>
@ -417,7 +417,7 @@ public:
};
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@ -458,7 +458,7 @@ get_time(tm* __tm, const _CharT* __fmt)
template <class _CharT> class __iom_t10;
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x);
template <class _CharT>
@ -478,7 +478,7 @@ public:
};
template <class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
{
#ifndef _LIBCPP_NO_EXCEPTIONS

View File

@ -842,7 +842,7 @@ basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* _
ios_base::set_rdbuf(__sb);
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
boolalpha(ios_base& __str)
{
@ -850,7 +850,7 @@ boolalpha(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noboolalpha(ios_base& __str)
{
@ -858,7 +858,7 @@ noboolalpha(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showbase(ios_base& __str)
{
@ -866,7 +866,7 @@ showbase(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowbase(ios_base& __str)
{
@ -874,7 +874,7 @@ noshowbase(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpoint(ios_base& __str)
{
@ -882,7 +882,7 @@ showpoint(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpoint(ios_base& __str)
{
@ -890,7 +890,7 @@ noshowpoint(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
showpos(ios_base& __str)
{
@ -898,7 +898,7 @@ showpos(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noshowpos(ios_base& __str)
{
@ -906,7 +906,7 @@ noshowpos(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
skipws(ios_base& __str)
{
@ -914,7 +914,7 @@ skipws(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
noskipws(ios_base& __str)
{
@ -922,7 +922,7 @@ noskipws(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
uppercase(ios_base& __str)
{
@ -930,7 +930,7 @@ uppercase(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nouppercase(ios_base& __str)
{
@ -938,7 +938,7 @@ nouppercase(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
unitbuf(ios_base& __str)
{
@ -946,7 +946,7 @@ unitbuf(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
nounitbuf(ios_base& __str)
{
@ -954,7 +954,7 @@ nounitbuf(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
internal(ios_base& __str)
{
@ -962,7 +962,7 @@ internal(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
left(ios_base& __str)
{
@ -970,7 +970,7 @@ left(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
right(ios_base& __str)
{
@ -978,7 +978,7 @@ right(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
dec(ios_base& __str)
{
@ -986,7 +986,7 @@ dec(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hex(ios_base& __str)
{
@ -994,7 +994,7 @@ hex(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
oct(ios_base& __str)
{
@ -1002,7 +1002,7 @@ oct(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
fixed(ios_base& __str)
{
@ -1010,7 +1010,7 @@ fixed(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
scientific(ios_base& __str)
{
@ -1018,7 +1018,7 @@ scientific(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
hexfloat(ios_base& __str)
{
@ -1026,7 +1026,7 @@ hexfloat(ios_base& __str)
return __str;
}
inline
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
defaultfloat(ios_base& __str)
{

View File

@ -633,7 +633,7 @@ operator>>(basic_istream<char, _Traits>& __is, signed char* __s)
#endif // _LIBCPP_STD_VER > 17
template<class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
{
ios_base::iostate __state = ios_base::goodbit;
@ -1329,7 +1329,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
}
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is)
{
ios_base::iostate __state = ios_base::goodbit;
@ -1442,7 +1442,7 @@ basic_iostream<_CharT, _Traits>::~basic_iostream()
}
template<class _CharT, class _Traits, class _Allocator>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str)
{
@ -1498,7 +1498,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
}
template<class _CharT, class _Traits, class _Allocator>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
{
@ -1578,7 +1578,7 @@ getline(basic_istream<_CharT, _Traits>&& __is,
}
template <class _CharT, class _Traits, size_t _Size>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
{
ios_base::iostate __state = ios_base::goodbit;

View File

@ -329,7 +329,7 @@ recursive_timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration
}
template <class _L0, class _L1>
int
_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1)
{
unique_lock<_L0> __u0(__l0, try_to_lock);
@ -349,7 +349,7 @@ try_lock(_L0& __l0, _L1& __l1)
#ifndef _LIBCPP_CXX03_LANG
template <class _L0, class _L1, class _L2, class... _L3>
int
_LIBCPP_HIDE_FROM_ABI int
try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
{
int __r = 0;
@ -368,7 +368,7 @@ try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
#endif // _LIBCPP_CXX03_LANG
template <class _L0, class _L1>
void
_LIBCPP_HIDE_FROM_ABI void
lock(_L0& __l0, _L1& __l1)
{
while (true)

View File

@ -748,7 +748,7 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
}
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
__put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
const _CharT* __str, size_t __len)
{
@ -782,14 +782,14 @@ __put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
{
return _VSTD::__put_character_sequence(__os, &__c, 1);
}
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@ -822,35 +822,35 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, char __c)
{
return _VSTD::__put_character_sequence(__os, &__c, 1);
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
{
return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
{
return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
}
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
{
return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@ -896,14 +896,14 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
{
return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
{
const char *__s = (const char *) __str;
@ -911,7 +911,7 @@ operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
}
template<class _Traits>
basic_ostream<char, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<char, _Traits>&
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
{
const char *__s = (const char *) __str;
@ -1032,7 +1032,7 @@ basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir)
}
template <class _CharT, class _Traits>
inline
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
endl(basic_ostream<_CharT, _Traits>& __os)
{
@ -1042,7 +1042,7 @@ endl(basic_ostream<_CharT, _Traits>& __os)
}
template <class _CharT, class _Traits>
inline
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
ends(basic_ostream<_CharT, _Traits>& __os)
{
@ -1051,7 +1051,7 @@ ends(basic_ostream<_CharT, _Traits>& __os)
}
template <class _CharT, class _Traits>
inline
_LIBCPP_HIDE_FROM_ABI inline
basic_ostream<_CharT, _Traits>&
flush(basic_ostream<_CharT, _Traits>& __os)
{
@ -1087,7 +1087,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
}
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
basic_string_view<_CharT, _Traits> __sv)
{
@ -1123,7 +1123,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p
}
template <class _CharT, class _Traits, size_t _Size>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
{
return __os << __x.template to_string<_CharT, _Traits>

View File

@ -833,7 +833,7 @@ enum syntax_option_type
multiline = 1 << 10
};
inline _LIBCPP_CONSTEXPR
_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR
syntax_option_type __get_grammar(syntax_option_type __g)
{
#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
@ -5732,7 +5732,7 @@ match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m)
}
template <class _BidirectionalIterator, class _Allocator>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
const match_results<_BidirectionalIterator, _Allocator>& __y)
{
@ -6224,7 +6224,7 @@ regex_search(const basic_string<_Cp, _ST, _SA>&& __s,
// regex_match
template <class _BidirectionalIterator, class _Allocator, class _CharT, class _Traits>
bool
_LIBCPP_HIDE_FROM_ABI bool
regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last,
match_results<_BidirectionalIterator, _Allocator>& __m,
const basic_regex<_CharT, _Traits>& __e,
@ -6737,7 +6737,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
template <class _OutputIterator, class _BidirectionalIterator,
class _Traits, class _CharT>
_OutputIterator
_LIBCPP_HIDE_FROM_ABI _OutputIterator
regex_replace(_OutputIterator __output_iter,
_BidirectionalIterator __first, _BidirectionalIterator __last,
const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt,

View File

@ -593,17 +593,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x,
const basic_string<_CharT, _Traits, _Allocator>& __y);
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
@ -613,7 +613,7 @@ basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
@ -4346,7 +4346,7 @@ operator>=(const _CharT* __lhs,
// operator +
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
const basic_string<_CharT, _Traits, _Allocator>& __rhs)
@ -4365,7 +4365,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
}
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDDEN _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
@ -4383,7 +4383,7 @@ operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& _
}
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
{
@ -4418,7 +4418,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT*
}
template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
basic_string<_CharT, _Traits, _Allocator>
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
{
@ -4566,17 +4566,17 @@ struct _LIBCPP_TEMPLATE_VIS
};
template<class _CharT, class _Traits, class _Allocator>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const basic_string<_CharT, _Traits, _Allocator>& __str);
template<class _CharT, class _Traits, class _Allocator>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str);
template<class _CharT, class _Traits, class _Allocator>
basic_istream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);

View File

@ -956,7 +956,7 @@ bool operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> > __lhs,
#endif // _LIBCPP_STD_VER > 17
template<class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
basic_string_view<_CharT, _Traits> __str);

View File

@ -328,7 +328,7 @@ struct __thread_invoke_pair {
};
template <class _Fp>
void* __thread_proxy_cxx03(void* __vp)
_LIBCPP_HIDE_FROM_ABI void* __thread_proxy_cxx03(void* __vp)
{
unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp));
__thread_local_data().set_pointer(__p->__tsp_.release());
@ -361,7 +361,7 @@ namespace this_thread
_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
template <class _Rep, class _Period>
void
_LIBCPP_HIDE_FROM_ABI void
sleep_for(const chrono::duration<_Rep, _Period>& __d)
{
if (__d > chrono::duration<_Rep, _Period>::zero())
@ -385,7 +385,7 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d)
}
template <class _Clock, class _Duration>
void
_LIBCPP_HIDE_FROM_ABI void
sleep_until(const chrono::time_point<_Clock, _Duration>& __t)
{
mutex __mut;

View File

@ -1886,7 +1886,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{
@ -2592,7 +2592,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
{

View File

@ -1130,7 +1130,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Value, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
{
@ -1768,7 +1768,7 @@ inline _LIBCPP_INLINE_VISIBILITY
#endif
template <class _Value, class _Hash, class _Pred, class _Alloc>
bool
_LIBCPP_HIDE_FROM_ABI bool
operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
{

View File

@ -320,7 +320,7 @@ struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
inline constexpr size_t variant_npos = static_cast<size_t>(-1);
constexpr int __choose_index_type(unsigned int __num_elem) {
_LIBCPP_HIDE_FROM_ABI constexpr int __choose_index_type(unsigned int __num_elem) {
if (__num_elem < numeric_limits<unsigned char>::max())
return 0;
if (__num_elem < numeric_limits<unsigned short>::max())

View File

@ -0,0 +1,273 @@
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// Run clang-query on the headers - see clang_query/README.md for more information
// REQUIRES: has-clang-query
// The attributes hide_from_abi_of_visible.query relies on aren't applied on windows.
// XFAIL: windows
// RUN: clang-query -f %S/clang_query/hide_from_abi_or_visible.query %s --use-color -- -Wno-unknown-warning-option %{compile_flags} -fno-modules > %t.output
// RUN: cat %t.output
// RUN: cat %t.output | wc -l | grep -Fxq 1
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
# undef __DEPRECATED
#endif
/*
BEGIN-SCRIPT
for header in public_headers:
print("{}#{}include <{}>{}".format(
'#if ' + header_restrictions[header] + '\n' if header in header_restrictions else '',
3 * ' ' if header in header_restrictions else '',
header,
'\n#endif' if header in header_restrictions else ''
))
END-SCRIPT
*/
// DO NOT MANUALLY EDIT ANYTHING BETWEEN THE MARKERS BELOW
// GENERATED-MARKER
#include <algorithm>
#include <any>
#include <array>
#include <atomic>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <barrier>
#endif
#include <bit>
#include <bitset>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <charconv>
#include <chrono>
#include <cinttypes>
#include <ciso646>
#include <climits>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <clocale>
#endif
#include <cmath>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <codecvt>
#endif
#include <compare>
#include <complex>
#include <complex.h>
#include <concepts>
#include <condition_variable>
#include <coroutine>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstdbool>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctgmath>
#include <ctime>
#include <ctype.h>
#include <cuchar>
#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# include <cwchar>
#endif
#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# include <cwctype>
#endif
#include <deque>
#include <errno.h>
#include <exception>
#include <execution>
#include <fenv.h>
#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
# include <filesystem>
#endif
#include <float.h>
#include <format>
#include <forward_list>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <fstream>
#endif
#include <functional>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <future>
#endif
#include <initializer_list>
#include <inttypes.h>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <iomanip>
#endif
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <ios>
#endif
#include <iosfwd>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <iostream>
#endif
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <istream>
#endif
#include <iterator>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <latch>
#endif
#include <limits>
#include <limits.h>
#include <list>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <locale>
#endif
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <locale.h>
#endif
#include <map>
#include <math.h>
#include <memory>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <mutex>
#endif
#include <new>
#include <numbers>
#include <numeric>
#include <optional>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <ostream>
#endif
#include <queue>
#include <random>
#include <ranges>
#include <ratio>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <regex>
#endif
#include <scoped_allocator>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <semaphore>
#endif
#include <set>
#include <setjmp.h>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <shared_mutex>
#endif
#include <span>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <sstream>
#endif
#include <stack>
#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
# include <stdatomic.h>
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdexcept>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <streambuf>
#endif
#include <string>
#include <string.h>
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <strstream>
#endif
#include <system_error>
#include <tgmath.h>
#if !defined(_LIBCPP_HAS_NO_THREADS)
# include <thread>
#endif
#include <tuple>
#include <type_traits>
#include <typeindex>
#include <typeinfo>
#include <uchar.h>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <valarray>
#include <variant>
#include <vector>
#include <version>
#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# include <wchar.h>
#endif
#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# include <wctype.h>
#endif
#if __cplusplus >= 201103L
# include <experimental/algorithm>
#endif
#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
# include <experimental/coroutine>
#endif
#if __cplusplus >= 201103L
# include <experimental/deque>
#endif
#if __cplusplus >= 201103L
# include <experimental/forward_list>
#endif
#if __cplusplus >= 201103L
# include <experimental/functional>
#endif
#if __cplusplus >= 201103L
# include <experimental/iterator>
#endif
#if __cplusplus >= 201103L
# include <experimental/list>
#endif
#if __cplusplus >= 201103L
# include <experimental/map>
#endif
#if __cplusplus >= 201103L
# include <experimental/memory_resource>
#endif
#if __cplusplus >= 201103L
# include <experimental/propagate_const>
#endif
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
# include <experimental/regex>
#endif
#if __cplusplus >= 201103L
# include <experimental/set>
#endif
#if __cplusplus >= 201103L
# include <experimental/simd>
#endif
#if __cplusplus >= 201103L
# include <experimental/string>
#endif
#if __cplusplus >= 201103L
# include <experimental/type_traits>
#endif
#if __cplusplus >= 201103L
# include <experimental/unordered_map>
#endif
#if __cplusplus >= 201103L
# include <experimental/unordered_set>
#endif
#if __cplusplus >= 201103L
# include <experimental/utility>
#endif
#if __cplusplus >= 201103L
# include <experimental/vector>
#endif
#include <ext/hash_map>
#include <ext/hash_set>
// GENERATED-MARKER

View File

@ -0,0 +1,4 @@
This directory contains [AST matchers](https://clang.llvm.org/docs/LibASTMatchers.html) for clang-query.
These allow us to enforce some rules in the libc++ source code which are hard to enforce through other means,
like clang-tidy or regex matchers.

View File

@ -0,0 +1,37 @@
#===------------------------------------------------------------------------===#
#
# 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
#
#===------------------------------------------------------------------------===#
# Check that all functions in the libc++ headers are either marked with hidden
# visibility or default visibility
# TODO: enable the check for all functions once we don't force-inline everything with GCC
match
functionDecl(
unless(
anyOf(
hasName("__introsort"),
hasName("__inplace_merge"),
hasName("__libcpp_snprintf_l"),
hasName("__libcpp_asprintf_l"),
hasName("__libcpp_sscanf_l"),
hasName("__tree_sub_invariant"),
hasName("__stable_sort_move"),
hasName("__stable_sort"),
hasName("__stable_partition"),
hasName("__lock_first"),
hasName("__stable_partition_impl"),
hasAttr("attr::Visibility"),
hasAttr("attr::AbiTag"),
cxxMethodDecl(), # We have explicitly instantiated classes and some of their methods don't have these attributes
isDeleted(),
isConsteval(),
isExpansionInSystemHeader()
)
),
isDefinition()
)

View File

@ -24,6 +24,11 @@ def _hasSuitableClangTidy(cfg):
except ConfigurationRuntimeError:
return False
def _hasSuitableClangQuery(cfg):
try:
return int(re.search('[0-9]+', commandOutput(cfg, ['clang-query --version'])).group()) >= 13
except ConfigurationRuntimeError:
return False
DEFAULT_FEATURES = [
Feature(name='fcoroutines-ts',
@ -137,6 +142,8 @@ DEFAULT_FEATURES = [
when=lambda cfg: runScriptExitCode(cfg, ['%{exec} bash -c \'bash --version\'']) != 0),
Feature(name='has-clang-tidy',
when=_hasSuitableClangTidy),
Feature(name='has-clang-query',
when=_hasSuitableClangQuery),
Feature(name='apple-clang', when=_isAppleClang),
Feature(name=lambda cfg: 'apple-clang-{__clang_major__}'.format(**compilerMacros(cfg)), when=_isAppleClang),

View File

@ -38,8 +38,9 @@ _warningFlags = [
# TODO(mordante) investigate a solution for this issue.
'-Wno-tautological-compare',
# -Wstringop-overread seems to be a bit buggy currently
# -Wstringop-overread and -Wstringop-overflow seem to be a bit buggy currently
'-Wno-stringop-overread',
'-Wno-stringop-overflow',
# These warnings should be enabled in order to support the MSVC
# team using the test suite; They enable the warnings below and