Talk:cpp/language/array

identity
template using identity = T; f(identity{{1, 2, 3}, {4, 5, 6}}); // okay: binds to prvalue

What does 'identity' do here? It doesn't seem to make any difference and it compiles to the same thing as

f({{1, 2, 3}, {4, 5, 6}});

when compared using CompilerExplorer. QuentinUK (talk) 04:46, 23 November 2019 (PST)
 * it makes it a prvalue expression. A braced-init-list is not an expression. --Cubbi (talk) 14:15, 25 November 2019 (PST)