Message ID | 20240514095815.368805-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Fix typo in std::stacktrace::max_size [PR115063] | expand |
diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace index 92a69a53d98..d217d63af3b 100644 --- a/libstdc++-v3/include/std/stacktrace +++ b/libstdc++-v3/include/std/stacktrace @@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION [[nodiscard]] size_type max_size() const noexcept - { return _Impl::_S_max_size(_M_impl._M_alloc); } + { return _Impl::_S_max_size(_M_alloc); } [[nodiscard]] const_reference diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc index 070c4157471..a49cddfef26 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc @@ -206,10 +206,20 @@ test_pr105031() s = auto(s); } +void +test_pr115063() +{ + // PR libstdc++/115063 + // compilation error: std::basic_stracktrace::max_size() + std::stacktrace s; + VERIFY( s.max_size() != 0 ); +} + int main() { test_cons(); test_assign(); test_swap(); test_pr105031(); + test_pr115063(); }