Is the following generic (polymorphic) lambda legal C++14?
auto f = [](auto x[3]) {
x[0];
x[1];
// etc.
};
GCC and Clang 4 accept the code, but Visual Studio 2017 does not. Is it legal?
error C3318: 'auto [3]': an array cannot have an element type that contains 'auto'
It is illegal.
[dcl.array]/1, emphasis mine: