https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65949
Bug ID: 65949 Summary: Compiler can not deduce auto type in lambda Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: c.coque at hotmail dot fr Target Milestone: --- Created attachment 35431 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35431&action=edit The attachment contains the code which produce the erorrs described on the comment #Environment http://gcc.godbolt.org/ with x86 gcc 5.1.0 #Result of gcc -v gcc version 5.1.0 (GCC-Explorer) Target: x86_64-linux-gnu GNU C++14 (GCC-Explorer) version 5.1.0 (x86_64-linux-gnu) compiled by GNU C version 5.1.0, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 #Compiled with option -std=c++14 #The output : error: unable to deduce 'std::initializer_list<auto>' from '<brace-enclosed initializer list>()' at line : auto list = {args...}; error: unable to deduce 'auto&&' from 'list' for(auto &&a : list) The code compiled fine with clang 3.7. The aim of the code is to provide a way to overload lambda.