https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022
Andrew Pinski changed:
What|Removed |Added
CC||jens.maurer at gmx dot net
--- Comment
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022
--- Comment #5 from piersh at hotmail dot com ---
oh, no. scratch that last comment.
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) {} // <<-
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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022
--- Comment #2 from Andrew Pinski ---
Mainly read bug 102199 comment #7
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.
10 matches
Mail list logo