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

--- Comment #3 from Andrzej Krzemienski <akrzemi1 at gmail dot com> 2011-08-08 
23:31:37 UTC ---
(In reply to comment #1)
> G++ is actually correct according to wording in the C++11 FDIS (see 8.5.4
> paragraphs 5 and 6), but we've reported it as an issue that needs to be fixed.

Are you sure about the paragraphs 5 and 6? (5 starts with "An object of type",
6 starts with "The lifetime of the array"?) They only say how
std::initializer_list is created and how it behaves, but the 6th bullet of
paragraph 3 (the one starting with "Otherwise, if the initializer list has a
single element") does not require that std::initializer_list is created or
used. It simply says that in code like:
  int i = 0;
  int & ri{i};

"ri" is initialized with "i". (And BTW, this example works on the same
compiler.)

Reply via email to