[Bug libstdc++/113841] Can't swap two std::hash

2025-04-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #18 from Jonathan Wakely --- The std::vector problem is fixed for 12.5 and 13.3 and 14.1

[Bug libstdc++/113841] Can't swap two std::hash

2025-04-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #17 from GCC Commits --- The releases/gcc-12 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:9357f7e0fbfbf0d7d5adb2cd1588a765f40b6162 commit r12-11042-g9357f7e0fbfbf0d7d5adb2cd1588a765f40b6162 Author: Jonathan Wa

[Bug libstdc++/113841] Can't swap two std::hash

2024-08-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #16 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984 commit r15-2651-g8b8e5ed6cd0f3cfe7cdf93200e47c069fd101984 Author: Jonathan Wakely Date

[Bug libstdc++/113841] Can't swap two std::hash

2024-06-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 Richard Biener changed: What|Removed |Added Target Milestone|12.4|12.5 --- Comment #15 from Richard Bien

[Bug libstdc++/113841] Can't swap two std::hash

2024-04-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #14 from GCC Commits --- The releases/gcc-13 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:87ec5b369eed205dfe6802afaaec3986b246ade9 commit r13-8569-g87ec5b369eed205dfe6802afaaec3986b246ade9 Author: Jonathan Wak

[Bug libstdc++/113841] Can't swap two std::hash

2024-03-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #13 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:142cc4c223d695e515ed2504501b91d8a7ac6eb8 commit r14-9635-g142cc4c223d695e515ed2504501b91d8a7ac6eb8 Author: Jonathan Wakely Date

[Bug libstdc++/113841] Can't swap two std::hash

2024-03-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #12 from Jonathan Wakely --- There's no problem with pair, it's basic_string that fails.

[Bug libstdc++/113841] Can't swap two std::hash

2024-03-02 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #11 from Viktor Ostashevskyi --- (In reply to Jonathan Wakely from comment #10) > This one's much harder to fix: > > #include > > template > struct Alloc > { > using value_type = T; > > Alloc(int) { } > > template Alloc(co

[Bug libstdc++/113841] Can't swap two std::hash

2024-03-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #10 from Jonathan Wakely --- This one's much harder to fix: #include template struct Alloc { using value_type = T; Alloc(int) { } template Alloc(const Alloc&) { } T* allocate(std::size_t n) { return std::allocator().all

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigne

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-14 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #9 from Viktor Ostashevskyi --- (In reply to Jonathan Wakely from comment #8) > Calling swap unqualified performs ADL, which has to find all the associated > namespaces and associated classes. To do that it has to complete all the >

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #8 from Jonathan Wakely --- Calling swap unqualified performs ADL, which has to find all the associated namespaces and associated classes. To do that it has to complete all the types involved, which means it tries to complete: std::h

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #7 from Viktor Ostashevskyi --- I'm still wondering why for std::hash, the T type is checked for anything. It shouldn't matter what T is, as we're hashing T*...

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #6 from Jonathan Wakely --- IIRC the reason we don't just default that constructor is because we need to be sure to value-initialize the allocator, not just default-initialize it.

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 Jonathan Wakely changed: What|Removed |Added Component|c++ |libstdc++ --- Comment #5 from Jonatha

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 Jonathan Wakely changed: What|Removed |Added Known to fail||12.3.1 Known to work|

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-09 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #3 from Viktor Ostashevskyi --- Additional information: everything works fine both for GCC12 and Clang if swap call is fully qualified, i.e.: std::swap(h1, h2);

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-08 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #1 from Viktor Ostashevskyi --- Issue is visible with -std=c++20, works fine for -std=c++17 (for both GCC12 and Clang).

[Bug libstdc++/113841] Can't swap two std::hash

2024-02-08 Thread ostash at ostash dot kiev.ua via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841 --- Comment #2 from Viktor Ostashevskyi --- Compiler exporer link: https://godbolt.org/z/cPqsKq6nM