public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99566] New: designated initialization rejects explicit constructor
@ 2021-03-12 20:20 barry.revzin at gmail dot com
2021-03-15 17:22 ` [Bug c++/99566] " mpolacek at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: barry.revzin at gmail dot com @ 2021-03-12 20:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99566
Bug ID: 99566
Summary: designated initialization rejects explicit constructor
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/66606143/2069064):
struct A {
explicit A(int);
};
struct B {
A a;
};
A a{10}; // ok
B b{.a{10}}; // error: converting from initializer list
// would use explicit constructor
But the initialization of the "a" subobject of B should work the same was as
the initialization of the complete object "a".
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/99566] designated initialization rejects explicit constructor
2021-03-12 20:20 [Bug c++/99566] New: designated initialization rejects explicit constructor barry.revzin at gmail dot com
@ 2021-03-15 17:22 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-15 17:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99566
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This is DR2359 and we already have a bug for that
(https://gcc.gnu.org/projects/cxx-dr-status.html): 91319
*** This bug has been marked as a duplicate of bug 91319 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-15 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 20:20 [Bug c++/99566] New: designated initialization rejects explicit constructor barry.revzin at gmail dot com
2021-03-15 17:22 ` [Bug c++/99566] " mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).