This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64488] [c++11] Expand initializer list with lambdas in variadic template. Reject valid code.
- From: "vittorio.romeo at outlook dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2017 10:48:53 +0000
- Subject: [Bug c++/64488] [c++11] Expand initializer list with lambdas in variadic template. Reject valid code.
- Auto-submitted: auto-generated
- References: <bug-64488-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64488
Vittorio Romeo <vittorio.romeo at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vittorio.romeo at outlook dot com
--- Comment #3 from Vittorio Romeo <vittorio.romeo at outlook dot com> ---
Further simplification:
template <int... Is>
void foo()
{
using arr = int(*[])();
(void) arr{[]{ return Is; }...};
}
int main() { foo<1,2,3>(); }
* clang++ 3.3 (up to 5.0) happily compiles the code with -std=c++11.
* g++ 4.7 (up to 7.0) fails to compile with -std=c++11 (or c++14/c++1z)