@@ -85,7 +85,9 @@ struct _Entry {
8585 _LIBCPP_EXPORTED_FROM_ABI string to_string () const ;
8686# endif // _LIBCPP_HAS_LOCALIZATION
8787
88- _LIBCPP_HIDE_FROM_ABI size_t hash () const { return std::__hash_memory (&__addr_, sizeof (uintptr_t )); }
88+ _LIBCPP_EXPORTED_FROM_ABI size_t hash () const ;
89+ _LIBCPP_HIDE_FROM_ABI static _Entry& base (stacktrace_entry& __entry);
90+ _LIBCPP_HIDE_FROM_ABI static _Entry const & base (stacktrace_entry const & __entry);
8991
9092 _LIBCPP_HIDE_FROM_ABI uintptr_t adjusted_addr () const ;
9193
@@ -97,13 +99,12 @@ struct _Entry {
9799 _LIBCPP_HIDE_FROM_ABI constexpr _Entry& operator =(_Entry&&) = default ;
98100};
99101
102+ struct _Trace ;
103+
100104} // namespace __stacktrace
101105
102106class stacktrace_entry {
103- friend _LIBCPP_HIDE_FROM_ABI inline ostream& operator <<(ostream& __os, std::stacktrace_entry const & __entry);
104- friend _LIBCPP_HIDE_FROM_ABI inline string to_string (std::stacktrace_entry const & __entry);
105- friend _LIBCPP_HIDE_FROM_ABI struct hash <stacktrace_entry>;
106-
107+ _LIBCPP_HIDE_FROM_ABI friend struct __stacktrace ::_Entry;
107108 __stacktrace::_Entry __base_{};
108109
109110public:
@@ -143,11 +144,11 @@ class stacktrace_entry {
143144# if _LIBCPP_HAS_LOCALIZATION
144145
145146_LIBCPP_HIDE_FROM_ABI inline string to_string (const std::stacktrace_entry& __entry) {
146- return __entry. __base_ .to_string ();
147+ return __stacktrace::_Entry::base ( __entry) .to_string ();
147148}
148149
149- _LIBCPP_HIDE_FROM_ABI inline ostream& operator <<(ostream& __os, const std:: stacktrace_entry& __entry) {
150- return __entry. __base_ .write_to (__os);
150+ _LIBCPP_HIDE_FROM_ABI inline ostream& operator <<(ostream& __os, const stacktrace_entry& __entry) {
151+ return __stacktrace::_Entry::base ( __entry) .write_to (__os);
151152}
152153
153154# endif // _LIBCPP_HAS_LOCALIZATION
@@ -161,11 +162,18 @@ _LIBCPP_HIDE_FROM_ABI inline ostream& operator<<(ostream& __os, const std::stack
161162
162163template <>
163164struct hash <stacktrace_entry> {
164- _LIBCPP_HIDE_FROM_ABI size_t operator ()(stacktrace_entry const & __entry) const noexcept {
165- return __entry. __base_ .hash ();
165+ _LIBCPP_HIDE_FROM_ABI size_t operator ()(const stacktrace_entry & __entry) const noexcept {
166+ return __stacktrace::_Entry::base ( __entry) .hash ();
166167 }
167168};
168169
170+ namespace __stacktrace {
171+
172+ _LIBCPP_HIDE_FROM_ABI inline _Entry& _Entry::base (stacktrace_entry& __entry) { return __entry.__base_ ; }
173+ _LIBCPP_HIDE_FROM_ABI inline _Entry const & _Entry::base (stacktrace_entry const & __entry) { return __entry.__base_ ; }
174+
175+ } // namespace __stacktrace
176+
169177_LIBCPP_END_NAMESPACE_STD
170178
171179#endif // _LIBCPP_STD_VER >= 23 && _LIBCPP_AVAILABILITY_HAS_STACKTRACE
0 commit comments