Skip to content

Commit 46d8aa8

Browse files
authored
[libc++] Make __throw_ member functions static (#116233)
Fixes #116092
1 parent bb3f5e1 commit 46d8aa8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

libcxx/include/__vector/vector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,9 @@ class _LIBCPP_TEMPLATE_VIS vector {
763763
__move_assign_alloc(__c, integral_constant<bool, __alloc_traits::propagate_on_container_move_assignment::value>());
764764
}
765765

766-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const { std::__throw_length_error("vector"); }
766+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_length_error() { std::__throw_length_error("vector"); }
767767

768-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("vector"); }
768+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_out_of_range() { std::__throw_out_of_range("vector"); }
769769

770770
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const vector& __c, true_type) {
771771
if (__alloc() != __c.__alloc()) {

libcxx/include/__vector/vector_bool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator> {
378378
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __invariants() const;
379379

380380
private:
381-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const { std::__throw_length_error("vector"); }
381+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_length_error() { std::__throw_length_error("vector"); }
382382

383-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("vector"); }
383+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_out_of_range() { std::__throw_out_of_range("vector"); }
384384

385385
template <class _InputIterator, class _Sentinel>
386386
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void

libcxx/include/string

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,11 +2258,11 @@ private:
22582258
return std::__is_pointer_in_range(data(), data() + size() + 1, std::addressof(__v));
22592259
}
22602260

2261-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_length_error() const {
2261+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_length_error() {
22622262
std::__throw_length_error("basic_string");
22632263
}
22642264

2265-
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const {
2265+
[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI static void __throw_out_of_range() {
22662266
std::__throw_out_of_range("basic_string");
22672267
}
22682268

0 commit comments

Comments
 (0)