#include <iostream>
#include <string>
template<class T>
class Game
{
public:
//Game-related
template <typename U>
U processEvents(std::string input);
template <typename U>
void display(U action);
};
template<class T>
template<class U>
U Game<T>::processEvents(std::string input)
{
std::cout << "Game::processEvents(\"" << input << "\")\n";
return U();
//
}
template<class T>
template<class U>
void Game<T>::display(U action)
{
std::cout << "Game::Display(" << action << ")\n";
}
int main()
{
Game<int> game;
int value = game.processEvents<int>("string1");
std::string val2 = game.processEvents<std::string>("string2");
game.display(69);
game.display("another string");
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdGVtcGxhdGU8Y2xhc3MgVD4KY2xhc3MgR2FtZQp7CnB1YmxpYzoKCiAgICAvL0dhbWUtcmVsYXRlZAogICAgdGVtcGxhdGUgPHR5cGVuYW1lIFU+CiAgICBVIHByb2Nlc3NFdmVudHMoc3RkOjpzdHJpbmcgaW5wdXQpOwoKICAgIHRlbXBsYXRlIDx0eXBlbmFtZSBVPgogICAgdm9pZCBkaXNwbGF5KFUgYWN0aW9uKTsKfTsKCnRlbXBsYXRlPGNsYXNzIFQ+CnRlbXBsYXRlPGNsYXNzIFU+ClUgR2FtZTxUPjo6cHJvY2Vzc0V2ZW50cyhzdGQ6OnN0cmluZyBpbnB1dCkKewogICAgc3RkOjpjb3V0IDw8ICJHYW1lOjpwcm9jZXNzRXZlbnRzKFwiIiA8PCBpbnB1dCA8PCAiXCIpXG4iOwogICAgcmV0dXJuIFUoKTsKICAgIC8vCn0KCnRlbXBsYXRlPGNsYXNzIFQ+CnRlbXBsYXRlPGNsYXNzIFU+CnZvaWQgR2FtZTxUPjo6ZGlzcGxheShVIGFjdGlvbikKewogICAgc3RkOjpjb3V0IDw8ICJHYW1lOjpEaXNwbGF5KCIgPDwgYWN0aW9uIDw8ICIpXG4iOwp9CgppbnQgbWFpbigpCnsKICAgIEdhbWU8aW50PiBnYW1lOwoKICAgIGludCB2YWx1ZSA9IGdhbWUucHJvY2Vzc0V2ZW50czxpbnQ+KCJzdHJpbmcxIik7CiAgICBzdGQ6OnN0cmluZyB2YWwyID0gZ2FtZS5wcm9jZXNzRXZlbnRzPHN0ZDo6c3RyaW5nPigic3RyaW5nMiIpOwogICAgZ2FtZS5kaXNwbGF5KDY5KTsKICAgIGdhbWUuZGlzcGxheSgiYW5vdGhlciBzdHJpbmciKTsKfQ==