#include <iostream>
void bar()
{
std::cout << "::bar()" << std::endl;
}
template <typename T>
class Base
{
public:
void bar() { std::cout << "Base::bar()" << std::endl; }
};
template <typename T>
class Derived : public Base<T>
{
public:
void foo() { this->bar(); } // calls Base::bar()
};
int main()
{
Derived<int> d;
d.foo();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdm9pZCBiYXIoKQp7CiAgc3RkOjpjb3V0IDw8ICI6OmJhcigpIiA8PCBzdGQ6OmVuZGw7Cn0KCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpjbGFzcyBCYXNlCnsKcHVibGljOgogICAgdm9pZCBiYXIoKSB7IHN0ZDo6Y291dCA8PCAiQmFzZTo6YmFyKCkiIDw8IHN0ZDo6ZW5kbDsgfQp9OwoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmNsYXNzIERlcml2ZWQgOiBwdWJsaWMgQmFzZTxUPgp7CnB1YmxpYzoKICAgIHZvaWQgZm9vKCkgeyB0aGlzLT5iYXIoKTsgfSAgICAgICAvLyBjYWxscyBCYXNlOjpiYXIoKQp9OwoKaW50IG1haW4oKQp7CiAgICBEZXJpdmVkPGludD4gZDsKICAgIGQuZm9vKCk7CiAgICByZXR1cm4gMDsKfQ==