#include <cmath>
#include <iostream>
struct dummy;
struct Int
{
int i;
Int() : i(0) {}
Int(const int& i) : i(i) {}
dummy operator*();
};
struct dummy
{
Int* p;
dummy(Int* const p) : p(p) {}
int& operator*()
{
return p->i;
}
};
dummy Int::operator*()
{
return dummy(this);
}
int operator*(const Int& lhs, const dummy& rhs)
{
return std::pow(lhs.i, rhs.p->i);
}
int main() {
Int a(2);
Int b(2);
std::cout<< a ** b << std::endl;
}
I2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8aW9zdHJlYW0+CgpzdHJ1Y3QgZHVtbXk7CgpzdHJ1Y3QgSW50CnsKCWludCBpOwoJSW50KCkgOiBpKDApIHt9CglJbnQoY29uc3QgaW50JiBpKSA6IGkoaSkge30KCQoJZHVtbXkgb3BlcmF0b3IqKCk7Cn07CgpzdHJ1Y3QgZHVtbXkKewoJSW50KiBwOwoJZHVtbXkoSW50KiBjb25zdCBwKSA6IHAocCkge30KCQoJaW50JiBvcGVyYXRvciooKQoJewoJCXJldHVybiBwLT5pOwoJfQp9OwoKZHVtbXkgSW50OjpvcGVyYXRvciooKQp7CglyZXR1cm4gZHVtbXkodGhpcyk7Cn0KCgoKaW50IG9wZXJhdG9yKihjb25zdCBJbnQmIGxocywgY29uc3QgZHVtbXkmIHJocykKewoJcmV0dXJuIHN0ZDo6cG93KGxocy5pLCByaHMucC0+aSk7Cn0KCgppbnQgbWFpbigpIHsKCUludCBhKDIpOwoJSW50IGIoMik7CglzdGQ6OmNvdXQ8PCBhICoqIGIgPDwgc3RkOjplbmRsOyAKfQo=