[committed] libstdc++: Fix outdated comment in <stacktrace>

Jonathan Wakely jwakely@redhat.com
Thu Feb 27 22:49:55 GMT 2025


My r15-998-g2a83084ce55363 change replaced the use of nothrow
operator new with a call to __get_temporary_buffer, so update the
comment to match.

libstdc++-v3/ChangeLog:

	* include/std/stacktrace (_Impl::_M_allocate): Fix outdated
	comment.
---

Lightly tested on x86_64-linux (because it's only a comment).

Pushed to trunk.

 libstdc++-v3/include/std/stacktrace | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace
index f94a424e4cf..491122293c5 100644
--- a/libstdc++-v3/include/std/stacktrace
+++ b/libstdc++-v3/include/std/stacktrace
@@ -559,7 +559,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
+		  // Use non-throwing __get_temporary_buffer, so that we
 		  // don't need to handle exceptions from __alloc.allocate(n).
 		  auto __p = __detail::__get_temporary_buffer<value_type>(__n);
 		  if (__p == nullptr) [[unlikely]]
-- 
2.48.1



More information about the Libstdc++ mailing list