Skip to content

Commit 5e26fb1

Browse files
authored
[libc++] Qualify calls to nullary functions like __throw_foo (llvm#122465)
This is technically not necessary in most cases to prevent issues with ADL, but let's be consistent. This allows us to remove the libcpp-qualify-declval clang-tidy check, which is now enforced by the robust-against-adl clang-tidy check.
1 parent e11ca59 commit 5e26fb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+313
-361
lines changed

libcxx/docs/CodingGuidelines.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Function overloading also applies to operators. Using ``&user_object`` may call
3636
...
3737
}
3838
39-
This is mostly enforced by the clang-tidy checks ``libcpp-robust-against-adl`` and ``libcpp-qualify-declval``.
39+
This is mostly enforced by the clang-tidy check ``libcpp-robust-against-adl``.
4040

4141
Avoid including public headers
4242
==============================

libcxx/include/__algorithm/ranges_iterator_concept.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ consteval auto __get_iterator_concept() {
4444
}
4545

4646
template <class _Iter>
47-
using __iterator_concept _LIBCPP_NODEBUG = decltype(__get_iterator_concept<_Iter>());
47+
using __iterator_concept _LIBCPP_NODEBUG = decltype(ranges::__get_iterator_concept<_Iter>());
4848

4949
} // namespace ranges
5050
_LIBCPP_END_NAMESPACE_STD

libcxx/include/__algorithm/stable_sort.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __stable_sort(
252252
is_integral_v<value_type > && is_same_v< value_type&, __iter_reference<_RandomAccessIterator>>;
253253
constexpr auto __allowed_radix_sort = __default_comp && __integral_value;
254254
if constexpr (__allowed_radix_sort) {
255-
if (__len <= __buff_size && __len >= static_cast<difference_type>(__radix_sort_min_bound<value_type>()) &&
256-
__len <= static_cast<difference_type>(__radix_sort_max_bound<value_type>())) {
255+
if (__len <= __buff_size && __len >= static_cast<difference_type>(std::__radix_sort_min_bound<value_type>()) &&
256+
__len <= static_cast<difference_type>(std::__radix_sort_max_bound<value_type>())) {
257257
if (__libcpp_is_constant_evaluated()) {
258258
for (auto* __p = __buff; __p < __buff + __buff_size; ++__p) {
259259
std::__construct_at(__p);

libcxx/include/__chrono/formatter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ _LIBCPP_HIDE_FROM_ABI void __format_chrono_using_chrono_specs(
315315
case _CharT('T'):
316316
__facet.put(
317317
{__sstr}, __sstr, _CharT(' '), std::addressof(__t), std::to_address(__s), std::to_address(__it + 1));
318-
if constexpr (__use_fraction<_Tp>())
318+
if constexpr (__formatter::__use_fraction<_Tp>())
319319
__formatter::__format_sub_seconds(__sstr, __value);
320320
break;
321321

@@ -378,7 +378,7 @@ _LIBCPP_HIDE_FROM_ABI void __format_chrono_using_chrono_specs(
378378
break;
379379

380380
case _CharT('O'):
381-
if constexpr (__use_fraction<_Tp>()) {
381+
if constexpr (__formatter::__use_fraction<_Tp>()) {
382382
// Handle OS using the normal representation for the non-fractional
383383
// part. There seems to be no locale information regarding how the
384384
// fractional part should be formatted.

libcxx/include/__compare/common_comparison_category.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ __compute_comp_type(const _ClassifyCompCategory (&__types)[_Size]) {
5555
template <class... _Ts, bool _False = false>
5656
_LIBCPP_HIDE_FROM_ABI constexpr auto __get_comp_type() {
5757
using _CCC = _ClassifyCompCategory;
58-
constexpr _CCC __type_kinds[] = {_StrongOrd, __type_to_enum<_Ts>()...};
58+
constexpr _CCC __type_kinds[] = {_StrongOrd, __comp_detail::__type_to_enum<_Ts>()...};
5959
constexpr _CCC __cat = __comp_detail::__compute_comp_type(__type_kinds);
6060
if constexpr (__cat == _None)
6161
return void();

libcxx/include/__condition_variable/condition_variable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ inline void condition_variable::__do_timed_wait(
210210
unique_lock<mutex>& __lk, chrono::time_point<chrono::steady_clock, chrono::nanoseconds> __tp) _NOEXCEPT {
211211
using namespace chrono;
212212
if (!__lk.owns_lock())
213-
__throw_system_error(EPERM, "condition_variable::timed wait: mutex not locked");
213+
std::__throw_system_error(EPERM, "condition_variable::timed wait: mutex not locked");
214214
nanoseconds __d = __tp.time_since_epoch();
215215
timespec __ts;
216216
seconds __s = duration_cast<seconds>(__d);
@@ -225,7 +225,7 @@ inline void condition_variable::__do_timed_wait(
225225
}
226226
int __ec = pthread_cond_clockwait(&__cv_, __lk.mutex()->native_handle(), CLOCK_MONOTONIC, &__ts);
227227
if (__ec != 0 && __ec != ETIMEDOUT)
228-
__throw_system_error(__ec, "condition_variable timed_wait failed");
228+
std::__throw_system_error(__ec, "condition_variable timed_wait failed");
229229
}
230230
# endif // _LIBCPP_HAS_COND_CLOCKWAIT
231231

libcxx/include/__filesystem/directory_entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class directory_entry {
286286
return;
287287
}
288288
if (__ec && (!__allow_dne || !__is_dne_error(__ec)))
289-
__throw_filesystem_error(__msg, __p_, __ec);
289+
filesystem::__throw_filesystem_error(__msg, __p_, __ec);
290290
}
291291

292292
_LIBCPP_HIDE_FROM_ABI void __refresh(error_code* __ec = nullptr) {

libcxx/include/__format/format_arg_store.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ consteval __arg_t __determine_arg_t() {
164164
template <class _Context, class _Tp>
165165
_LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp& __value) noexcept {
166166
using _Dp = remove_const_t<_Tp>;
167-
constexpr __arg_t __arg = __determine_arg_t<_Context, _Dp>();
167+
constexpr __arg_t __arg = __format::__determine_arg_t<_Context, _Dp>();
168168
static_assert(__arg != __arg_t::__none, "the supplied type is not formattable");
169169
static_assert(__formattable_with<_Tp, _Context>);
170170

libcxx/include/__functional/function.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class __value_func<_Rp(_ArgTypes...)> {
432432

433433
_LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes&&... __args) const {
434434
if (__f_ == nullptr)
435-
__throw_bad_function_call();
435+
std::__throw_bad_function_call();
436436
return (*__f_)(std::forward<_ArgTypes>(__args)...);
437437
}
438438

@@ -607,7 +607,7 @@ struct __policy_invoker<_Rp(_ArgTypes...)> {
607607
_LIBCPP_HIDE_FROM_ABI explicit __policy_invoker(__Call __c) : __call_(__c) {}
608608

609609
_LIBCPP_HIDE_FROM_ABI static _Rp __call_empty(const __policy_storage*, __fast_forward<_ArgTypes>...) {
610-
__throw_bad_function_call();
610+
std::__throw_bad_function_call();
611611
}
612612

613613
template <typename _Fun>

libcxx/include/__locale

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ inline _LIBCPP_HIDE_FROM_ABI locale::locale(const locale& __other, _Facet* __f)
154154
template <class _Facet>
155155
locale locale::combine(const locale& __other) const {
156156
if (!std::has_facet<_Facet>(__other))
157-
__throw_runtime_error("locale::combine: locale missing facet");
157+
std::__throw_runtime_error("locale::combine: locale missing facet");
158158

159159
return locale(*this, &const_cast<_Facet&>(std::use_facet<_Facet>(__other)));
160160
}
@@ -1298,7 +1298,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<16> : public codecvt<char16_t,
12981298
const char16_t* __wn = (const char16_t*)__wb;
12991299
__r = do_out(__mb, (const char16_t*)__wb, (const char16_t*)__we, __wn, __buf, __buf + __sz, __bn);
13001300
if (__r == codecvt_base::error || __wn == (const char16_t*)__wb)
1301-
__throw_runtime_error("locale not supported");
1301+
std::__throw_runtime_error("locale not supported");
13021302
for (const char* __p = __buf; __p < __bn; ++__p, ++__s)
13031303
*__s = *__p;
13041304
__wb = (const _CharT*)__wn;
@@ -1326,7 +1326,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<32> : public codecvt<char32_t,
13261326
const char32_t* __wn = (const char32_t*)__wb;
13271327
__r = do_out(__mb, (const char32_t*)__wb, (const char32_t*)__we, __wn, __buf, __buf + __sz, __bn);
13281328
if (__r == codecvt_base::error || __wn == (const char32_t*)__wb)
1329-
__throw_runtime_error("locale not supported");
1329+
std::__throw_runtime_error("locale not supported");
13301330
for (const char* __p = __buf; __p < __bn; ++__p, ++__s)
13311331
*__s = *__p;
13321332
__wb = (const _CharT*)__wn;
@@ -1370,7 +1370,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<16> : public codecvt<char16_t
13701370
const char* __nn = __nb;
13711371
__r = do_in(__mb, __nb, __ne - __nb > __sz ? __nb + __sz : __ne, __nn, __buf, __buf + __sz, __bn);
13721372
if (__r == codecvt_base::error || __nn == __nb)
1373-
__throw_runtime_error("locale not supported");
1373+
std::__throw_runtime_error("locale not supported");
13741374
for (const char16_t* __p = __buf; __p < __bn; ++__p, ++__s)
13751375
*__s = *__p;
13761376
__nb = __nn;
@@ -1398,7 +1398,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<32> : public codecvt<char32_t
13981398
const char* __nn = __nb;
13991399
__r = do_in(__mb, __nb, __ne - __nb > __sz ? __nb + __sz : __ne, __nn, __buf, __buf + __sz, __bn);
14001400
if (__r == codecvt_base::error || __nn == __nb)
1401-
__throw_runtime_error("locale not supported");
1401+
std::__throw_runtime_error("locale not supported");
14021402
for (const char32_t* __p = __buf; __p < __bn; ++__p, ++__s)
14031403
*__s = *__p;
14041404
__nb = __nn;

libcxx/include/__locale_dir/support/windows.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ struct __locale_guard {
317317
if (std::strcmp(__l.__get_locale(), __lc) != 0) {
318318
__locale_all = _strdup(__lc);
319319
if (__locale_all == nullptr)
320-
__throw_bad_alloc();
320+
std::__throw_bad_alloc();
321321
__locale::__setlocale(LC_ALL, __l.__get_locale());
322322
}
323323
}

libcxx/include/__memory/allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
9898
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp* allocate(size_t __n) {
9999
static_assert(sizeof(_Tp) >= 0, "cannot allocate memory for an incomplete type");
100100
if (__n > allocator_traits<allocator>::max_size(*this))
101-
__throw_bad_array_new_length();
101+
std::__throw_bad_array_new_length();
102102
if (__libcpp_is_constant_evaluated()) {
103103
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
104104
} else {

libcxx/include/__memory/shared_ptr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
497497
_LIBCPP_HIDE_FROM_ABI explicit shared_ptr(const weak_ptr<_Yp>& __r)
498498
: __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_ ? __r.__cntrl_->lock() : __r.__cntrl_) {
499499
if (__cntrl_ == nullptr)
500-
__throw_bad_weak_ptr();
500+
std::__throw_bad_weak_ptr();
501501
}
502502

503503
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)

libcxx/include/__memory_resource/polymorphic_allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator {
6464

6565
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _ValueType* allocate(size_t __n) {
6666
if (__n > __max_size()) {
67-
__throw_bad_array_new_length();
67+
std::__throw_bad_array_new_length();
6868
}
6969
return static_cast<_ValueType*>(__res_->allocate(__n * sizeof(_ValueType), alignof(_ValueType)));
7070
}

libcxx/include/__mutex/unique_lock.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,19 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(unique_lock);
116116
template <class _Mutex>
117117
_LIBCPP_HIDE_FROM_ABI void unique_lock<_Mutex>::lock() {
118118
if (__m_ == nullptr)
119-
__throw_system_error(EPERM, "unique_lock::lock: references null mutex");
119+
std::__throw_system_error(EPERM, "unique_lock::lock: references null mutex");
120120
if (__owns_)
121-
__throw_system_error(EDEADLK, "unique_lock::lock: already locked");
121+
std::__throw_system_error(EDEADLK, "unique_lock::lock: already locked");
122122
__m_->lock();
123123
__owns_ = true;
124124
}
125125

126126
template <class _Mutex>
127127
_LIBCPP_HIDE_FROM_ABI bool unique_lock<_Mutex>::try_lock() {
128128
if (__m_ == nullptr)
129-
__throw_system_error(EPERM, "unique_lock::try_lock: references null mutex");
129+
std::__throw_system_error(EPERM, "unique_lock::try_lock: references null mutex");
130130
if (__owns_)
131-
__throw_system_error(EDEADLK, "unique_lock::try_lock: already locked");
131+
std::__throw_system_error(EDEADLK, "unique_lock::try_lock: already locked");
132132
__owns_ = __m_->try_lock();
133133
return __owns_;
134134
}
@@ -137,9 +137,9 @@ template <class _Mutex>
137137
template <class _Rep, class _Period>
138138
_LIBCPP_HIDE_FROM_ABI bool unique_lock<_Mutex>::try_lock_for(const chrono::duration<_Rep, _Period>& __d) {
139139
if (__m_ == nullptr)
140-
__throw_system_error(EPERM, "unique_lock::try_lock_for: references null mutex");
140+
std::__throw_system_error(EPERM, "unique_lock::try_lock_for: references null mutex");
141141
if (__owns_)
142-
__throw_system_error(EDEADLK, "unique_lock::try_lock_for: already locked");
142+
std::__throw_system_error(EDEADLK, "unique_lock::try_lock_for: already locked");
143143
__owns_ = __m_->try_lock_for(__d);
144144
return __owns_;
145145
}
@@ -148,17 +148,17 @@ template <class _Mutex>
148148
template <class _Clock, class _Duration>
149149
_LIBCPP_HIDE_FROM_ABI bool unique_lock<_Mutex>::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t) {
150150
if (__m_ == nullptr)
151-
__throw_system_error(EPERM, "unique_lock::try_lock_until: references null mutex");
151+
std::__throw_system_error(EPERM, "unique_lock::try_lock_until: references null mutex");
152152
if (__owns_)
153-
__throw_system_error(EDEADLK, "unique_lock::try_lock_until: already locked");
153+
std::__throw_system_error(EDEADLK, "unique_lock::try_lock_until: already locked");
154154
__owns_ = __m_->try_lock_until(__t);
155155
return __owns_;
156156
}
157157

158158
template <class _Mutex>
159159
_LIBCPP_HIDE_FROM_ABI void unique_lock<_Mutex>::unlock() {
160160
if (!__owns_)
161-
__throw_system_error(EPERM, "unique_lock::unlock: not locked");
161+
std::__throw_system_error(EPERM, "unique_lock::unlock: not locked");
162162
__m_->unlock();
163163
__owns_ = false;
164164
}

libcxx/include/__ostream/basic_ostream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn) {
407407
if (__len > __bs) {
408408
__wb = (_CharT*)malloc(__len * sizeof(_CharT));
409409
if (__wb == 0)
410-
__throw_bad_alloc();
410+
std::__throw_bad_alloc();
411411
__h.reset(__wb);
412412
}
413413
for (_CharT* __p = __wb; *__strn != '\0'; ++__strn, ++__p)

libcxx/include/__random/clamp_to_integral.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float(
4343
template <class _IntT, class _RealT>
4444
_LIBCPP_HIDE_FROM_ABI _IntT __clamp_to_integral(_RealT __r) _NOEXCEPT {
4545
using _Lim = numeric_limits<_IntT>;
46-
const _IntT __max_val = __max_representable_int_for_float<_IntT, _RealT>();
46+
const _IntT __max_val = std::__max_representable_int_for_float<_IntT, _RealT>();
4747
if (__r >= ::nextafter(static_cast<_RealT>(__max_val), INFINITY)) {
4848
return _Lim::max();
4949
} else if (__r <= _Lim::lowest()) {

libcxx/include/__ranges/elements_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class elements_view<_View, _Np>::__iterator
197197
}
198198

199199
public:
200-
using iterator_concept = decltype(__get_iterator_concept());
200+
using iterator_concept = decltype(__iterator::__get_iterator_concept());
201201
using value_type = remove_cvref_t<tuple_element_t<_Np, range_value_t<_Base>>>;
202202
using difference_type = range_difference_t<_Base>;
203203

libcxx/include/__ranges/zip_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
252252
friend class zip_view<_Views...>;
253253

254254
public:
255-
using iterator_concept = decltype(__get_zip_view_iterator_tag<_Const, _Views...>());
255+
using iterator_concept = decltype(ranges::__get_zip_view_iterator_tag<_Const, _Views...>());
256256
using value_type = tuple<range_value_t<__maybe_const<_Const, _Views>>...>;
257257
using difference_type = common_type_t<range_difference_t<__maybe_const<_Const, _Views>>...>;
258258

libcxx/include/__thread/thread.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ template <class _Tp>
100100
__thread_specific_ptr<_Tp>::__thread_specific_ptr() {
101101
int __ec = __libcpp_tls_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
102102
if (__ec)
103-
__throw_system_error(__ec, "__thread_specific_ptr construction failed");
103+
std::__throw_system_error(__ec, "__thread_specific_ptr construction failed");
104104
}
105105

106106
template <class _Tp>
@@ -219,7 +219,7 @@ thread::thread(_Fp&& __f, _Args&&... __args) {
219219
if (__ec == 0)
220220
__p.release();
221221
else
222-
__throw_system_error(__ec, "thread constructor failed");
222+
std::__throw_system_error(__ec, "thread constructor failed");
223223
}
224224

225225
# else // _LIBCPP_CXX03_LANG
@@ -251,7 +251,7 @@ thread::thread(_Fp __f) {
251251
if (__ec == 0)
252252
__pp.release();
253253
else
254-
__throw_system_error(__ec, "thread constructor failed");
254+
std::__throw_system_error(__ec, "thread constructor failed");
255255
}
256256

257257
# endif // _LIBCPP_CXX03_LANG

libcxx/include/__type_traits/is_nothrow_convertible.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ template <typename _Fm, typename _To>
4343
bool_constant<noexcept(std::__test_noexcept<_To>(std::declval<_Fm>()))> __is_nothrow_convertible_test();
4444

4545
template <typename _Fm, typename _To>
46-
struct __is_nothrow_convertible_helper : decltype(__is_nothrow_convertible_test<_Fm, _To>()) {};
46+
struct __is_nothrow_convertible_helper : decltype(std::__is_nothrow_convertible_test<_Fm, _To>()) {};
4747

4848
template <typename _Fm, typename _To>
4949
struct is_nothrow_convertible

libcxx/include/__vector/vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ class _LIBCPP_TEMPLATE_VIS vector {
555555
// Postcondition: size() == 0
556556
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
557557
if (__n > max_size())
558-
__throw_length_error();
558+
this->__throw_length_error();
559559
auto __allocation = std::__allocate_at_least(this->__alloc_, __n);
560560
__begin_ = __allocation.ptr;
561561
__end_ = __allocation.ptr;

libcxx/include/__vector/vector_bool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator> {
446446
// Postcondition: size() == 0
447447
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __vallocate(size_type __n) {
448448
if (__n > max_size())
449-
__throw_length_error();
449+
this->__throw_length_error();
450450
auto __allocation = std::__allocate_at_least(__alloc_, __external_cap_to_internal(__n));
451451
__begin_ = __allocation.ptr;
452452
__size_ = 0;

libcxx/include/any

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType
526526
"or a CopyConstructible type");
527527
auto __tmp = std::any_cast<add_const_t<_RawValueType>>(&__v);
528528
if (__tmp == nullptr)
529-
__throw_bad_any_cast();
529+
std::__throw_bad_any_cast();
530530
return static_cast<_ValueType>(*__tmp);
531531
}
532532

@@ -538,7 +538,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType
538538
"or a CopyConstructible type");
539539
auto __tmp = std::any_cast<_RawValueType>(&__v);
540540
if (__tmp == nullptr)
541-
__throw_bad_any_cast();
541+
std::__throw_bad_any_cast();
542542
return static_cast<_ValueType>(*__tmp);
543543
}
544544

@@ -550,7 +550,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _ValueType
550550
"or a CopyConstructible type");
551551
auto __tmp = std::any_cast<_RawValueType>(&__v);
552552
if (__tmp == nullptr)
553-
__throw_bad_any_cast();
553+
std::__throw_bad_any_cast();
554554
return static_cast<_ValueType>(std::move(*__tmp));
555555
}
556556

libcxx/include/array

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,13 @@ struct _LIBCPP_TEMPLATE_VIS array {
276276

277277
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type __n) {
278278
if (__n >= _Size)
279-
__throw_out_of_range("array::at");
279+
std::__throw_out_of_range("array::at");
280280
return __elems_[__n];
281281
}
282282

283283
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type __n) const {
284284
if (__n >= _Size)
285-
__throw_out_of_range("array::at");
285+
std::__throw_out_of_range("array::at");
286286
return __elems_[__n];
287287
}
288288

@@ -407,12 +407,12 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
407407
}
408408

409409
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference at(size_type) {
410-
__throw_out_of_range("array<T, 0>::at");
410+
std::__throw_out_of_range("array<T, 0>::at");
411411
__libcpp_unreachable();
412412
}
413413

414414
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const_reference at(size_type) const {
415-
__throw_out_of_range("array<T, 0>::at");
415+
std::__throw_out_of_range("array<T, 0>::at");
416416
__libcpp_unreachable();
417417
}
418418

0 commit comments

Comments
 (0)