#include <iostream>
using namespace std;
template<typename T>
struct Base
{
void print1() {cout << "Base::print1" << endl;};
void print2() {cout << "Base::print2" << endl;};
};
template<>
void Base<int>::print2() {cout << "Base<int>::print2()" << endl;};
int main()
{
Base<double> d;
Base<int> i;
d.print1();
d.print2();
i.print1();
i.print2();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CnN0cnVjdCBCYXNlCnsKICB2b2lkIHByaW50MSgpIHtjb3V0IDw8ICJCYXNlOjpwcmludDEiIDw8IGVuZGw7fTsKICB2b2lkIHByaW50MigpIHtjb3V0IDw8ICJCYXNlOjpwcmludDIiIDw8IGVuZGw7fTsKfTsKCnRlbXBsYXRlPD4Kdm9pZCBCYXNlPGludD46OnByaW50MigpIHtjb3V0IDw8ICJCYXNlPGludD46OnByaW50MigpIiA8PCBlbmRsO307CgppbnQgbWFpbigpCnsKICBCYXNlPGRvdWJsZT4gZDsKICBCYXNlPGludD4gaTsgCgogIGQucHJpbnQxKCk7CiAgZC5wcmludDIoKTsKICBpLnByaW50MSgpOwogIGkucHJpbnQyKCk7Cn0K