#include <iostream>
struct foo {
void bar() { std::cout << "bar" << std::endl; }
};
int main() {
foo o1, o2;
for( auto i : { &o1, &o2 } ) i->bar();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IGZvbyB7Cgl2b2lkIGJhcigpIHsgc3RkOjpjb3V0IDw8ICJiYXIiIDw8IHN0ZDo6ZW5kbDsgfQp9OwoKaW50IG1haW4oKSB7Cglmb28gbzEsIG8yOwoJZm9yKCBhdXRvIGkgOiB7ICZvMSwgJm8yIH0gKSBpLT5iYXIoKTsKCXJldHVybiAwOwp9