[Bug c++/107022] error: use of deleted function 'std::unordered_map

2025-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-10-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #9 from Jonathan Wakely --- For the example in comment 0 the default-initializer for things_{} is the problem, removing the {} allows it to compile. For the example in Bug 107340 the problem is the default-initializer x = 0 in the n

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-10-21 Thread jens.maurer at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #8 from Jens Maurer --- I understand we're in a tangled web of partially-complete class rules here, but the standard does give you the expectation that the inner class is complete at its closing brace: [class.pre] p2 says: "A class

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-10-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 Andrew Pinski changed: What|Removed |Added CC||jens.maurer at gmx dot net --- Comment

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #6 from Andrew Pinski --- (In reply to piersh from comment #4) > struct my_hash > { > my_hash() {} > my_hash(int i = 42) {} // <<-- uncomment for bug > std::size_t operator()(const key &ep) const { return 0; } > }; That

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread piersh at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #5 from piersh at hotmail dot com --- oh, no. scratch that last comment.

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread piersh at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #4 from piersh at hotmail dot com --- is it related to nested classes? this reproduces the issue: uncomment line 9 to repro: #include #include struct key {}; struct my_hash { my_hash() {} //my_hash(int i = 42) {} // <<-

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #3 from Jonathan Wakely --- Yes, and the standard says that instantiating std::unordered_map with incomplete types is undefined.

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #2 from Andrew Pinski --- Mainly read bug 102199 comment #7

[Bug c++/107022] error: use of deleted function 'std::unordered_map

2022-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022 --- Comment #1 from Andrew Pinski --- This is another when is the inner type complete and the constructor can be used issues really.