#include <iostream>
using namespace std;
template <std::size_t array_size>
void foo(int (&bar)[array_size]) {
for (int i : bar) {
cout << i << endl;
}
}
int main() {
int bar[3] = {1,2,3};
for (int i : bar) {
cout << i << endl;
}
foo(bar);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPHN0ZDo6c2l6ZV90IGFycmF5X3NpemU+CnZvaWQgZm9vKGludCAoJmJhcilbYXJyYXlfc2l6ZV0pIHsKICBmb3IgKGludCBpIDogYmFyKSB7CiAgICBjb3V0IDw8IGkgPDwgZW5kbDsKICB9Cn0KCmludCBtYWluKCkgewogIGludCBiYXJbM10gPSB7MSwyLDN9OwogIGZvciAoaW50IGkgOiBiYXIpIHsKICAgIGNvdXQgPDwgaSA8PCBlbmRsOwogIH0KICBmb28oYmFyKTsKfQ==