#include <iostream>
template <class B>
class A
{
public:
void Foo(B& b)
{
static_cast<void (B::*)(float)>(&B::Bar);
b.Bar(0.5);
}
};
class B
{
public:
//void Bar(float) {}
void Bar(double) {}
void Bar(int) {}
};
int main() {
A<B> a;
B b;
a.Foo(b);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPGNsYXNzIEI+CmNsYXNzIEEKewpwdWJsaWM6CiAgIHZvaWQgRm9vKEImIGIpCiAgIHsKICAgCSAgIHN0YXRpY19jYXN0PHZvaWQgKEI6OiopKGZsb2F0KT4oJkI6OkJhcik7CiAgIAkgICAKICAgICAgIGIuQmFyKDAuNSk7CiAgIH0KfTsKCmNsYXNzIEIKewpwdWJsaWM6CiAgICAvL3ZvaWQgQmFyKGZsb2F0KSB7fQogICAgdm9pZCBCYXIoZG91YmxlKSB7fQogICAgdm9pZCBCYXIoaW50KSB7fQp9OwoKaW50IG1haW4oKSB7CglBPEI+IGE7CglCIGI7CglhLkZvbyhiKTsKCQoJcmV0dXJuIDA7Cn0=