https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72775
--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Matteo Bertello from comment #10)
> Just had the same internal compiler error on a different piece of code,
> using GCC 6.1.1 on Fedora 24.
> Might be useful to investigate the cause.
This code doesn't compile for me at all:
r3.cc: In function ‘int main(int, char**)’:
r3.cc:8:27: error: expected primary-expression before ‘(’ token
auto thread = std::thread([&, =val]() { func(val); });
^
r3.cc:8:32: error: expected identifier before ‘=’ token
auto thread = std::thread([&, =val]() { func(val); });
^
clang++ rejects it, too.