This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50025] C++0x initialization syntax doesn't work for class members of reference type


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-08-08 22:46:31 UTC ---
It's not just class members, it applies to list-initialization of any reference
type:

  int i;
  int& ir{ i }; 

The FDIS requires a temporary to be created, and a non-const reference cannot
bind to a temporary.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]