Are compound literals Standard C++?
问题 Compound Literals are a C99 construct. Even though I can do this in C++ : #include <iostream> using namespace std; int main() { for (auto i : (float[2]) {2.7, 3.1}) cout << i << endl; } It seems that for example MSVC supports it as an extension. Yet all compilers I can get my hands on, compile the above mentioned code. So is this a feature available in C++14 ? Is there a different standard term (It looks to me like just creating a temporary using braced initialization) ? Side Note : \