public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51747] New: [C++11] cannot call copy constructor using list-initialization
@ 2012-01-03 22:04 redi at gcc dot gnu.org
  2012-02-02  6:08 ` [Bug c++/51747] [C++11] cannot call defaulted " pinskia at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-03 22:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51747

             Bug #: 51747
           Summary: [C++11] cannot call copy constructor using
                    list-initialization
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org
                CC: jason@gcc.gnu.org


struct X {
   X() = default;
   X(const X&) = default;
#ifdef OK
   X(int) { }
#endif
};

X x;
X x2{x};

t.cc:10:7: error: too many initializers for 'X'

(It compiles fine if OK is defined.)

Should overload resolution choose the copy constructor?
If not, could there be a better diagnostic?


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-06-09 16:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-03 22:04 [Bug c++/51747] New: [C++11] cannot call copy constructor using list-initialization redi at gcc dot gnu.org
2012-02-02  6:08 ` [Bug c++/51747] [C++11] cannot call defaulted " pinskia at gcc dot gnu.org
2013-04-25 11:30 ` redi at gcc dot gnu.org
2014-03-19 17:29 ` [Bug c++/51747] [DR 1467] " redi at gcc dot gnu.org
2014-03-19 17:31 ` redi at gcc dot gnu.org
2014-03-20 21:27 ` jason at gcc dot gnu.org
2014-03-24 16:03 ` jason at gcc dot gnu.org
2014-04-11 18:25 ` jason at gcc dot gnu.org
2014-05-05 16:05 ` jason at gcc dot gnu.org
2015-01-16  9:10 ` ville.voutilainen at gmail dot com
2015-01-16 17:04 ` tom at honermann dot net
2015-01-25 18:35 ` ville.voutilainen at gmail dot com
2015-04-22 12:01 ` jakub at gcc dot gnu.org
2015-05-07 16:47 ` jason at gcc dot gnu.org
2015-05-07 16:47 ` jason at gcc dot gnu.org
2015-05-07 16:48 ` jason at gcc dot gnu.org
2015-06-09 16:56 ` jason 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).