https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56568

--- Comment #5 from David Krauss <potswa at mac dot com> ---
(In reply to fuzzyTew from comment #4)

The original testcase is invalid. initializer_list is special in that it
behaves like a reference, so adding && doesn't make a difference.

I'm working on an ISO proposal (http://bit.ly/genlife) to fix some such cases
in C++17, but all it would do for return values is allow the compiler to
produce a warning. The way initializer_list works, the sequence is
intrinsically incapable of escaping the current scope, much less the current
function.

Reply via email to