#include <iostream>
using namespace std;
struct Foo {
int meth() { return 13; }
};
int main() {
auto func = &Foo::meth;
decltype((declval<Foo>().*func)()) bar = 42;
cout << bar << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IEZvbyB7CglpbnQgbWV0aCgpIHsgcmV0dXJuIDEzOyB9Cn07CgppbnQgbWFpbigpIHsKCWF1dG8gZnVuYyA9ICZGb286Om1ldGg7CglkZWNsdHlwZSgoZGVjbHZhbDxGb28+KCkuKmZ1bmMpKCkpIGJhciA9IDQyOwoJCgljb3V0IDw8IGJhciA8PCBlbmRsOwp9