@@ -117,7 +117,7 @@ class basic_stacktrace : private __stacktrace::_Trace {
117117 // Overview [stacktrace.basic.overview]
118118
119119 using value_type = stacktrace_entry;
120- using const_reference = value_type const &;
120+ using const_reference = const value_type &;
121121 using reference = value_type&;
122122 using const_iterator = decltype (__entries_.cbegin());
123123 using iterator = const_iterator;
@@ -131,12 +131,14 @@ class basic_stacktrace : private __stacktrace::_Trace {
131131 // Creation and assignment [stacktrace.basic.cons]
132132
133133 _LIBCPP_ALWAYS_INLINE // Omit this function from the trace
134- static basic_stacktrace current (const allocator_type& __alloc = allocator_type()) noexcept {
134+ static basic_stacktrace
135+ current (const allocator_type& __alloc = allocator_type()) noexcept {
135136 return current (0 , __default_max_depth, __alloc);
136137 }
137138
138139 _LIBCPP_ALWAYS_INLINE // Omit this function from the trace
139- static basic_stacktrace current (size_type __skip, const allocator_type& __alloc = allocator_type()) noexcept {
140+ static basic_stacktrace
141+ current (size_type __skip, const allocator_type& __alloc = allocator_type()) noexcept {
140142 return current (__skip, __default_max_depth, __alloc);
141143 }
142144
@@ -159,22 +161,25 @@ class basic_stacktrace : private __stacktrace::_Trace {
159161 return __ret;
160162 }
161163
164+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace () noexcept (is_nothrow_default_constructible_v<allocator_type>)
165+ : basic_stacktrace(allocator_type()) {}
166+
162167 _LIBCPP_HIDE_FROM_ABI explicit basic_stacktrace (const allocator_type& __alloc)
163168 : _Trace(entry_iters_fn(), entry_append_fn()), __entries_(__alloc) {}
164169
165- _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace const & __other, allocator_type const & __alloc)
170+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace (const basic_stacktrace& __other) noexcept = default;
171+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace&& __other) noexcept = default;
172+
173+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace (const basic_stacktrace& __other, const allocator_type& __alloc)
166174 : _Trace(entry_iters_fn(), entry_append_fn()), __entries_(__other.__entries_, __alloc) {}
167175
168- _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace&& __other, allocator_type const & __alloc)
176+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace&& __other, const allocator_type & __alloc)
169177 : _Trace(entry_iters_fn(), entry_append_fn()), __entries_(std::move(__other.__entries_), __alloc) {}
170178
171- _LIBCPP_HIDE_FROM_ABI basic_stacktrace () noexcept (is_nothrow_default_constructible_v<allocator_type>)
172- : basic_stacktrace(allocator_type()) {}
173-
174- _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace const & __other) noexcept = default;
175- _LIBCPP_HIDE_FROM_ABI basic_stacktrace (basic_stacktrace&& __other) noexcept = default;
176- _LIBCPP_HIDE_FROM_ABI basic_stacktrace& operator =(const basic_stacktrace& __other) = default ;
177- _LIBCPP_HIDE_FROM_ABI basic_stacktrace& operator =(basic_stacktrace&& __other) noexcept = default ;
179+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace& operator =(const basic_stacktrace& __other) = default ;
180+ _LIBCPP_HIDE_FROM_ABI basic_stacktrace& operator =(basic_stacktrace&& __other) noexcept (
181+ allocator_traits<_Allocator>::propagate_on_container_move_assignment::value ||
182+ allocator_traits<_Allocator>::is_always_equal::value) = default ;
178183
179184 _LIBCPP_HIDE_FROM_ABI ~basic_stacktrace () = default ;
180185
0 commit comments