#include <iostream>
using namespace std;
struct S {
void foo() {
cout << 1 << endl;
}
void foo() const {
cout << 2 << endl;
}
};
void bar(S& a) {
a.foo();
}
int main() {
S a;
bar(a);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IFMgewoJdm9pZCBmb28oKSB7CgkJY291dCA8PCAxIDw8IGVuZGw7Cgl9Cgl2b2lkIGZvbygpIGNvbnN0IHsKCQljb3V0IDw8IDIgPDwgZW5kbDsKCX0JCn07Cgp2b2lkIGJhcihTJiBhKSB7CglhLmZvbygpOwp9CgppbnQgbWFpbigpIHsKCVMgYTsKCWJhcihhKTsKCXJldHVybiAwOwp9