#include <iostream>
class A{
int a;
friend int access_member(A*a){ return a->a;}
};
//-----------------------------------------
int main()
{
auto function = [](A*a){ return access_member(a); };
std::cout << function(new A) << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgogICAgCiAgICBjbGFzcyBBewogICAgICAgIGludCBhOwogICAgCiAgICAgICAgZnJpZW5kIGludCBhY2Nlc3NfbWVtYmVyKEEqYSl7IHJldHVybiBhLT5hO30KICAgIH07CgogICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICAgaW50IG1haW4oKQogICAgewogICAgCWF1dG8gZnVuY3Rpb24gPSBbXShBKmEpeyAgIHJldHVybiBhY2Nlc3NfbWVtYmVyKGEpOyB9OwogICAgICAgIAogICAgICAgIHN0ZDo6Y291dCA8PCBmdW5jdGlvbihuZXcgQSkgPDwgc3RkOjplbmRsOwogICAgICAgIAogICAgICAgIHJldHVybiAwOwogICAgfQ==