@@ -560,7 +560,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if constexpr (is_same_v<allocator_type, allocator<value_type>>)
{
// For std::allocator we use nothrow-new directly so we
- // don't need to handle bad_alloc exceptions.
+ // don't need to handle exceptions from __alloc.allocate(n).
auto __p = __detail::__get_temporary_buffer<value_type>(__n);
if (__p == nullptr) [[unlikely]]
return nullptr;
@@ -572,7 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
_M_frames = __alloc.allocate(__n);
}
- __catch (const std::bad_alloc&)
+ __catch (...)
{
return nullptr;
}