https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112348
Bug ID: 112348 Summary: [C++23] defect in struct hash<basic_stacktrace<_Allocator>> Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: vincenzo.innocente at cern dot ch Target Milestone: --- gcc version 14.0.0 20231028 (experimental) [master r14-4988-g5d2a360f0a5] (GCC) auto k = std::hash<std::stacktrace>()(std::stacktrace::current()); does not compile to me with error In instantiation of 'std::size_t std::hash<std::basic_stacktrace<_Allocator> >::operator()(const std::basic_stacktrace<_Allocator>&) const [with _Allocator = std::allocator<std::stacktrace_entry>; std::size_t = long unsigned int]': testStacktrace.cpp:39:41: required from here 39 | auto k = std::hash<std::stacktrace>()(std::stacktrace::current()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /afs/cern.ch/work/i/innocent/public/w5/include/c++/14.0.0/stacktrace:803:49: error: no match for call to '(std::hash<long unsigned int>) (const std::stacktrace_entry&)' 803 | __val = _Hash_impl::__hash_combine(__h(__f), __val); | ~~~^~~~~ changed // hash<stacktrace_entry::native_handle_type> __h; hash<stacktrace_entry> __h; and it compiled. (I suspect __f.native_handle() would work as well) Surprised it passed tests.