Why does this code write an undefined number of seemingly uninitialized integers?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
for (int i : vector<vector<int>>{{77, 777, 7777}}[0])
cout << i << ' ';
}
I expected the output to be 77 777 7777.
Is this code supposed to be undefined?