#include <iostream>
using namespace std;
class A {
int a;
public:
A(int _a) : a(_a) {}
friend int foo(A*);
};
int foo(A* aa) {
auto function = [](A* a) {
return a->a;
};
return function(aa);
}
int main() {
A a(123);
cout << foo(&a) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgQSB7CiAgaW50IGE7CnB1YmxpYzoKICAgIEEoaW50IF9hKSA6IGEoX2EpIHt9CiAgZnJpZW5kIGludCBmb28oQSopOwp9OwoKaW50IGZvbyhBKiBhYSkgewogICAgYXV0byBmdW5jdGlvbiA9IFtdKEEqIGEpIHsKICAgIAlyZXR1cm4gYS0+YTsKICAgIH07CiAgICByZXR1cm4gZnVuY3Rpb24oYWEpOwp9CgppbnQgbWFpbigpIHsKCUEgYSgxMjMpOwoJY291dCA8PCBmb28oJmEpIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==