C++ PATCH for c++/56567 (ICE with lambda returning init-list)

Jason Merrill jason@redhat.com
Mon Mar 11 16:20:00 GMT 2013


On 03/08/2013 10:54 AM, Jason Merrill wrote:
> My initial proposal for allowing general return type deduction allowed
> deduction of std::initializer_list, which is not permitted by C++11. But
> this doesn't make sense, because the underlying array will immediately
> leak, so we should just give an error even in C++1y.

As pointed out in the PR, this approach was wrong because it's possible 
to have an expression with std::initializer_list type; the thing 
returned might not have itself been a brace-enclosed init list.  So 
let's catch that earlier.

Tested x86_64-pc-linux-gnu, applying to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 56567-2.patch
Type: text/x-patch
Size: 1706 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130311/91c14627/attachment.bin>


More information about the Gcc-patches mailing list