diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1714,6 +1714,24 @@ return data() <= __p && __p <= data() + size(); } + _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI + void __throw_length_error() const { +#if defined(_LIBCPP_NO_EXCEPTIONS) + _VSTD::abort(); +#else + __basic_string_common::__throw_length_error(); +#endif + } + + _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI + void __throw_out_of_range() const { +#if defined(_LIBCPP_NO_EXCEPTIONS) + _VSTD::abort(); +#else + __basic_string_common::__throw_out_of_range(); +#endif + } + friend basic_string operator+<>(const basic_string&, const basic_string&); friend basic_string operator+<>(const value_type*, const basic_string&); friend basic_string operator+<>(value_type, const basic_string&); diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -390,6 +390,25 @@ is_nothrow_move_assignable::value) {__move_assign_alloc(__c, integral_constant());} + + _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI + void __throw_length_error() const { +#if defined(_LIBCPP_NO_EXCEPTIONS) + _VSTD::abort(); +#else + __vector_base_common::__throw_length_error(); +#endif + } + + _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI + void __throw_out_of_range() const { +#if defined(_LIBCPP_NO_EXCEPTIONS) + _VSTD::abort(); +#else + __vector_base_common::__throw_out_of_range(); +#endif + } + private: _LIBCPP_INLINE_VISIBILITY void __copy_assign_alloc(const __vector_base& __c, true_type)